- Joined
- Mar 3, 2009
- Messages
- 318
- Reaction score
- 256
In this tutorial, I'll show you how to add "Rune Agent Flasha" into Bloody Ice and let him sell Upgrade Core(High) at 1 Alz.
***********
***********
1, What do I have to know before reading this tutorial?
- Where's client and server files?
- How to encrypt/decrypt ENC files?
- How to edit server's SCP files?
- Cuz I don't show you how to do (search for answer).
By modifying "extra_obj.enc" and "extra_obj_msg.enc" in Client you can add a NPC
Here's the way.
a, Edit "extra_obj.enc"
First, with "extra_obj.enc", by adding those lines you'll add an object in to specified map.
Code:
<cabal>
<version index="1" />
<extra_object world_id="1">
<extra_stuff id="2" filename="Character\w1rune.ebm" min="-17[COLOR=black]0.87[/COLOR]3,-2[COLOR=black]5.31[/COLOR]12,-2[COLOR=black]44.7[/COLOR]27" max="2[COLOR=black]15.37[/COLOR]9,65[COLOR=black]0,17[/COLOR]2.7[COLOR=black]75[/COLOR]" />
<extra_entity type="1" pos="1[COLOR=black]49[/COLOR]6[COLOR=black],0,434[/COLOR]5" rotate="0[COLOR=black],0,0[/COLOR],0" scale="1[COLOR=black],1,[/COLOR]1" disable_cell_radius="1" stuff_id="2" name="extra_npc_003" npc_id="35" npc_tag="0" npc_type="1" />
</extra_object>
</cabal>
- world_id : ID of World - Map (for full list, check this out :
To view the content, you need to sign in or register)
extra_stuff
- id : ID of object in current map
- filename : 3D Model for object
- min : ?
- max : ?
- type : Object type
- 0 : Normal Object
- 1 : NPC
- filename : 3D Model for object
- pos : NPC Position (All pos is multiplied by 100 for more accuracy)
- 1st : X
- 2nd : Z
- 3rd : Y
- rotate : NPC Rotation
- 1st : Always = 0
- 2nd : Degree for X axis
- 3rd : Degree for Z axis
- 4th : Degree for Y axis
- scale : scaling ratio (1,1,1 for normal size)
- 1st : X
- 2nd : Z
- 3rd : Y
- disable_cell_radius : Radius of area which the object placed in (player can't cross over that area)
- stuff_id : id of extra_stuff which this extra_entity describe about
- name : stuff name
- npc_id : ID of NPC
- npc_tag : ?
- npc_type :
- 1 : Normal NPC
- 7 : Shop NPC
- Other value : Not sure
File "extra_obj_msg.enc" must have some data to hold NPC name which stored in "extra_obj.enc".
Here is an example.
Code:
<cabal_msg>
<version index="1"/>
<nation code="EU"/>
<extra_obj_msg>
<msg id="extra_npc_003" cont="Rune Agent Flasha" />
</extra_obj_msg>
</cabal_msg>
msg
- id : Same value with extra_entity > name
- cont : Name of NPC
3, Modified NPC from Normal NPC to Shop NPC
Now you have to decide, which item you want to sell in that NPC. For example UCH at 1Alz, OK?
a, With "cabal.enc"
Find:
Code:
<cabal_world>
Code:
<world id="1" name="world1" type="0" map_file="world_01.mcl"
Code:
<world_npc id="35" npc_name="npc[COLOR=black]01-003[/COLOR]5" x="14" y="43" is_obj="0" />
- id : same id in "extra_obj.enc"
- npc_name : follow this pattern "npcXX-YYYY" where
- XX : Map ID
- YYYY : NPC ID
- x : X Position
- y : Y Position
- is_obj:
- 0 : Is not Object (is a NPC)
- 1 : Is a normal Object (non-clickable)
Code:
<shop id="35" >
<item slot_id="0" item_id="1" option="0" reputation_class="-19" duration_id="0" price="1" />
</shop>
- id : NPC Id
item
- slot_id : Slot on shop screen
- item_id : ID of item
- option : Option of item
- reputation_class : Honor class required to buy (-19 = no required)
- duration_id : Item duration
- price : Price of item
Add new line to describe about NPC name likes that:
Code:
<msg id="npc01-0035" cont="Rune Agent Flasha" />
c, With server file.
Find correct NPC data file for your map (Ex : for Bloody Ice : /etc/cabal/data/data_world/world1-npc.scp)
Open it and add a line to let server know about the NPC which id is 35 (our Rune Agent)
Add into [NpcPos] Flags Index PosX PosY Type IsRangeCheck section
Code:
28 0 35 15 43 1 1
Add into [ShopLst] NpcsIdx NSetIdx ItemKind ItemOpt ReputationClass DurationIdx Price section
Code:
147 35 0 1 0 1 0 1
---------- Post added at 02:34 AM ---------- Previous post was at 02:24 AM ----------
Here's some NPC XML data which you can use to put into "extra_obj.enc".
X'Mas Tree in Bloody Ice
Code:
<extra_stuff id="0" filename="object\object_fx\x-mas\x-mastree05.efx" min="-17[COLOR=black]0.87[/COLOR]3,-2[COLOR=black]5.31[/COLOR]12,-2[COLOR=black]44.72[/COLOR]7" max="2[COLOR=black]15.37[/COLOR]9,6[COLOR=black]50,17[/COLOR]2.7[COLOR=black]7[/COLOR]5" />
<extra_entity type="0" pos="22[COLOR=black]52,-3[/COLOR]1,[COLOR=black]306[/COLOR]8" rotate="0,[COLOR=black]0,0,[/COLOR]0" scale="1[COLOR=black],1,[/COLOR]1" disable_cell_radius="2" stuff_id="0" />
Code:
<extra_stuff id="1" filename="object\snow\f_snow_guidace.ebm" min="-1[COLOR=black]70.87[/COLOR]3,-2[COLOR=black]5.311[/COLOR]2,-24[COLOR=black]4.72[/COLOR]7" max="2[COLOR=black]15.37[/COLOR]9,6[COLOR=black]50,17[/COLOR]2.7[COLOR=black]7[/COLOR]5" />
<extra_entity type="1" pos="11[COLOR=black]15,[/COLOR]0,3[COLOR=black]02[/COLOR]2" rotate="0,[COLOR=black]0.70[/COLOR]71[COLOR=black]07,0[/COLOR],0[COLOR=black].70710[/COLOR]7" scale="1[COLOR=black],1,1[/COLOR]" disable_cell_radius="1" stuff_id="1" name="extra_npc_000" npc_id="31" npc_tag="0" npc_type="7" />
Code:
<extra_stuff id="2" filename="Character\w1rune.ebm" min="-17[COLOR=black]0.87[/COLOR]3,-2[COLOR=black]5.31[/COLOR]12,-2[COLOR=black]44.72[/COLOR]7" max="2[COLOR=black]15.3[/COLOR]7[COLOR=black]9,65[/COLOR]0,17[COLOR=black]2.77[/COLOR]5" />
<extra_entity type="1" pos="1[COLOR=black]49[/COLOR]6[COLOR=black],0,434[/COLOR]5" rotate="0[COLOR=black],0,0[/COLOR],0" scale="1[COLOR=black],1,[/COLOR]1" disable_cell_radius="1" stuff_id="2" name="extra_npc_003" npc_id="35" npc_tag="0" npc_type="1" />
Code:
<extra_stuff id="3" filename="Character\w1agent.ebm" min="-17[COLOR=black]0.87[/COLOR]3,-2[COLOR=black]5.31[/COLOR]12,-2[COLOR=black]44.72[/COLOR]7" max="2[COLOR=black]15.3[/COLOR]7[COLOR=black]9,65[/COLOR]0,17[COLOR=black]2.77[/COLOR]5" />
<extra_entity type="1" pos="2[COLOR=black]338,12[/COLOR]7,1[COLOR=black]63[/COLOR]3" rotate="[COLOR=black]0,1,0,0[/COLOR]" scale="1[COLOR=black],1[/COLOR],1" disable_cell_radius="1" stuff_id="3" name="extra_npc_001" npc_id="32" npc_tag="0" npc_type="7"/>
Code:
<extra_stuff id="0" filename="object\object_fx\x-mas\x-mastree05.efx" min="-1[COLOR=black]70.87[/COLOR]3,-2[COLOR=black]5.31[/COLOR]12,-2[COLOR=black]44.7[/COLOR]27" max="21[COLOR=black]5.37[/COLOR]9,6[COLOR=black]50,1[/COLOR]72[COLOR=black].77[/COLOR]5" />
<extra_entity type="0" pos="8[COLOR=black]52[/COLOR]4,-1,2[COLOR=black]31[/COLOR]40" rotate="0[COLOR=black],0,0,[/COLOR]0" scale="1,1,1" disable_cell_radius="2" stuff_id="0" />
Code:
<extra_stuff id="0" filename="object\object_fx\x-mas\x-mastree05.efx" min="-1[COLOR=black]70.873[/COLOR],-[COLOR=black]25.31[/COLOR]1[COLOR=black]2,-[/COLOR]2[COLOR=black]44.7[/COLOR]27" max="2[COLOR=black]15.37[/COLOR]9,6[COLOR=black]50,17[/COLOR]2.7[COLOR=black]7[/COLOR]5" />
<extra_entity type="0" pos="2[COLOR=black]08[/COLOR]24,0,[COLOR=black]424[/COLOR]0" rotate="0,[COLOR=black]0,0,[/COLOR]0" scale="[COLOR=black]1,1,[/COLOR]1" disable_cell_radius="2" stuff_id="0" />
Code:
<extra_stuff id="1" filename="Character\w29etc17.EBM" min="-17[COLOR=black]0.87[/COLOR]3,-2[COLOR=black]5.31[/COLOR]12,-24[COLOR=black]4.72[/COLOR]7" max="2[COLOR=black]15.3[/COLOR]7[COLOR=black]9,65[/COLOR]0,1[COLOR=black]72.77[/COLOR]5" />
<extra_entity type="1" pos="1[COLOR=black]950[/COLOR]5,0,[COLOR=black]56[/COLOR]61" rotate="0[COLOR=black],0,0[/COLOR],0" scale="1[COLOR=black],1,1[/COLOR]" disable_cell_radius="1" stuff_id="1" name="extra_npc_002" npc_id="49" npc_tag="0" npc_type="7" />
--------
Added on Monday March 29th 2010
--------
For ppl who got problem with synchronizing client/server files. I made a tool (temporary) called "Cabal Enc Tool"
It will help you convert data of ENC to SCP and vice versa.
Here's its screenshot and a little of guide for using it.
1, ENC data here
2, Click to convert from ENC (text in #1) to SCP (fill #3 and #4 before click this)
3, NPC Id (must be integer, ex 4,5,7,35,...)
4, Item Index Start (value of 1st row of 1st column in SCP which will be generated)
5, Click to convert from SCP (text in #7) to ENC (no need to fill #3, #4)
6, SCP data column name
7, SCP data here
Get it here :
To view the content, you need to sign in or register
Note : You must have .Net Framework 2.0 in order to use this.
--------
Added on Monday April 5th 2010
--------
If you have problem with determining SlotIdx (position of item in NPC Shop), you can check this out :
Last edited:

