diff options
Diffstat (limited to 'npc/custom')
-rw-r--r-- | npc/custom/item_signer.txt | 2 | ||||
-rw-r--r-- | npc/custom/itembind.txt | 12 | ||||
-rw-r--r-- | npc/custom/quests/quest_shop.txt | 8 |
3 files changed, 9 insertions, 13 deletions
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt index a0097bb55..6c12926e5 100644 --- a/npc/custom/item_signer.txt +++ b/npc/custom/item_signer.txt @@ -78,7 +78,7 @@ prt_in,24,61,7 script Perchik 1_M_01,{ emotion e_hmm; close; } - if (getiteminfo(.@id,10)) { + if (getiteminfo(.@id, ITEMINFO_SLOTS) > 0) { mes "Sorry, I don't sign slotted items."; emotion e_sry; close; diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt index 8c51ad24d..7d95afdfc 100644 --- a/npc/custom/itembind.txt +++ b/npc/custom/itembind.txt @@ -35,14 +35,10 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{ //Allows equipment (default) or non-rental item if (@inventorylist_bound[.@i] || @inventorylist_expire[.@i]) continue; - if (((.allowbind & 1) && (getiteminfo(@inventorylist_id[.@i], 2) == IT_WEAPON || getiteminfo(@inventorylist_id[.@i], 2) == IT_ARMOR)) || - ((.allowbind & 2) && - (getiteminfo(@inventorylist_id[.@i], 2) == IT_HEALING || getiteminfo(@inventorylist_id[.@i], 2) == IT_USABLE || - getiteminfo(@inventorylist_id[.@i], 2) == IT_DELAYCONSUME || getiteminfo(@inventorylist_id[.@i], 2) == IT_CASH)) || - ((.allowbind & 4) && - (getiteminfo(@inventorylist_id[.@i], 2) == IT_ETC || getiteminfo(@inventorylist_id[.@i], 2) == IT_CARD || - getiteminfo(@inventorylist_id[.@i], 2) == IT_PETEGG || getiteminfo(@inventorylist_id[.@i], 2) == IT_PETARMOR || - getiteminfo(@inventorylist_id[.@i], 2) == IT_AMMO)) + .@itemtype = getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE); + if (((.allowbind & 1) != 0 && (.@itemtype == IT_WEAPON || .@itemtype == IT_ARMOR)) + || ((.allowbind & 2) != 0 && (.@itemtype == IT_HEALING || .@itemtype == IT_USABLE || .@itemtype == IT_DELAYCONSUME || .@itemtype == IT_CASH)) + || ((.allowbind & 4) != 0 && (.@itemtype == IT_ETC || .@itemtype == IT_CARD || .@itemtype == IT_PETEGG || .@itemtype == IT_PETARMOR || .@itemtype == IT_AMMO)) ) { set .@bindlist$, .@bindlist$ + ":" + getitemname(@inventorylist_id[.@i]) + " - " + @inventorylist_id[.@i]; set .@bindlist[.@j],.@i; diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt index 6805220f7..739b53c02 100644 --- a/npc/custom/quests/quest_shop.txt +++ b/npc/custom/quests/quest_shop.txt @@ -121,8 +121,8 @@ OnBuyItem: if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; - setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); - if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192))) + setarray @qe[1], getiteminfo(.@q[0], ITEMINFO_LOC), getiteminfo(.@q[0], ITEMINFO_VIEWSPRITE); + if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT))) set .@preview,1; addtimer 1000, strnpcinfo(NPC_NAME)+"::OnEnd"; while(1) { @@ -135,7 +135,7 @@ OnBuyItem: } if (!checkweight(.@q[0],.@q[2])) { mes "[Quest Shop]"; - mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; + mes "^FF0000You need "+(((.@q[2] * getiteminfo(.@q[0], ITEMINFO_WEIGHT)) + Weight - MaxWeight) / 10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) Zeny -= (.@q[4]*.@q[1]); @@ -198,7 +198,7 @@ function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; - case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; + case 2: if (getiteminfo(getarg(0), ITEMINFO_TYPE) == IT_WEAPON || getiteminfo(getarg(0), ITEMINFO_TYPE) == IT_ARMOR) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } |