summaryrefslogtreecommitdiff
path: root/npc/events/nguild
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-10-19 00:47:39 +0200
committerHaru <haru@dotalux.com>2014-10-27 01:06:10 +0100
commitbf9e067bf1e5c6bc15d313e0a197fd8f4b2ec131 (patch)
tree6a24e8f20a33f08dbbf6bba185e6842d650fcd50 /npc/events/nguild
parent8bb00782225e2f04f61863832a6c27d512b551b5 (diff)
downloadhercules-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/nguild')
-rw-r--r--npc/events/nguild/nguild_managers.txt121
1 files changed, 53 insertions, 68 deletions
diff --git a/npc/events/nguild/nguild_managers.txt b/npc/events/nguild/nguild_managers.txt
index d6ecfbf2f..039ba9ee1 100644
--- a/npc/events/nguild/nguild_managers.txt
+++ b/npc/events/nguild/nguild_managers.txt
@@ -42,11 +42,8 @@ function script F_GldManager {
mes "Welcome Master ^5533FF" + getguildmaster(@GID) + "^000000 ! I will assist you in any way I can!";
next;
- menu "Kafra Staff Employment / Dismissal",M_Kaf, "Enter Treasure Room",M_Treas, "Cancel",M_End;
-
- //===========================
- M_Kaf:
- //======
+ switch (select("Kafra Staff Employment / Dismissal","Enter Treasure Room","Cancel")) {
+ case 1: // Employment / Dismissal
mes "[ "+getarg(0)+" ]";
if (getcastledata(getarg(1),9) == 1) goto L_Dismiss;
if (getgdskilllv(@GID,10001) == 0){
@@ -58,90 +55,78 @@ function script F_GldManager {
L_Hire:
mes "Would you like to employ the services of a Kafra? You will need ^5533FF10,000 Zeny^000000 to do so... ";
next;
- menu "Employ Kafra.",-,"Cancel",sM_KafEnd;
-
- mes "[ "+getarg(0)+" ]";
- if (Zeny < 10000){
- mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
- return;
- }
- Zeny -= 10000;
- enablenpc "Kafra Staff#"+getarg(4);
- setcastledata getarg(1),9,1;
- mes "You have created a contract with the Kafra Staff Company.";
- next;
- cutin "kafra_01",2;
- mes "[ Kafra Staff ]";
- mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
- next;
- cutin "kafra_01",255;
- mes "[ "+getarg(0)+" ]";
- //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
- mes "I think the Kafra Staff will benefit our guild members.";
- return;
-
- sM_KafEnd:
+ if (select("Employ Kafra.","Cancel") != 1) {
mes "[ "+getarg(0)+" ]";
mes "As you wish Master. But I suggest we get a Kafra as soon as possible!";
return;
-
+ }
+ mes "[ "+getarg(0)+" ]";
+ if (Zeny < 10000) {
+ mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
+ return;
+ }
+ Zeny -= 10000;
+ enablenpc "Kafra Staff#"+getarg(4);
+ setcastledata getarg(1),9,1;
+ mes "You have created a contract with the Kafra Staff Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Staff ]";
+ mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
+ mes "I think the Kafra Staff will benefit our guild members.";
+ return;
L_Dismiss:
mes "Would you like to dismiss the current Kafra?";
next;
- menu "Dismissal",-,"Cancel",sM_KafEnd2;
-
- cutin "kafra_01",2;
- mes "[ Kafra Staff ]";
- mes "Have I done anything wrong? If I did, will you please forgive me?";
- next;
- menu "Dismiss",-,"Cancel",ssM_KafEnd2;
-
- mes "[ Kafra Staff ]";
- mes "It's unfortunate that I won't be able to serve your guild anymore....";
- next;
- disablenpc "Kafra Staff#"+getarg(4);
- setcastledata getarg(1),9,0;
- cutin "kafra_01",255;
- mes "[ "+getarg(0)+" ]";
- mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
- return;
- ssM_KafEnd2:
- mes "[ Kafra Staff ]";
- mes "Thank you master, I'll do my best! ^^.";
- cutin "kafra_01",255;
- return;
- sM_KafEnd2:
+ if (select("Dismissal","Cancel") != 1) {
mes "[ "+getarg(0)+" ]";
mes "Master, I think you should keep the current Kafra Staff because she is already trying her best to serve us";
return;
-
- //=========================
- M_Treas:
- //========
+ }
+ cutin "kafra_01",2;
+ mes "[ Kafra Staff ]";
+ mes "Have I done anything wrong? If I did, will you please forgive me?";
+ next;
+ if (select("Dismiss","Cancel") != 1) {
+ mes "[ Kafra Staff ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ return;
+ }
+ mes "[ Kafra Staff ]";
+ mes "It's unfortunate that I won't be able to serve your guild anymore....";
+ next;
+ disablenpc "Kafra Staff#"+getarg(4);
+ setcastledata getarg(1),9,0;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
+ return;
+ case 2: // Enter Treasure Room
mes "[ "+getarg(0)+" ]";
mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room.";
next;
- menu "Enter Treasure room.",-,"Cancel",sM_TresEnd;
-
+ if (select("Enter Treasure room.","Cancel") == 1) {
mes "[ "+getarg(0)+" ]";
mes "Please follow me through the secret passage way.";
mes "You must pull down on the secret switch in order to get out.";
next;
warp getarg(1),getarg(2),getarg(3);
return;
- sM_TresEnd:
- mes "[ "+getarg(0)+" ]";
- mes "The goods are produced everyday.";
- mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
- return;
-
-
- //==========================
- M_End:
- //=======
+ }
+ mes "[ "+getarg(0)+" ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ return;
+ default: // Cancel
mes "[ "+getarg(0)+" ]";
mes "As you wish, master.";
return;
+ }
}
// Castle 1 ==================================================================================