diff options
author | Haru <haru@dotalux.com> | 2014-10-26 02:06:46 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-11-02 01:36:50 +0100 |
commit | bf4b0a281207e46a9b21a9c9f779aeafaa739b62 (patch) | |
tree | 0230ee95510255548ebb7f4080460b466c9e2ca6 /npc/guild2/agit_main_se.txt | |
parent | 6b20c5b6988c889df35b890d93c338f8b87fa430 (diff) | |
download | hercules-bf4b0a281207e46a9b21a9c9f779aeafaa739b62.tar.gz hercules-bf4b0a281207e46a9b21a9c9f779aeafaa739b62.tar.bz2 hercules-bf4b0a281207e46a9b21a9c9f779aeafaa739b62.tar.xz hercules-bf4b0a281207e46a9b21a9c9f779aeafaa739b62.zip |
Replaced 'set' with direct assignment where applicable (common folder)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/guild2/agit_main_se.txt')
-rw-r--r-- | npc/guild2/agit_main_se.txt | 214 |
1 files changed, 111 insertions, 103 deletions
diff --git a/npc/guild2/agit_main_se.txt b/npc/guild2/agit_main_se.txt index 77e8cdd7c..bad6b27f7 100644 --- a/npc/guild2/agit_main_se.txt +++ b/npc/guild2/agit_main_se.txt @@ -51,7 +51,7 @@ OnAgitStart2: gvgon strnpcinfo(2); donpcevent strnpcinfo(0)+"::OnStart"; } - else for(set .@i,0; .@i<4; set .@i,.@i+1) + else for(.@i = 0; .@i<4; ++.@i) donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnDisable"; end; @@ -59,7 +59,7 @@ OnAgitEnd2: if (strnpcinfo(2) == "template") end; gvgoff strnpcinfo(2); if (getcastledata(strnpcinfo(2),1)) { - set .@str$,substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); killmonster strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena"; donpcevent strnpcinfo(0)+"::OnReset"; donpcevent "Steward#"+.@str$+"::OnStop"; @@ -86,12 +86,12 @@ OnStart: setarray getd("$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"[0]"),0,0,0,0,0,0; donpcevent "df1#"+strnpcinfo(2)+"::OnEnable"; donpcevent "df2#"+strnpcinfo(2)+"::OnEnable"; - for(set .@i,0; .@i<4; set .@i,.@i+1) + for (.@i = 0; .@i<4; ++.@i) donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable"; } OnEmpSpawn: - set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); if (mobcount(strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena")) end; if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],87,219; @@ -107,23 +107,23 @@ OnEmpSpawn: end; OnReset: - set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); donpcevent "df1#"+strnpcinfo(2)+"::OnDisable"; donpcevent "df2#"+strnpcinfo(2)+"::OnDisable"; donpcevent "gard1#"+strnpcinfo(2)+"::OnReset"; donpcevent "gard2#"+strnpcinfo(2)+"::OnReset"; donpcevent "1st Guardian Stone#"+.@str$+"::OnDisable"; donpcevent "2nd Guardian Stone#"+.@str$+"::OnDisable"; - for(set .@i,1; .@i<4; set .@i,.@i+1) + for(.@i = 1; .@i<4; ++.@i) donpcevent "Control Device0"+.@i+"#"+.@str$+"::OnDisable"; - for(set .@i,0; .@i<4; set .@i,.@i+1) + for(.@i = 0; .@i<4; ++.@i) donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnDisable"; if (agitcheck2()) setarray getd("$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"[0]"),0,0,1,1,1,0; end; OnChange: - set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); setarray getd("$agit_"+.@str$+"[0]"),2,2,1,1,2,0; donpcevent strnpcinfo(0)+"::OnEmpSpawn"; donpcevent "Control Device03#"+.@str$+"::OnEnable"; @@ -137,59 +137,59 @@ OnClock0001: if (!getcastledata(strnpcinfo(2),1)) end; killmonster strnpcinfo(2),strnpcinfo(0)+"::OnTreasureDied"; if (getcastledata(strnpcinfo(2),4)) { - set .@Economy,getcastledata(strnpcinfo(2),2); + .@Economy = getcastledata(strnpcinfo(2),2); setcastledata strnpcinfo(2),2,.@Economy+getcastledata(strnpcinfo(2),4)+(rand(2) && getgdskilllv(getcastledata(strnpcinfo(2),1),10014)); if (getcastledata(strnpcinfo(2),2) > 100) setcastledata strnpcinfo(2),2,100; setcastledata strnpcinfo(2),4,0; } if (getcastledata(strnpcinfo(2),5)) { - set .@defence,getcastledata(strnpcinfo(2),3); + .@defence = getcastledata(strnpcinfo(2),3); setcastledata strnpcinfo(2),3,.@defence+getcastledata(strnpcinfo(2),5); if (getcastledata(strnpcinfo(2),3) > 100) setcastledata strnpcinfo(2),3,100; setcastledata strnpcinfo(2),5,0; } - set .@Treasure,getcastledata(strnpcinfo(2),2)/5+4; + .@Treasure = getcastledata(strnpcinfo(2),2)/5+4; if (!.@Treasure) end; freeloop(1); if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") { - set .@treasurebox,1943; + .@treasurebox = 1943; setarray .@treasurex[0],251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258; setarray .@treasurey[0],369,369,369,369,368,368,368,368,367,367,367,367,366,366,366,366,365,365,365,365,364,364,364,364; } else if (strnpcinfo(2) == "arug_cas02") { - set .@treasurebox,1944; + .@treasurebox = 1944; setarray .@treasurex[0],382,383,384,385,386,387,384,385,386,387,388,389,382,383,384,385,386,387,384,385,386,387,388,389; setarray .@treasurey[0],231,231,231,231,231,231,230,230,230,230,230,230,225,225,225,225,225,225,224,224,224,224,224,224; } else { // Castles 3,4,5 are identical, except 4's treasure. - set .@treasurebox,(strnpcinfo(2) == "arug_cas04")?1946:1945; + .@treasurebox = (strnpcinfo(2) == "arug_cas04")?1946:1945; setarray .@treasurex[0],291,292,293,294,295,296,293,294,295,296,297,298,291,292,293,294,295,296,293,294,295,296,297,298; setarray .@treasurey[0],276,276,276,276,276,276,274,274,274,274,274,274,272,272,272,272,272,272,269,269,269,269,269,269; } } else { if (strnpcinfo(2) == "schg_cas02") { - set .@treasurebox,1939; + .@treasurebox = 1939; setarray .@treasurex[0],249,250,251,252,253,246,247,248,249,250,250,251,252,253,246,247,248,249,250,249,250,251,252,253; setarray .@treasurey[0],378,378,378,378,378,376,376,376,376,376,374,374,374,374,372,372,372,372,372,370,370,370,370,370; } else if (strnpcinfo(2) == "schg_cas03") { - set .@treasurebox,1940; + .@treasurebox = 1940; setarray .@treasurex[0],189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194; setarray .@treasurey[0], 21, 21, 21, 21, 21, 21, 19, 19, 19, 19, 19, 19, 17, 17, 17, 17, 17, 17, 15, 15, 15, 15, 15, 15; } else { // Castles 1,4,5 are identical, except treasures. - if (strnpcinfo(2) == "schg_cas01") set .@treasurebox,1938; - else if (strnpcinfo(2) == "schg_cas04") set .@treasurebox,1941; - else set .@treasurebox,1942; + if (strnpcinfo(2) == "schg_cas01") .@treasurebox = 1938; + else if (strnpcinfo(2) == "schg_cas04") .@treasurebox = 1941; + else .@treasurebox = 1942; setarray .@treasurex[0],388,388,388,387,386,385,384,384,384,384,384,384,385,386,387,388,389,390,390,390,389,388,387,386; setarray .@treasurey[0],388,389,390,390,390,390,389,388,387,386,385,384,384,384,384,384,384,384,385,386,386,386,386,386; } } - for(set .@i,0; .@i<4; set .@i,.@i+1) + for(.@i = 0; .@i<4; ++.@i) monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(0)+"::OnTreasureDied"; - for(set .@i,4; .@i<24; set .@i,.@i+1) { + for(.@i = 4; .@i<24; ++.@i) { if (.@Treasure < .@i+1) break; monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(0)+"::OnTreasureDied"; } @@ -203,7 +203,7 @@ OnTreasureDied: // Guild Manager //============================================================ - script Steward#template -1,{ - set .@GID, getcastledata(strnpcinfo(4),1); + .@GID = getcastledata(strnpcinfo(4),1); if (!.@GID) { mes "[ Steward ]"; mes "I await for the master"; @@ -251,18 +251,19 @@ OnTreasureDied: mes "That is all, master."; close; case 2: - set .@Economy,getcastledata(strnpcinfo(4),2); + .@Economy = getcastledata(strnpcinfo(4),2); setarray .@cost[0],5000,10000,20000,35000,55000,80000,110000,145000,185000,230000,280000,335000,395000,460000,530000,605000,685000,770000,860000,955000; - set .@j,0; - for(set .@i,6; .@i<101; set .@i,.@i+5) { + .@j = 0; + for(.@i = 6; .@i<101; .@i += 5) { if (.@Economy < .@i) { - set .@eco_invest,.@cost[.@j]; + .@eco_invest = .@cost[.@j]; break; } - set .@j, .@j+1; + ++.@j; } // Quadruple the cost of investing if you've already invested once. - if (getcastledata(strnpcinfo(4),4)) set .@eco_invest,.@eco_invest*4; + if (getcastledata(strnpcinfo(4),4)) + .@eco_invest *= 4; mes "[ Steward ]"; mes "Raising the stronghold's"; mes "commercial growth will"; @@ -344,18 +345,19 @@ OnTreasureDied: close; } case 3: - set .@defence,getcastledata(strnpcinfo(4),3); + .@defence = getcastledata(strnpcinfo(4),3); setarray .@cost[0],10000,20000,40000,70000,110000,160000,220000,290000,370000,460000,560000,670000,790000,920000,1060000,1210000,1370000,1540000,1720000,1910000; - set .@j,0; - for(set .@i,6; .@i<101; set .@i,.@i+5) { + .@j = 0; + for(.@i = 6; .@i<101; .@i += 5) { if (.@defence < .@i) { - set .@def_invest,.@cost[.@j]; + .@def_invest = .@cost[.@j]; break; } - set .@j, .@j+1; + ++.@j; } // Quadruple the cost of investing if you've already invested once. - if (getcastledata(strnpcinfo(4),5)) set .@def_invest,.@def_invest*4; + if (getcastledata(strnpcinfo(4),5)) + .@def_invest *= 4; mes "[ Steward ]"; mes "Investing in our stronghold's"; mes "defense will enhance the"; @@ -600,20 +602,20 @@ OnStop: end; OnStartArena: - set .@GID,getcharid(2); - set .@region$, (compare(strnpcinfo(4),"arug"))?"Valfreyja":"Nithafjoll"; + .@GID = getcharid(2); + .@region$ = (compare(strnpcinfo(4),"arug"))?"Valfreyja":"Nithafjoll"; // Lower castle Economy - set .@Economy,getcastledata(strnpcinfo(4),2)-5; - if (.@Economy < 0) set .@Economy, 0; + .@Economy = getcastledata(strnpcinfo(4),2)-5; + if (.@Economy < 0) .@Economy = 0; setcastledata strnpcinfo(4),2,.@Economy; // Lower Castle Defence - set .@defence,getcastledata(strnpcinfo(4),3)-5; - if (.@defence < 0) set .@defence, 0; + .@defence = getcastledata(strnpcinfo(4),3)-5; + if (.@defence < 0) .@defence = 0; setcastledata strnpcinfo(4),3,.@defence; // Set new owner setcastledata strnpcinfo(4),1,.@GID; // Clear castle's data. - for(set .@i,4; .@i<10; set .@i,.@i+1) + for(.@i = 4; .@i<10; ++.@i) setcastledata strnpcinfo(4),.@i,0; // Disable Kafra disablenpc "Kafra Employee#"+strnpcinfo(2); @@ -635,8 +637,8 @@ OnStartArena: // Castle Guardians //============================================================ - script Guardian#template -1,{ - set .@GID, getcastledata(strnpcinfo(4),1); - set .@n$, "["+strnpcinfo(1)+"]"; + .@GID = getcastledata(strnpcinfo(4),1); + .@n$ = "["+strnpcinfo(1)+"]"; if (!.@GID) { mes .@n$; mes "Great job. Now, all you"; @@ -836,7 +838,7 @@ OnInit: //============================================================ - script Kafra#template -1,{ cutin "kafra_01",2; - set .@GID, getcastledata(strnpcinfo(4),1); + .@GID = getcastledata(strnpcinfo(4),1); if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) { mes "[Kafra Employee]"; mes "Welcome, proud member"; @@ -948,9 +950,9 @@ OnInit: // Guardian Stones (2) //============================================================ - script Guardian Stone#template -1,{ - set .@GID, getcastledata(strnpcinfo(4),1); - set .@num, atoi(charat(strnpcinfo(1),0)); - set .@var$,"$agit_"+strnpcinfo(2); + .@GID = getcastledata(strnpcinfo(4),1); + .@num = atoi(charat(strnpcinfo(1),0)); + .@var$ = "$agit_"+strnpcinfo(2); if (getcharid(2) == .@GID) { mes "^3355FFYou will need the"; mes "following materials to"; @@ -978,19 +980,19 @@ OnInit: mes "rebuild the Guardian Stone.^000000"; next; setarray .@stone$[0],"Elunium","Oridecon","Stones"; - set .@i, select("Elunium:Oridecon:Stone")-1; - if (.@i == 2) set .@nice,.@nice+10; + .@i = select("Elunium:Oridecon:Stone")-1; + if (.@i == 2) .@nice += 10; mes "^3355FF"+.@stone$[.@i]+" has been"; mes "placed in the center.^000000"; next; - set .@i, select("Elunium:Oridecon:Stone")-1; - if (.@i == 0) set .@nice,.@nice+10; + .@i = select("Elunium:Oridecon:Stone")-1; + if (.@i == 0) .@nice += 10; mes "^3355FFYou have lined the"; mes "outside of the center"; mes "with some "+.@stone$[.@i]+".^000000"; next; - set .@i, select("Elunium:Oridecon:Stone")-1; - if (.@i == 1) set .@nice,.@nice+10; + .@i = select("Elunium:Oridecon:Stone")-1; + if (.@i == 1) .@nice += 10; mes "^3355FFYou covered the"; mes "rest of the materials"; mes "with some "+.@stone$[.@i]+".^000000"; @@ -1005,14 +1007,14 @@ OnInit: setarray .@color$[0],"Red","Yellow","Blue"; while(1) { if (.@roof0 > 7) break; - set .@i, rand(3); + .@i = rand(3); specialeffect .@effect[.@i]; mes "^3355FFThe Gemstones must"; mes "be arranged in the correct"; mes "order according to their"; mes "magic properties and power.^000000"; next; - set .@j, select("Red Gemstone:Yellow Gemstone:Blue Gemstone")-1; + .@j = select("Red Gemstone:Yellow Gemstone:Blue Gemstone")-1; mes "^3355FFYou placed the "+.@color$[.@j]+" Gemstone.^000000"; if (.@i == .@j) { mes "^3355FFHowever, the Guardian Stone"; @@ -1020,8 +1022,8 @@ OnInit: mes "of a magic power conflict.^000000"; close; } - set .@nice,.@nice+10; - set .@roof0,.@roof0+1; + .@nice += 10; + ++.@roof0; specialeffect EF_STEAL; next; } @@ -1055,7 +1057,7 @@ OnInit: specialeffect EF_ICECRASH; disablenpc strnpcinfo(0); setd .@var$+"["+(.@num-1)+"]",0; - set .@df_all,getd(.@var$+"[0]")+getd(.@var$+"[1]"); + .@df_all = getd(.@var$+"[0]")+getd(.@var$+"[1]"); if (!.@df_all) { mapannounce strnpcinfo(4),"Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; donpcevent "RL0#"+strnpcinfo(4)+"::OnEnable"; @@ -1102,9 +1104,9 @@ OnEnable: // Control Devices (3) //============================================================ - script Control#template -1,{ - set .@GID, getcastledata(strnpcinfo(4),1); - set .@num, atoi(charat(strnpcinfo(1),15)); - set .@var$,"$agit_"+strnpcinfo(2); + .@GID = getcastledata(strnpcinfo(4),1); + .@num = atoi(charat(strnpcinfo(1),15)); + .@var$ = "$agit_"+strnpcinfo(2); if (getcharid(2) == .@GID) { if (strcharinfo(0) == getguildmaster(.@GID)) { if (getd(.@var$+"["+(.@num+1)+"]") == 2) { @@ -1127,7 +1129,7 @@ OnEnable: mes "Emveretarcon to basically"; mes "hold everything together.^000000"; next; - set .@ro_of01,rand(10,15); + .@ro_of01 = rand(10,15); while(1) { if (.@ro_of02 == .@ro_of01) break; else { @@ -1142,8 +1144,8 @@ OnEnable: case 1: mes "^3355FFThe frame has been"; mes "reinforced with wood.^000000"; - set .@rp_temp,.@rp_temp+1; - set .@ro_of02,.@ro_of02+1; + ++.@rp_temp; + ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; @@ -1176,7 +1178,7 @@ OnEnable: case 1: mes "^3355FFYou tried using wood"; mes "to reinforce the gate.^000000"; - set .@ro_of02,.@ro_of02+1; + ++.@ro_of02; next; break; case 2: @@ -1195,8 +1197,8 @@ OnEnable: mes "^3355FFYou hammered the"; mes "oridecon: it looks"; mes "like this will work.^000000"; - set .@rp_temp,.@rp_temp+1; - set .@ro_of02,.@ro_of02+1; + ++.@rp_temp; + ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; @@ -1219,8 +1221,8 @@ OnEnable: mes "^3355FFYou used steel to weld"; mes "all the cracks: the gate is"; mes "is starting to look more solid.^000000"; - set .@rp_temp,.@rp_temp+1; - set .@ro_of02,.@ro_of02+1; + ++.@rp_temp; + ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; @@ -1260,8 +1262,8 @@ OnEnable: mes "^3355FFYou successfully used"; mes "the emveretarcon to repair"; mes "much of the gate's damage.^000000"; - set .@rp_temp,.@rp_temp+1; - set .@ro_of02,.@ro_of02+1; + ++.@rp_temp; + ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; @@ -1296,9 +1298,9 @@ OnEnable: close2; donpcevent "RL"+.@num+"#"+strnpcinfo(4)+"::OnEnable"; disablenpc strnpcinfo(0); - if (.@num == 1) set .@str$,"1st"; - else if (.@num == 2) set .@str$,"2nd"; - else if (.@num == 3) set .@str$,"3rd"; + if (.@num == 1) .@str$ = "1st"; + else if (.@num == 2) .@str$ = "2nd"; + else if (.@num == 3) .@str$ = "3rd"; mapannounce strnpcinfo(4),"The "+.@str$+" Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; if (.@num == 1) setd .@var$+"[2]",0; else { @@ -1382,9 +1384,10 @@ OnEnable: setarray .y[0], 18, 44,22, 40,20,40,43, 48, 18, 32, 37, 22, 47, 18, 15, 42, 43, 15, 42, 22, 28, 18; } } - if (charat(strnpcinfo(1),4) == "2") set .@z,11; + if (charat(strnpcinfo(1),4) == "2") + .@z = 11; freeloop(1); - set .@defence,getcastledata(strnpcinfo(2),3); + .@defence = getcastledata(strnpcinfo(2),3); callsub OnSummon,.@z; if (.@defence > 70) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),5; else if (.@defence > 50) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),4; @@ -1394,10 +1397,10 @@ OnEnable: guardian strnpcinfo(2),.@w[4],.@w[5],"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied"; else if (.@defence < 11) { set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),2; - set .@i,(.@z)?2:0; + .@i = (.@z)?2:0; guardian strnpcinfo(2),.@w[.@i],.@w[.@i+1],"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied"; } - else for(set .@i,1; .@i<getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)); set .@i,.@i+1) + else for(.@i = 1; .@i<getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)); ++.@i) callsub OnSummon,.@i+.@z; freeloop(0); copyarray getd(".x_"+strnpcinfo(2)+"[0]"),.@x[0],22; @@ -1413,7 +1416,7 @@ OnTimer1800000: OnTimer2700000: OnTimer3600000: if (charat(strnpcinfo(1),4) == "2") end; - set .@var$,".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2); + .@var$ = ".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2); setd .@var$, getd(.@var$)+1; set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))+1; callsub OnSummon,getd(.@var$); @@ -1431,7 +1434,7 @@ OnTimer2100000: OnTimer3000000: OnTimer3900000: if (!(charat(strnpcinfo(1),4) == "2")) end; - set .@var$,".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2); + .@var$ = ".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2); setd .@var$, getd(.@var$)+1; set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))+1; callsub OnSummon,getd(.@var$); @@ -1446,7 +1449,8 @@ OnSummon: return; OnGuardianDied: - if (charat(strnpcinfo(1),4) == "2") set .@z,11; + if (charat(strnpcinfo(1),4) == "2") + .@z = 11; set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))-1; if (getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)) < 2) { set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))+1; @@ -1476,8 +1480,8 @@ OnEnable: else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],242,309,376,251; else setarray .@i[0],27,35,207,75; // Castles 1,4,5 are identical. } - set .@num, atoi(charat(strnpcinfo(1),2)); - set .@j,(.@num == 1)?0:2; + .@num = atoi(charat(strnpcinfo(1),2)); + .@j = (.@num == 1)?0:2; guardian strnpcinfo(2),.@i[.@j],.@i[.@j+1],((.@num == 1)?"1st":"2nd")+" Guardian Stone",1906+.@num,strnpcinfo(0)+"::OnGuardianStoneDied"; end; @@ -1488,11 +1492,15 @@ OnDisable: end; OnGuardianStoneDied: - set .@num, atoi(charat(strnpcinfo(1),2)); - set .@var$,"$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@num = atoi(charat(strnpcinfo(1),2)); + .@var$ = "$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); setd .@var$+"["+(.@num-1)+"]",1; - if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) set .@destroyed, .@destroyed+1; - if (getd(.@var$+"[1]") == 1 || getd(.@var$+"[1]") == 2) set .@destroyed, .@destroyed+1; + if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) { + ++.@destroyed; + } + if (getd(.@var$+"[1]") == 1 || getd(.@var$+"[1]") == 2) { + ++.@destroyed; + } if (.@destroyed == 2) { mapannounce strnpcinfo(2),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; donpcevent "RL0#"+strnpcinfo(2)+"::OnDisable"; @@ -1503,8 +1511,8 @@ OnGuardianStoneDied: end; OnTimer300000: - set .@num, atoi(charat(strnpcinfo(1),2)); - set .@str$,substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@num = atoi(charat(strnpcinfo(1),2)); + .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); donpcevent ((.@num == 1)?"1st":"2nd")+" Guardian Stone#"+.@str$+"::OnEnable"; setd "$agit_"+.@str$+"["+(atoi(charat(strnpcinfo(1),2))-1)+"]",2; stopnpctimer; @@ -1515,7 +1523,7 @@ OnTimer300000: //============================================================ - script RL#template -1,{ OnEnable: - set .@num, atoi(charat(strnpcinfo(1),2)); + .@num = atoi(charat(strnpcinfo(1),2)); if (.@num == 0) { if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") { @@ -1663,17 +1671,17 @@ OnEnable: if (.@num == 3) set getd(".MyMobCount_"+.@num+strnpcinfo(2)),4; else if (.@num) set getd(".MyMobCount_"+.@num+strnpcinfo(2)),6; setwall strnpcinfo(2),.@wall[0],.@wall[1],.@wall[2],.@wall[3],.@wall[4],substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"_"+strnpcinfo(1); - set .@j,(getd(".MyMobCount_"+.@num+strnpcinfo(2)))?getd(".MyMobCount_"+.@num+strnpcinfo(2)):getarraysize(.@x); - for(set .@i,0; .@i<.@j; set .@i,.@i+1) + .@j = (getd(".MyMobCount_"+.@num+strnpcinfo(2)))?getd(".MyMobCount_"+.@num+strnpcinfo(2)):getarraysize(.@x); + for (.@i = 0; .@i<.@j; ++.@i) guardian strnpcinfo(2),.@x[.@i],.@y[.@i]," ",1905,strnpcinfo(0)+"::OnBarrierDestroyed"; end; OnBarrierDestroyed: - set .@num, atoi(charat(strnpcinfo(1),2)); + .@num = atoi(charat(strnpcinfo(1),2)); if (!.@num) end; set getd(".MyMobCount_"+.@num+strnpcinfo(2)),getd(".MyMobCount_"+.@num+strnpcinfo(2))-1; if (getd(".MyMobCount_"+.@num+strnpcinfo(2)) == 0) { - set .@var$,substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + .@var$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); setd "$agit_"+.@var$+"["+(.@num+1)+"]",1; setarray .@count$[0],"1st","2nd","3rd"; mapannounce strnpcinfo(2),"The "+.@count$[.@num-1]+" Fortress Gate is destroyed.",bc_map,"0x00ff00"; @@ -1714,10 +1722,10 @@ function script LinkFlag { mes "Teleport Service. Please"; mes "choose a destination"; mes "within the stronghold.^000000"; - for(set .@i,0; .@i<getargcount(); set .@i,.@i+3) - set .@menu$, .@menu$+getarg(.@i)+":"; - set .@menu$, .@menu$+"Cancel"; - set .@i, select(.@menu$)-1; + for (.@i = 0; .@i<getargcount(); .@i += 3) + .@menu$ += getarg(.@i)+":"; + .@menu$ += "Cancel"; + .@i = select(.@menu$)-1; if (.@i != getargcount()/3) warp strnpcinfo(4),getarg(.@i*3+1),getarg(.@i*3+2); close; @@ -1726,8 +1734,8 @@ function script LinkFlag { // Return Flags (function) //============================================================ function script ReturnFlag { - set .@str$, (compare(strnpcinfo(4),"aru"))?"Arunafeltz":"Schwaltzvalt"; - set .@GID, getcastledata(getarg(0),1); + .@str$ = (compare(strnpcinfo(4),"aru"))?"Arunafeltz":"Schwaltzvalt"; + .@GID = getcastledata(getarg(0),1); if (!.@GID) { mes "[ "+.@str$+" Royal Edict ]"; mes "The Holy Kingdom of"; @@ -1806,16 +1814,16 @@ function script ReturnFlag { switch(select("Hold the stem.:Do nothing.")) { case 1: if (compare(strnpcinfo(4),"arug")) { - set .@map$,"arug_dun01"; + .@map$ = "arug_dun01"; setarray .@mapx[0],350,350,50, 50,200; setarray .@mapy[0],350, 50,50,350,386; } else { - set .@map$,"schg_dun01"; + .@map$ = "schg_dun01"; setarray .@mapx[0],262, 94, 79,212,322; setarray .@mapy[0],314,284,140, 70,166; } - set .@i, atoi(charat(strnpcinfo(4),9))-1; + .@i = atoi(charat(strnpcinfo(4),9))-1; warp .@map$,.@mapx[.@i],.@mapy[.@i]; close; case 2: |