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% I# U$ |" e4 q7 i
! F: `2 ], E4 s, ]; g# q5 P# P0 \
[attach]124[/attach]. q1 C; V5 z8 t8 M# D) o& j" s
) b) ^3 `- `, b
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.
, t: `7 C3 Q9 B. l
6 j0 [3 d0 E4 D% c* G! v8 n# u9 U# B# j5 Q/ F" @
But 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.% v9 }/ w, S2 Y
4 P5 _6 H& w3 H

: c# n6 j+ _) p) F
0 r. r& B, `( Q+ s, K7 w) vID: 5560    ITEM NAME: Christmas Tree& N/ r9 ~) x: x& k8 H7 W% O0 o7 Y& N

: a6 {+ ]" n6 P* w& q' |, [Once 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:
+ G! v0 z. N! ]; O' |: q1 [$ y* V5 V1 ?+ T# x
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
7 |8 y$ K4 h9 D  @
: y0 _4 t8 H, W8 q" n3 K. a$ S, a% f2 M2 j; u) Z1 e! U
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., l; A8 }& T6 v9 x
) R& g' A6 s9 v. h5 `0 N, _; o& s
- a3 c/ W! Z1 e0 K! c6 @% j
This information will appear, it is important to clarify that this info is the creation of the skill and its effect;* U1 o1 T2 n6 C% Z

+ J/ u! K  Z- @* @2 h9 o* xskill_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_end
) I2 f- `, c# P6 B
  O4 ?: ~6 U' u: P+ l# J2 P, N9 r; D( r( a# L5 ?# A6 ?
Once 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}}".
) O1 G2 m) |) U$ A
$ R* g$ _/ n, R& i+ C0 G7 w/ d& F/ `$ g: k
effect= -> refers to the effect you are going to produce.4 j3 _3 E' i& v
{{i_summon_npc; -> refers to spawning an npc.
) E4 `/ @, v$ w- [% ?# D2 }* S[x_mas_tree_a];1 -> refers to the NPC id in square brackets and the ;1 refers to the amount.  
. d) y& @8 @( N5 n  G1 M6 c
% W" a. K( z; I8 I
2 N0 a& P+ D0 ~/ v) @* T" Konce 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:- r" F- p3 j) d4 N

! ]+ |: J4 T# z% q9 H+ I$ MEXAMPLES HOW:
% }& e% V+ I5 T% R. m9 N& y5 o8 t
" y) Y# f# q$ V0 ^) h$ Y6 {
skillgrp: 2138    1    0    0    -1    0    0.000000    0            icon.skill0000    0    0    0    0    -1    -11 N' T6 X" M/ }2 z$ s! ^, H2 H

, P0 ?1 k7 J! D' t1 t, v) Uskillname: 2138    1    Summon Special Boss    none    none    none
9 W( r4 s4 W$ p+ J3 H$ c( F3 S% J  Z& F7 Z( A) Z
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    - C* y  ?! c2 D0 ?: D
# b+ S5 T2 J. G2 n7 V* C
etcgrp: 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
' L  J& C) C2 \, @( j/ \( ^% Y) ~( c4 I

9 [/ p: ?  W1 {9 W9 l
) ~$ |+ _- n9 Y: [# ~- Change the IDs, because they are ID ramdoms. -
/ T( C1 p( c- G6 @
  A* ^' h& u' `- W3 x/ Q
: g$ }. |& ^- j" o( cOnce 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:
/ k+ K8 B" D% }+ `4 @
6 @* S: S6 ~) t  F1 \
9 r5 Y% K( Y% q. [/ J/ \( d
* \$ [8 e$ E7 }( [* D4 k/ KSKILLDATA:
0 [  a: ~' @; h0 d; W8 ]& t( {' j- l+ h! L+ }6 Z1 K5 T5 R

$ v% w8 R; F  S! g
, l& Z! ]6 f1 ^; ~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. d2 b" v- |: Y4 c& L8 J

4 \" Y! m3 \7 s$ K; F4 N/ x9 w8 P. `, R2 R) ?5 R
3 E: s2 \9 s1 Y, Z4 }6 K3 j/ |- G
ITEMDATA:5 }! k4 }9 L/ y! n* y; k4 m2 S( Z
; `( R( ]  p  z( W- N9 t

6 \4 F1 A! x* s
2 G5 a3 c: J8 k- r8 @[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_end2 c+ m6 L/ r1 X8 R8 L% m  }2 t4 F0 Y

9 O+ p! ?5 M: M" b6 B7 F- F+ B( K0 M/ i: {+ ?7 d

, x% t4 B  i& U; R8 `SKILLPCH Y SKILLPCH2:
5 t6 b3 o2 n% d% X; j4 a" k8 r+ Q5 |6 Z9 U: g( b

; c2 ~. r" ?% n2 k% kYou 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".0 T. n; ^- j3 f% h, r# M0 {3 ]  z. r

, [0 Q7 N0 y4 X2 S. l




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