diff options
Diffstat (limited to 'world')
-rw-r--r-- | world/map/db/item_db_head.txt | 3 | ||||
-rw-r--r-- | world/map/npc/items/scentedcandle.txt | 31 | ||||
-rw-r--r-- | world/map/npc/scripts.conf | 1 |
3 files changed, 35 insertions, 0 deletions
diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt index 3d5185ab..c082e89f 100644 --- a/world/map/db/item_db_head.txt +++ b/world/map/db/item_db_head.txt @@ -196,3 +196,6 @@ 5209, TerraniteHead, 5, 30000, 3000, 500, 0, 16, 0, -30, 0, 2, 256, 0, 0, 0, {}, {bonus bMdef, 5; bonus bAgi, 3; bonus bDex, 1;} 5226, GroovyHat, 5, 3000, 1500, 20, 0, 13, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} 5227, JazzyHat, 5, 3000, 1500, 20, 0, 13, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} +5228, ChicSantaHat, 5, 400, 200, 20, 0, 2, 0, -2, 0, 2, 256, 0, 0, 0, {}, {} +//ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} +5229, ScentedCandleHelmet, 5, 20000, 1, 450, 0, 10, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bInt, 2; addtimer 1, "ScentedCandle::OnEquip";} diff --git a/world/map/npc/items/scentedcandle.txt b/world/map/npc/items/scentedcandle.txt new file mode 100644 index 00000000..ba29f3cf --- /dev/null +++ b/world/map/npc/items/scentedcandle.txt @@ -0,0 +1,31 @@ +-|script|ScentedCandle|32767 +{ + end; + +OnEquip: + if (@scented_candle == 1) end; + goto L_Check; + +OnCheck: + if (getequipid(equip_head) != 5229) goto L_Removed; + goto L_Check; + +L_Check: + set @scented_candle, 1; + foreach 2, getmap(), (POS_X - 12), (POS_Y - 12), (POS_X + 12), (POS_Y + 12), strnpcinfo(0) + "::OnMob"; + addtimer rand(2000), strnpcinfo(0) + "::OnCheck"; + end; + +OnMob: + if (target(BL_ID, @target_id, 0x20) != 0x20) end; // line of sight + if (get(Class, @target_id) != 1131 && // mana bug + get(Class, @target_id) != 1055 && // butterfly + get(Class, @target_id) != 1049 && // bee + get(Class, @target_id) != 1088) end; // hyvern + aggravate @target_id; + end; + +L_Removed: + set @scented_candle, 0; + end; +} diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index ba48049d..1b67d647 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -45,6 +45,7 @@ npc: npc/items/launcher_ammo.txt npc: npc/items/check_wand.txt npc: npc/items/mirror.txt npc: npc/items/rubber_bat.txt +npc: npc/items/scentedcandle.txt import: npc/_import.txt // magic |