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.
* R6 X5 n) H* _; p9 e
6 d0 S1 ~, g+ v* Y9 W  P[attach]124[/attach]7 ]4 g% v6 W  \* Y; J; ^0 R& y1 B
0 `4 v$ ^# j4 G
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.
+ X5 s3 r6 K8 S2 W3 X' A5 y& }, p: ?" p* F/ F: q& x5 B7 s
" H# C6 x* \* L0 u
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.9 E) r/ e$ L/ x" t
) p. L3 |% t# E6 H& m# T  T; O, p

, k9 @* ?8 w0 D/ o) d  n. p; L: s% n
2 O1 \  }7 v( o! @ID: 5560    ITEM NAME: Christmas Tree. {+ K, T  V* K  g
& }% {$ G/ N! @% O3 V+ I
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:
4 y4 S2 u4 U# s" {+ |; G. [9 I  e1 v* K  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. f- [5 ]8 m- q/ o3 ^* C& n

! a$ d3 @1 @" B# u! x- y2 t9 V& l0 L& G4 K  L
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.
# G3 a* W3 C- N; @
- A% y0 @% ?7 r1 C4 {7 V- q( ~# T- ^7 Z. @0 k1 W
This information will appear, it is important to clarify that this info is the creation of the skill and its effect;& _& p5 h& |8 q: J
: b- A7 s- B' L& ^( e# O( W
skill_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& o; b- ]8 @7 y3 h! D( c: z
) s" I; S/ o/ @) U

% ?3 {: H* \& H; ]" E( h5 e6 kOnce 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}}".
- x3 d1 l* {- m( K  d4 T: I8 L( w, o! c' f$ D/ g4 ~2 ^

! R3 l# P$ c: ?effect= -> refers to the effect you are going to produce.
$ G1 x3 d! W" d" I& Y6 ~  v0 l, d1 i{{i_summon_npc; -> refers to spawning an npc.
, Q& p/ x% u3 x, \2 L" R8 n[x_mas_tree_a];1 -> refers to the NPC id in square brackets and the ;1 refers to the amount.  6 z/ ~. J: a# k5 q
' ~, ^2 V7 E# P" \

+ D8 h, l* c$ y6 Honce 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:
- h! u, u3 Z% Z6 i1 E& M
- c5 i4 L7 N2 ^" U. t- S* [EXAMPLES HOW:
' d" c+ W7 J% _, }
- [' w" m  I' _
9 f) |# z' _3 y! U3 Xskillgrp: 2138    1    0    0    -1    0    0.000000    0            icon.skill0000    0    0    0    0    -1    -1
- I& o  f; u- ?3 `. ~  O3 f8 \; j+ Y, w& x& j5 R* k5 }
skillname: 2138    1    Summon Special Boss    none    none    none
: I6 d5 s/ M+ R) B" }
  z# M9 U. s5 C9 c# G5 ?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   
5 z. f( `& n* r: ?2 E8 r# I- ~  A' t9 E6 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    02 K% L1 F: ]5 V' r+ `+ W
3 K8 ^+ s5 }! B. [! d6 |* o+ H4 d
  P0 a. p* F4 S
! p( m: H- X7 U! I
- Change the IDs, because they are ID ramdoms. -8 j3 y" Q5 O/ Q* b

1 y) t  V' F# F; h+ h% {  s, _( p9 C' |
Once 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:. T) K% J5 e/ Y' P( N; t$ {- E
; a' i5 x, q1 n4 J: |' ]: E
: j, A$ n: P9 r' ], J8 n
# _. \" n( d' W; Q
SKILLDATA:
1 }! Q, ]1 P& K+ ?; |. t9 h* Z) x
& [3 e0 D, d+ U3 e% F1 Z. @; e; [9 N8 D# E
. r; J) I, [3 |! L+ V8 v: B
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
) ?+ ]0 W9 c2 F
( i1 J3 L7 Y) d3 F- A1 C  H6 k
& N5 i+ K5 y' Y% }% I  S9 Z
6 @. u2 ^5 \: Q) H# T. yITEMDATA:
" {* j: {* O0 [8 |% E( d  s+ x  K
4 f2 F6 z: j2 z/ d( L* t9 J5 E. h) k& O7 n5 o
& H6 q& O* T* V1 N/ ~
[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
. y* h9 }: _* V" i' R$ ?( d8 B  t. R% d6 C  r& w

) g; }, N* i, z0 z0 l/ g4 c5 d5 V$ Y6 d% L* N' d
SKILLPCH Y SKILLPCH2:
. h$ x$ h# ^( f' v; N0 g
, H$ v& |4 t# L7 s, j, Q7 j8 S1 e8 P/ T9 i$ I/ R
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".
+ D# c# G& R7 k+ t3 Q& t6 p, v
: U4 M8 e4 [" w2 C




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