diff options
author | mekolat <mekolat@gmail.com> | 2014-11-27 00:55:10 -0500 |
---|---|---|
committer | mekolat <mekolat@gmail.com> | 2014-11-27 00:55:10 -0500 |
commit | 6771c849002bcb7f1e990b355c2ce8d3ec43ea4f (patch) | |
tree | 685ea12235b33720cdb5fe99fbdbe70941cd3c79 | |
parent | de846d448163f265a66e707624dcc04545826342 (diff) | |
download | serverdata-6771c849002bcb7f1e990b355c2ce8d3ec43ea4f.tar.gz serverdata-6771c849002bcb7f1e990b355c2ce8d3ec43ea4f.tar.bz2 serverdata-6771c849002bcb7f1e990b355c2ce8d3ec43ea4f.tar.xz serverdata-6771c849002bcb7f1e990b355c2ce8d3ec43ea4f.zip |
fix cryptitem script
-rw-r--r-- | world/map/db/head_item_db.txt | 6 | ||||
-rw-r--r-- | world/map/npc/items/cryptitem.txt | 61 |
2 files changed, 14 insertions, 53 deletions
diff --git a/world/map/db/head_item_db.txt b/world/map/db/head_item_db.txt index be2609fe..eff7db34 100644 --- a/world/map/db/head_item_db.txt +++ b/world/map/db/head_item_db.txt @@ -180,6 +180,6 @@ 4032, PanHat, Pan Hat, 5, 1000, 500, 400, 0, 13, 0, -20, 0, 2, 256, 0, 0, 0, {}, {} 4033, ChefHat, Chef Hat, 5, 1000, 500, 30, 0, 2, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} 4042, RedNose, Red Nose, 5, 4000, 1000, 4, 0, 2, 0, 7, 0, 2, 256, 0, 0, 0, {}, {} -5128, DarkHelm, DarkHelm, 5, 50000, 25000, 900, 0, 17, 0, -80, 0, 2, 256, 0, 0, 0, {}, {set@minLvl, 80; callfunc "CryptItem";} -5129, UnderworldMask, UnderworldMask, 5, 50000, 25000, 100, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {set@minLvl, 80; bonus bAgi, 1; callfunc "CryptItem";} -5130, Phylactery, Phylactery, 5, 50000, 25000, 20, 0, 1, 0, 5, 0, 2, 256, 0, 0, 0, {}, {set@minLvl, 80; bonus bInt, 1; callfunc "CryptItem";} +5128, DarkHelm, DarkHelm, 5, 50000, 25000, 900, 0, 17, 0, -80, 0, 2, 256, 0, 80, 0, {}, {callfunc "CryptItem";bonus bStr,3;bonus bVit,1;bonus bLuk,1;} +5129, UnderworldMask, UnderworldMask, 5, 50000, 25000, 100, 0, 3, 0, 0, 0, 2, 256, 0, 80, 0, {}, {bonus bAgi,1;callfunc "CryptItem";bonus bAgi,2;bonus bDex,1;bonus bLuk,1;} +5130, Phylactery, Phylactery, 5, 50000, 25000, 20, 0, 1, 0, 5, 0, 2, 256, 0, 80, 0, {}, {bonus bInt,1;callfunc "CryptItem";bonus bVit,2;bonus bInt,2;} diff --git a/world/map/npc/items/cryptitem.txt b/world/map/npc/items/cryptitem.txt index 7f8a1fed..e45ebaad 100644 --- a/world/map/npc/items/cryptitem.txt +++ b/world/map/npc/items/cryptitem.txt @@ -1,56 +1,17 @@ // Script to boost Dark Helm, Underworld Mask and Phylactery when those are equipped while being in Graveyard or Crypt. function|script|CryptItem { - if (isin("027-1.gat", 0, 0, 0, 0)) // Graveyard - goto L_ItemCheck; - if (isin("027-2.gat", 0, 0, 0, 0)) // Graveyard Inn - goto L_ItemCheck; - if (isin("027-3.gat", 0, 0, 0, 0)) // Crypt Level 1 - goto L_ItemCheck; - if (isin("027-4.gat", 0, 0, 0, 0)) // Crypt Level 2 - goto L_ItemCheck; - if (isin("027-5.gat", 0, 0, 0, 0)) // Crypt Level 3 - goto L_ItemCheck; - if (isin("027-6.gat", 0, 0, 0, 0)) // Crypt Miniboss 1 - goto L_ItemCheck; - if (isin("027-7.gat", 0, 0, 0, 0)) // Crypt Miniboss 2 - goto L_ItemCheck; - if (isin("027-8.gat", 0, 0, 0, 0)) // Crypt Miniboss 3 - goto L_ItemCheck; - if (isin("070-1.gat", 0, 0, 0, 0)) // Underworld - goto L_ItemCheck; - if (isin("070-2.gat", 0, 0, 0, 0)) // Underworld Indoors - goto L_ItemCheck; - if (isin("070-3.gat", 0, 0, 0, 0)) // Reaper Battle - goto L_ItemCheck; - goto L_End; + cleararray @crypt_maps$, "", getarraysize(@crypt_maps$); + setarray @crypt_maps$, "027-1", "027-2", "027-3", "027-4", "027-5", "027-6", "027-7", "027-8", "070-1", "070-2", "070-3"; + set @loop, 0; + goto L_Loop; -L_ItemCheck: - if (getequipid(equip_head) == 5128) - goto L_BoostDarkHelm; - if (getequipid(equip_head) == 5129) - goto L_BoostUnderworldMask; - if (getequipid(equip_head) == 5130) - goto L_BoostPhylactery; - goto L_End; +L_Loop: + if(@crypt_maps$[@loop] == getmap()) goto L_Return; + set @loop, @loop + 1; + if(@loop == getarraysize(@crypt_maps$)) end; + goto L_Loop; -L_BoostDarkHelm: - bonus bStr, 3; - bonus bVit, 1; - bonus bLuk, 1; - goto L_End; - -L_BoostUnderworldMask: - bonus bAgi, 2; - bonus bDex, 1; - bonus bLuk, 1; - goto L_End; - -L_BoostPhylactery: - bonus bVit, 2; - bonus bInt, 2; - goto L_End; - -L_End: - end; +L_Return: + return; } |