diff options
author | AtlantisRO <atlas@atlantis-ro.net> | 2017-01-18 00:36:32 -0700 |
---|---|---|
committer | AtlantisRO <atlas@atlantis-ro.net> | 2017-03-08 18:46:51 -0700 |
commit | 060c4ba50162363315f2f50b35cad931e2b75ec9 (patch) | |
tree | 14eea2a8bf638823be6364c494e8443cda21cba3 /npc/events/nguild | |
parent | 7d7b08b52250951da969e2680d10719a686dcd3c (diff) | |
download | hercules-060c4ba50162363315f2f50b35cad931e2b75ec9.tar.gz hercules-060c4ba50162363315f2f50b35cad931e2b75ec9.tar.bz2 hercules-060c4ba50162363315f2f50b35cad931e2b75ec9.tar.xz hercules-060c4ba50162363315f2f50b35cad931e2b75ec9.zip |
Removed the usage of deprecated command goto from npc scripts (except custom folder).
Signed-off-by: Ragno <ragno@atlantis-ro.net>
Diffstat (limited to 'npc/events/nguild')
-rw-r--r-- | npc/events/nguild/nguild_ev_agit.txt | 8 | ||||
-rw-r--r-- | npc/events/nguild/nguild_kafras.txt | 13 | ||||
-rw-r--r-- | npc/events/nguild/nguild_managers.txt | 56 |
3 files changed, 38 insertions, 39 deletions
diff --git a/npc/events/nguild/nguild_ev_agit.txt b/npc/events/nguild/nguild_ev_agit.txt index 99545bfff..9bb76f728 100644 --- a/npc/events/nguild/nguild_ev_agit.txt +++ b/npc/events/nguild/nguild_ev_agit.txt @@ -125,7 +125,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_alde","N01"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_alde","N01"; @@ -152,7 +152,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_gef","N02"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_gef","N02"; @@ -179,7 +179,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_pay","N03"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_pay","N03"; @@ -206,7 +206,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_prt","N04"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_prt","N04"; diff --git a/npc/events/nguild/nguild_kafras.txt b/npc/events/nguild/nguild_kafras.txt index 8b448bbe3..96371ec91 100644 --- a/npc/events/nguild/nguild_kafras.txt +++ b/npc/events/nguild/nguild_kafras.txt @@ -39,13 +39,12 @@ function script F_GKafra { cutin "kafra_01",2; @GID = getcastledata(getarg(0),1); - if (getcharid(CHAR_ID_GUILD) == @GID && getgdskilllv(@GID,10001)) goto L_StartG; - - mes "[Kafra Service]"; - mes "I am contracted to provide service only for the ^ff0000" + getguildname(@GID) + "^000000 Guild. Please use another Kafra Corporation staff member around here. I am Sorry for your inconvenience."; - cutin "",255; - close; -L_StartG: + if (getcharid(CHAR_ID_GUILD) != @GID || getgdskilllv(@GID,10001) < 1) { + mes "[Kafra Service]"; + mes "I am contracted to provide service only for the ^ff0000" + getguildname(@GID) + "^000000 Guild. Please use another Kafra Corporation staff member around here. I am Sorry for your inconvenience."; + cutin "",255; + close; + } @wrpP[0] = 200; @wrpD$[0] = getarg(1); setarray @wrpC$[0], @wrpD$[0]+" ^880000"+@wrpP[0]+"^000000 z", "Cancel", "", "", "",""; diff --git a/npc/events/nguild/nguild_managers.txt b/npc/events/nguild/nguild_managers.txt index 1d9b56966..a24a0cb15 100644 --- a/npc/events/nguild/nguild_managers.txt +++ b/npc/events/nguild/nguild_managers.txt @@ -63,7 +63,34 @@ function script F_GldManager { 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 (getcastledata(getarg(1),9) == 1) { + mes "Would you like to dismiss the current Kafra?"; + next; + 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; + } + 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; + } if (getgdskilllv(@GID,10001) == 0){ mes "Master, you don't have a contract with the Kafra Staff Company."; mes "In order to hire a Kafra, you must first learn the Guild skill ^5533FFContract With Kafra^000000."; @@ -97,33 +124,6 @@ function script F_GldManager { //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; - 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; - } - 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."; |