artace.ru - творческий сектор

Название: Как создать предмет, спавнящий мобов/рб ENG [Версия для печати]

Автор: admin    Время: 2023-12-17 16:32
Название: Как создать предмет, спавнящий мобов/рб ENG
Good, after so many attempts, I managed to OFF spawn a rb using an ITEM, this method is not very seen in the current servers, that's why I decided to share this with you, I hope you can give me the credits <3.( k* q* i2 {0 Q* z* B$ U
2 W3 b$ e) A3 v1 j/ x) u
[attach]124[/attach]
, A8 d! S5 P$ Q! Z' l1 y" b/ L+ `8 a' e- y% e0 V
First of all, the first thing we all know is that there are many items or skills that spawn objects or summons, like the necro skills or the dragon flute, we will also find others in the ai.obj or in the base programming that have certain functions to spawn or summon.: J+ H1 N; O# Y$ T, g  E. y5 a

  Y5 @- K4 N7 @$ k; a2 V
( @9 g% B3 i. R5 ?1 y1 Q! cBut we forget that there is one that especially spawns an NPC for a certain time, and this code is dedicated to that, we are talking about the Christmas NPC, although it is actually an ITEM that spawns the Christmas NPC.
' q, p1 b7 _0 A* j* z9 K2 g0 r& l: X2 G/ e9 H
9 x; f3 p$ p3 x8 z$ E
6 b4 g* @0 Q( s* z
ID: 5560    ITEM NAME: Christmas Tree$ h# D- J9 s7 C" C. Y8 i8 o

/ R% R  ]+ E8 OOnce we know this, to know what type of skill this item uses, we go to ItemData.txt (located in script and press Ctrl + f, we look for the ID 5560, automatically all the information of this item will appear:$ ?5 J3 q$ L9 y. J) V; h5 o7 `
6 Y: I% `, X, i- B
item_begin    etcitem    5560    [x_mas_tree1]    item_type=etcitem    slot_bit_type={none}    armor_type=none    etcitem_type=potion    recipe_id=0    blessed=0    weight=0    default_action=action_skill_reduce    consume_type=consume_type_stackable    initial_count=1    maximum_count=20    soulshot_count=0    spiritshot_count=0    reduced_soulshot={}    reduced_spiritshot={}    reduced_mp_consume={}    immediate_effect=1    price=0    default_price=1    item_skill=[s_summon_x_mas_tree_a]   critical_attack_skill=[none]    attack_skill=[none]    magic_skill=[none]    item_skill_enchanted_four=[none]    material_type=paper    crystal_type=none    crystal_count=0    is_trade=1    is_drop=1    is_destruct=1    physical_damage=0    random_damage=0    weapon_type=none    can_penetrate=0    critical=0    hit_modify=0    avoid_modify=0    dual_fhit_rate=0    shield_defense=0    shield_defense_rate=0    attack_range=0    damage_range={}    attack_speed=0    reuse_delay=0    mp_consume=0    magical_damage=0    durability=0    damaged=0    physical_defense=0    magical_defense=0    mp_bonus=0    category={}    enchanted=0    html=[item_default.htm]    equip_pet={0}    magic_weapon=0    enchant_enable=0    can_equip_sex=-1    can_equip_race={}    can_equip_change_class=-1    can_equip_class={}    can_equip_agit=-1    can_equip_castle=-1    can_equip_castle_num={}    can_equip_clan_leader=-1    can_equip_clan_level=-1    can_equip_hero=-1    can_equip_nobless=-1    can_equip_chaotic=-1    item_end; `% V8 X# A  s5 E! G

! x7 c3 W8 p6 D8 }2 O% k: C6 S
Once we verify which skill is being used (marked in yellow above), we copy the name, in this case it is "item_skill=[s_summon_x_mas_tree_a]" -> "item_skill=[s_summon_x_mas_tree_a]". -> "s_summon_x_mas_tree_a", we make the same search process, but in this case we go to the file called "SkilData.txt", we open it and pressing Ctrl + F, we look for s_summon_x_mas_tree_a.
4 S9 {% s* z1 V  Z9 L8 S+ F  a$ [& i! C; k. V2 A, J/ Z/ U

+ R+ ~' l6 Z$ d) v5 I. y3 I6 s: eThis information will appear, it is important to clarify that this info is the creation of the skill and its effect;
8 s- h0 c  B7 `
, o4 `* ~0 n8 r; I5 Mskill_begin    skill_name=[s_summon_x_mas_tree_a]    /* [쁼뀘 킸났 삌큘] */    skill_id=2137    level=1    operate_type=A1    magic_level=1    effect={{i_summon_npc;[x_mas_tree_a];1}}    is_magic=0    mp_consume2=0    cast_range=-1    effective_range=-1    skill_hit_time=0    skill_cool_time=0    skill_hit_cancel_time=0    reuse_delay=0    attribute=attr_none    effect_point=0    target_type=self    affect_scope=single    affect_limit={0;0}    next_action=none    ride_state={@ride_none}    skill_end9 j3 S+ j& o, s' Y1 Y5 k
6 ~$ A, {4 ^4 `4 |! v

. x: m! ?9 O: V& L) o5 |% xOnce found, you will see that there is a part that says "effect", this would be what kind of call this skill makes, in this case, it is calling to spawn an NPC (you can check the id of the skills you want and look for them in this file, and you will see the effects), "effect={{i_summon_npc;[x_mas_tree_a];1}}".
3 m% L: m% M4 w# Y
, m  _2 [! P& r2 p0 L. [3 [) O0 w* I# d) C
effect= -> refers to the effect you are going to produce.  k6 f/ g. U; s6 ~" E* `1 q
{{i_summon_npc; -> refers to spawning an npc.
+ r4 }& _+ a, @' `; n5 E. m/ R[x_mas_tree_a];1 -> refers to the NPC id in square brackets and the ;1 refers to the amount.  3 [6 Q1 Y$ V" U2 \! z2 c3 ^$ U

  V  U/ V- z: w
7 m; R* n3 Q$ `0 C! ]0 @once verified this, now we have the base to spawn a mob, we will proceed to do the basics, create an item with filedit (itemname, skillgrp, skillname, etc), in this case I leave you the skillgrp/itemname/skillname:
8 [# d; {/ P2 ?4 j. A7 m. h, r4 G4 @& b8 `: r
EXAMPLES HOW:4 |3 ?& L2 X* [$ R& J: e
6 f: l& d+ w. ]8 m. l4 U0 ?; x1 K

3 h1 [. y& M! u8 R& h6 vskillgrp: 2138    1    0    0    -1    0    0.000000    0            icon.skill0000    0    0    0    0    -1    -1! G' K) _8 K( k! N# G4 F/ v
! u2 `1 r& p" a
skillname: 2138    1    Summon Special Boss    none    none    none
  t: D! U% m' O1 p) O, c4 @: u! U) m& x$ I: C, n- j
Itemname: 2138    Raid Boss - Random Bomb        Double-click to summon the Raid Boss. Beware: In case you move the raidboss into a peace zone, it will get despawned without warning!    -1                    0    0    0    8 a( a* T4 k4 [' C  J' F, o

$ i9 b2 f. D. E) H9 L9 Fetcgrp: 2    2138    0    3    5    6    0    dropitems.drop_jewel_box_m00            dropitemstex.drop_jewel_box_t00            Raidboss.Bomb                    0    1    18    0    0    1        1        ItemSound.itemdrop_jewelbox        2    0    0
1 ]/ k8 I- C- n- i. A4 ^
3 }" E. B  \$ F4 c* _$ d- u& X: l: G* D1 S% I/ l

. t5 v& w" y! D4 c8 n- \- Change the IDs, because they are ID ramdoms. -
7 }  T/ L! [$ L, m* K/ N( W
# a5 C$ h2 M$ S  h' X% f
3 ?7 [' X8 F+ {% n; u1 o; N! ]. nOnce this is done, we proceed to DATAPACK, where we will have to create the skill from 0 to work correctly, in my case, I replaced the id of the npc of the tree and it works correctly with that item. But in this case, what you should do, is to clone the skilldata of the tree and the itemdata, that is to say:+ P4 i: J- ?2 l' H* m

, g' P/ |7 V( P/ `2 S! R# l0 a; a( e3 u7 @

) B9 @& U' s4 n- t* \0 ZSKILLDATA:% y+ o: F4 k) d7 i0 l  T& G5 d
1 ^6 H* D2 B  f6 d, F& V: I

8 @! p0 }5 H7 t2 J) K# T% f! d7 d$ x! z& k1 C
skill_begin    skill_name=[s_Name_SKILL]    /* [ꃠꀉ 킸났 삌큘] */    [skill_id=ID_SKILL    level=1    operate_type=A1    magic_level=1    effect={{i_summon_npc;[x_mas_tree_b];1}}    is_magic=0    mp_consume2=0    cast_range=-1    effective_range=-1    skill_hit_time=0    skill_cool_time=0    skill_hit_cancel_time=0    reuse_delay=0    attribute=attr_none    effect_point=0    target_type=self    affect_scope=single    affect_limit={0;0}    next_action=none    ride_state={@ride_none}    skill_end
* C+ t. A( S' Q
1 J9 q5 v8 Y9 @+ i$ r% H- @; f! G4 x( ]) \/ @* K
# B" u- f; x$ W
ITEMDATA:
+ n3 I- [5 M! I5 p7 P9 N5 U+ ^, r6 M* X4 B) n7 e( P

+ b* z, c2 c: h  Q# `  T% I% `, M+ m
[code]item_begin    etcitem    (5560 ID ITEM)  [name_item]  item_type=etcitem    slot_bit_type={none}    armor_type=none    etcitem_type=potion    recipe_id=0    blessed=0    weight=0    default_action=action_skill_reduce    consume_type=consume_type_stackable    initial_count=1    maximum_count=20    soulshot_count=0    spiritshot_count=0    reduced_soulshot={}    reduced_spiritshot={}    reduced_mp_consume={}    immediate_effect=1    price=0    default_price=1    item_skill=[s_name_SKILL]    critical_attack_skill=[none]    attack_skill=[none]    magic_skill=[none]    item_skill_enchanted_four=[none]    material_type=paper    crystal_type=none    crystal_count=0    is_trade=1    is_drop=1    is_destruct=1    physical_damage=0    random_damage=0    weapon_type=none    can_penetrate=0    critical=0    hit_modify=0    avoid_modify=0    dual_fhit_rate=0    shield_defense=0    shield_defense_rate=0    attack_range=0    damage_range={}    attack_speed=0    reuse_delay=0    mp_consume=0    magical_damage=0    durability=0    damaged=0    physical_defense=0    magical_defense=0    mp_bonus=0    category={}    enchanted=0    html=[item_default.htm]    equip_pet={0}    magic_weapon=0    enchant_enable=0    can_equip_sex=-1    can_equip_race={}    can_equip_change_class=-1    can_equip_class={}    can_equip_agit=-1    can_equip_castle=-1    can_equip_castle_num={}    can_equip_clan_leader=-1    can_equip_clan_level=-1    can_equip_hero=-1    can_equip_nobless=-1    can_equip_chaotic=-1    item_end' h/ T( C+ S; X3 i( W

: F. i  P; M. K+ \2 E- F
4 B* g2 I! C/ V$ i5 |* Y/ F! Y! @- e' X: T* y* @$ {2 R) R, J
SKILLPCH Y SKILLPCH2:
( _4 [: n& F0 t  _3 D
! j1 N3 e2 l8 j4 L$ O$ `- ]% y% i& B7 O, W$ E4 m, h) L
You should copy the code of skilldata and put it in the "L2OFF GM PANEL", where you have it installed, you have a txt that is also called "skilldata.txt", there paste the code and save, after this, open the "L2OFF GM PANEL", touching the option of "PCH Editor" and that will open the generator, in which you click "skilldata".
2 m' Q) c4 j5 {" j" I3 U) Y0 o( j4 b/ E& B1 g0 m1 _1 O9 s3 o





Добро пожаловать artace.ru - творческий сектор (https://artace.ru/) Powered by Discuz! X3.5