diff options
Diffstat (limited to 'npc/custom/quests/quest_shop.txt')
-rw-r--r-- | npc/custom/quests/quest_shop.txt | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt index 3f69c73ef..3395ac102 100644 --- a/npc/custom/quests/quest_shop.txt +++ b/npc/custom/quests/quest_shop.txt @@ -3,13 +3,21 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.6 +//= 1.6a //===== Compatible With: ===================================== //= Hercules //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. +//===== Additional Comments: ================================= +//= 1.0 Initial script. +//= 1.2 Added category support. +//= 1.3 More options and fixes. +//= 1.4 Added debug settings. +//= 1.5 Replaced categories with shop IDs. +//= 1.6 Added support for purchasing stackables. +//= 1.6a Added support for previewing costumes and robes. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. @@ -116,11 +124,11 @@ OnBuyItem: 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[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512)) && @qe[2] > 0) + 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))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { - switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[6])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { + switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; @@ -138,13 +146,14 @@ OnBuyItem: delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; - specialeffect2 699; + specialeffect2 EF_FLOWERLEAF; close; case 2: - setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), 1; - if (@qe[1] & 1) changelook LOOK_HEAD_BOTTOM, @qe[2]; - if (@qe[1] & 256) changelook LOOK_HEAD_TOP, @qe[2]; - if (@qe[1] & 512) changelook LOOK_HEAD_MID, @qe[2]; + setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; + if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; + else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; + else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; + else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; @@ -152,12 +161,13 @@ OnBuyItem: } OnEnd: - if (@qe[6]) { + if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; + changelook LOOK_ROBE, @qe[6]; } - deletearray @qe[0],7; + deletearray @qe[0],8; end; function Add { |