diff options
author | Haru <haru@dotalux.com> | 2014-10-19 00:47:39 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-10-27 01:06:10 +0100 |
commit | bf9e067bf1e5c6bc15d313e0a197fd8f4b2ec131 (patch) | |
tree | 6a24e8f20a33f08dbbf6bba185e6842d650fcd50 /npc/events/dumplingfestival.txt | |
parent | 8bb00782225e2f04f61863832a6c27d512b551b5 (diff) | |
download | hercules-bf9e067bf1e5c6bc15d313e0a197fd8f4b2ec131.tar.gz hercules-bf9e067bf1e5c6bc15d313e0a197fd8f4b2ec131.tar.bz2 hercules-bf9e067bf1e5c6bc15d313e0a197fd8f4b2ec131.tar.xz hercules-bf9e067bf1e5c6bc15d313e0a197fd8f4b2ec131.zip |
Removed use of 'menu' from official (non-custom) scripts
- Some scripts were partly refactored/rewritten to use a more modern
coding style (and to fix some issues)
- Note: the 'menu' command will be deprecated soon in favor of 'select'
and 'prompt'.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/events/dumplingfestival.txt')
-rw-r--r-- | npc/events/dumplingfestival.txt | 72 |
1 files changed, 30 insertions, 42 deletions
diff --git a/npc/events/dumplingfestival.txt b/npc/events/dumplingfestival.txt index 6c5a3b6b5..23a085eb8 100644 --- a/npc/events/dumplingfestival.txt +++ b/npc/events/dumplingfestival.txt @@ -21,60 +21,48 @@ payon,93,81,4 script Exorcist Master Fahae 4_M_BUDDHIST,{ mes "I feel it is time I let another warrior try to complete"; mes "my quest. I have some items to assist you in my quest."; next; - menu "I wish to buy",-, "No thanks",M_FIN; - + if (select("I wish to buy","No thanks") != 1) { + mes "[Exorcist Master Fahae]"; + mes "The path of fully venquishing evil is far, help me in the way of God."; + close; + } mes "[Exorcist Master Fahae]"; mes "I have 2 items which might become useful to you."; next; - menu "Realgar Wine",-, "Exorcize Herb",M_HERB; - + switch (select("Realgar Wine","Exorcize Herb")) { + case 1: + .@itemid = Realgar_Wine; // 682 + .@price = 20000; + break; + case 2: + .@itemid = Exorcize_Herb; // 683 + .@price = 10000; + break; + } mes "[Exorcist Master Fahae]"; mes "How many do you require?"; mes "You may only buy 5 at one time."; - mes "Each costs 20000z."; + mes "Each costs "+ .@price +"z."; mes "(Type in 0 to cancel)"; next; input @input; - if(@input==0) close; - if(@input>5) goto L_SORRY; - if(Zeny< @input*20000) goto L_NoZeny; - Zeny -= 20000*@input; - getitem 682,@input; + if (@input == 0) + close; + if (@input > 5) { + mes "[Exorcist Master Fahae]"; + mes "You must not be stingy, it is the path of God to be honest."; + close; + } + if (Zeny < @input * .@price) { + mes "[Exorcist Master Fahae]"; + mes "Money doesn't bring joy to everyone, but we need it to support the temple and myself. Please, try to kill some monsters and take their drops."; + close; + } + Zeny -= @input * .@price; + getitem .@itemid, @input; mes "[Exorcist Master Fahae]"; mes "Here you go, I hope you may succeed in my quest."; close; - -L_SORRY: - mes "[Exorcist Master Fahae]"; - mes "You must not be stingy, it is the path of God to be honest."; - close; - -M_FIN: - mes "[Exorcist Master Fahae]"; - mes "The path of fully venquishing evil is far, help me in the way of God."; - close; - -M_HERB: - mes "[Exorcist Master Fahae]"; - mes "How many do you require?"; - mes "You may only buy 5 at one time."; - mes "Each costs 10000z."; - mes "(Type in 0 to cancel)"; - next; - input @input; - if(@input==0) close; - if(@input>5) goto L_SORRY; - if(Zeny< @input*10000) goto L_NoZeny; - Zeny -= 10000*@input; - getitem 683,@input; - mes "[Exorcist Master Fahae]"; - mes "Here you go, I hope you may succeed in my quest."; - close; - -L_NoZeny: - mes "[Exorcist Master Fahae]"; - mes "Money doesn't bring joy to everyone, but we need it to support the temple and myself. Please, try to kill some monsters and take their drops."; - close; } // Monsters |