diff options
Diffstat (limited to 'npc/events/nguild')
-rw-r--r-- | npc/events/nguild/nguild_dunsw.txt | 2 | ||||
-rw-r--r-- | npc/events/nguild/nguild_ev_agit.txt | 34 | ||||
-rw-r--r-- | npc/events/nguild/nguild_flags.txt | 2 | ||||
-rw-r--r-- | npc/events/nguild/nguild_kafras.txt | 6 | ||||
-rw-r--r-- | npc/events/nguild/nguild_managers.txt | 123 | ||||
-rw-r--r-- | npc/events/nguild/nguild_treas.txt | 18 |
6 files changed, 85 insertions, 100 deletions
diff --git a/npc/events/nguild/nguild_dunsw.txt b/npc/events/nguild/nguild_dunsw.txt index 9b24c50b6..f768405d7 100644 --- a/npc/events/nguild/nguild_dunsw.txt +++ b/npc/events/nguild/nguild_dunsw.txt @@ -14,7 +14,7 @@ //================================================== function script F_GldDunSw { - set .@GID, getcastledata(getarg(0),1); + .@GID = getcastledata(getarg(0),1); if (.@GID == 0) { mes "[ Echoing Voice ]"; mes " ' The one who can overcome an ordeal and show true bravery... will find the way... ' "; diff --git a/npc/events/nguild/nguild_ev_agit.txt b/npc/events/nguild/nguild_ev_agit.txt index 097abb53c..5461bb975 100644 --- a/npc/events/nguild/nguild_ev_agit.txt +++ b/npc/events/nguild/nguild_ev_agit.txt @@ -16,10 +16,10 @@ // Function for OnAgitStart ========================================= function script F_AgitStart { - set .@map$, getarg(0); - set .@castle$, getarg(1); - set .@empx, getarg(2); - set .@empy, getarg(3); + .@map$ = getarg(0); + .@castle$ = getarg(1); + .@empx = getarg(2); + .@empy = getarg(3); maprespawnguildid .@map$,getcastledata(.@map$,1),2; monster .@map$,.@empx,.@empy,"Emperium",1288,1,"Agit_"+.@castle$+"::OnAgitBreak"; @@ -30,8 +30,8 @@ function script F_AgitStart { // Function for OnGuildBreak ====================================== function script F_GuildBreak { - set .@map$, getarg(0); - set .@castle$, getarg(1); + .@map$ = getarg(0); + .@castle$ = getarg(1); killmonsterall .@map$; @@ -44,18 +44,18 @@ function script F_GuildBreak { // Function for OnAgitBreak ====================================== function script F_AgitBreak { - set .@map$, getarg(0); - set .@castle$, getarg(1); + .@map$ = getarg(0); + .@castle$ = getarg(1); - set .@GID,getcharid(2); + .@GID = getcharid(2); if (.@GID <= 0) return; - set .@Economy,getcastledata(.@map$,2) - 5; - if (.@Economy < 0) set .@Economy, 0; + .@Economy = getcastledata(.@map$,2) - 5; + if (.@Economy < 0) .@Economy = 0; setcastledata .@map$, 2, .@Economy; - set .@defence,getcastledata(.@map$,3) - 5; - if (.@defence < 0) set .@defence, 0; + .@defence = getcastledata(.@map$,3) - 5; + if (.@defence < 0) .@defence = 0; setcastledata .@map$, 3, .@defence; setcastledata .@map$,1, .@GID; @@ -66,12 +66,12 @@ function script F_AgitBreak { disablenpc "Kafra Staff#"+.@castle$; // remove investment data and kafra - for( set .@i, 4; .@i <= 9; set .@i, .@i+1 ) + for (.@i = 4; .@i <= 9; ++.@i) setcastledata .@map$, .@i, 0; // if the new guild doesn't have Guardian Research, erase guardians if( getgdskilllv(.@GID,10002) == 0 ) - for( set .@i, 10; .@i <= 17; set .@i, .@i+1 ) + for (.@i = 10; .@i <= 17; ++.@i) setcastledata .@map$, .@i, 0; return; @@ -80,8 +80,8 @@ function script F_AgitBreak { // Function for OnAgitEnd ====================================== function script F_AgitEnd { - set .@map$, getarg(0); - set .@castle$, getarg(1); + .@map$ = getarg(0); + .@castle$ = getarg(1); gvgoff .@map$; // Disable the following if statment to keep empty diff --git a/npc/events/nguild/nguild_flags.txt b/npc/events/nguild/nguild_flags.txt index 8c629adf9..dcd3dbc14 100644 --- a/npc/events/nguild/nguild_flags.txt +++ b/npc/events/nguild/nguild_flags.txt @@ -16,7 +16,7 @@ /// Flag Function //============================================================ function script F_Flags { - set .@GID, getcastledata(getarg(1),1); + .@GID = getcastledata(getarg(1),1); if (getarg(5) == 0) return; if (.@GID == 0) { mes " [ Edict of the Divine Rune Midgard Kingdom ]"; diff --git a/npc/events/nguild/nguild_kafras.txt b/npc/events/nguild/nguild_kafras.txt index 100751f7a..89570fe6d 100644 --- a/npc/events/nguild/nguild_kafras.txt +++ b/npc/events/nguild/nguild_kafras.txt @@ -16,7 +16,7 @@ function script F_GKafra { cutin "kafra_01",2; - set @GID, getcastledata(getarg(0),1); + @GID = getcastledata(getarg(0),1); if (getcharid(2) == @GID && getgdskilllv(@GID,10001)) goto L_StartG; mes "[Kafra Service]"; @@ -24,8 +24,8 @@ function script F_GKafra { cutin "",255; close; L_StartG: - set @wrpP[0], 200; - set @wrpD$[0], getarg(1); + @wrpP[0] = 200; + @wrpD$[0] = getarg(1); setarray @wrpC$[0], @wrpD$[0]+" ^880000"+@wrpP[0]+"^000000 z", "Cancel", "", "", "",""; callfunc "F_Kafra",2,0,0,0,800; end; diff --git a/npc/events/nguild/nguild_managers.txt b/npc/events/nguild/nguild_managers.txt index d6ecfbf2f..015ef20fd 100644 --- a/npc/events/nguild/nguild_managers.txt +++ b/npc/events/nguild/nguild_managers.txt @@ -23,7 +23,7 @@ //============================================== function script F_GldManager { - set @GID, getcastledata(getarg(1),1); + @GID = getcastledata(getarg(1),1); mes "[ "+getarg(0)+" ]"; if (@GID == 0){ mes "I am waiting for my master. Brave adventurer, follow your destiny!"; @@ -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 ================================================================================== diff --git a/npc/events/nguild/nguild_treas.txt b/npc/events/nguild/nguild_treas.txt index 750eab88a..7a7cd64c8 100644 --- a/npc/events/nguild/nguild_treas.txt +++ b/npc/events/nguild/nguild_treas.txt @@ -39,7 +39,7 @@ function script F_GldTreas { //sets the counter variable = to the box number amount set getarg(3), getarg(2); } - for (set .@i,1; .@i <= getarg(3) ; set .@i,.@i+1) { + for (.@i = 1; .@i <= getarg(3); ++.@i) { // set treasure box ID set getarg(4), getarg(5) + (.@i+1) % 2; areamonster getarg(0),getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied"; @@ -71,13 +71,13 @@ OnRecvCastleN01: end; OnInit: if($boxNumN01 == 0) end; - set $@bxN01, $boxNumN01; + $@bxN01 = $boxNumN01; callfunc "F_GldTreas","nguild_alde","N01",$boxNumN01,$@bxN01,$@boxIdN01,1324+rand(10),114,218,123,227,1; end; OnDied: mapannounce "nguild_alde","Treasure Chest Broken Open",17; - set $boxNumN01, $boxNumN01 -1; + --$boxNumN01; if($boxNumN01 == 0) mapannounce "nguild_alde", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0; end; } @@ -97,13 +97,13 @@ OnRecvCastleN02: end; OnInit: if($boxNumN02 == 0) end; - set $@bxN02, $boxNumN02; + $@bxN02 = $boxNumN02; callfunc "F_GldTreas","nguild_gef","N02",$boxNumN02,$@bxN02,$@boxIdN02,1334+rand(10),150,108,158,114,1; end; OnDied: mapannounce "nguild_gef","Treasure Chest Broken Open",17; - set $boxNumN02, $boxNumN02 -1; + --$boxNumN02; if($boxNumN02 == 0) mapannounce "nguild_gef", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0; end; } @@ -122,13 +122,13 @@ OnRecvCastleN03: end; OnInit: if($boxNumN03 == 0) end; - set $@bxN03, $boxNumN03; + $@bxN03 = $boxNumN03; callfunc "F_GldTreas","nguild_pay","N03",$boxNumN03,$@bxN03,$@boxIdN03,1344+rand(10),286,4,295,13,1; end; OnDied: mapannounce "nguild_pay","Treasure Chest Broken Open",17; - set $boxNumN03, $boxNumN03 -1; + --$boxNumN03; if($boxNumN03 == 0) mapannounce "nguild_pay", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0; end; } @@ -147,13 +147,13 @@ OnRecvCastleN04: end; OnInit: if($boxNumN04 == 0) end; - set $@bxN04, $boxNumN04; + $@bxN04 = $boxNumN04; callfunc "F_GldTreas","nguild_prt","N04",$boxNumN04,$@bxN04,$@boxIdN04,1354+rand(10),6,204,15,213,1; end; OnDied: mapannounce "nguild_prt","Treasure Chest Broken Open",17; - set $boxNumN04, $boxNumN04 -1; + --$boxNumN04; if($boxNumN04 == 0) mapannounce "nguild_prt", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0; end; } |