summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-03 21:27:44 +0000
committereuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-03 21:27:44 +0000
commit3db565eecba5960a5f454338d48815273fb7d5e5 (patch)
tree98ead4dd8dc8010f94fa8b2f49385281cce8f404
parent9cc59af3b0b4c2872fb70e0f0b00f17afcd7122a (diff)
downloadhercules-3db565eecba5960a5f454338d48815273fb7d5e5.tar.gz
hercules-3db565eecba5960a5f454338d48815273fb7d5e5.tar.bz2
hercules-3db565eecba5960a5f454338d48815273fb7d5e5.tar.xz
hercules-3db565eecba5960a5f454338d48815273fb7d5e5.zip
* Added missing .conf entry (bugreport:6162)
* Replaced old, outdated custom WOE setter (custom\WoE_Setter.txt) with my script, and renamed to "woe_controller" * Optimized "Bossnia Warp NPCs" script (events\bossnia.txt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16373 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--npc/custom/WoE_Setter.txt188
-rw-r--r--npc/custom/woe_controller.txt325
-rw-r--r--npc/events/bossnia.txt71
-rw-r--r--npc/events/idul_fitri.txt5
-rw-r--r--npc/scripts_custom.conf3
-rw-r--r--npc/scripts_renewal.conf1
6 files changed, 347 insertions, 246 deletions
diff --git a/npc/custom/WoE_Setter.txt b/npc/custom/WoE_Setter.txt
deleted file mode 100644
index fdab6da98..000000000
--- a/npc/custom/WoE_Setter.txt
+++ /dev/null
@@ -1,188 +0,0 @@
-//===== rAthena Script =======================================
-//= War of Emperium - Time Setter
-//===== By: ==================================================
-//= Fredzilla
-//===== Current Version: =====================================
-//= 1.5
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
-//= Lets a GM set WoE times from inside the game
-//===== Additional Comments: =================================
-//= Loops used = 4 (I like loops ^_^)
-//= Only GM's of lvl 99 can use it
-//= If anyone else tries to use it they will just get a list of WoE times
-//= It give you the option, as a GM, to Add a new time, Reset all times,
-//= or just view the current set times
-//= If a WoE is in Progress no time reset is possible
-//= A maximum of 200 WoE times can be set, if that is even possible ;)
-//= Added in v1.5
-//= Change day setting to a menu call, more GUI this way
-//= You can choose for the WoE to last between days
-//= IE, Sat 23 till Sun 01, is now possible
-//= Not even the normal WoE script can do this (by dafault)
-//= Removed the need for disabling the normal agit_event
-//= 1.5a Applied Playtester's fix. [Vicious]
-//============================================================
-
-prontera,162,194,5 script WoE Setter 806,{
- mes "[Woe Setter]";
- if(getgmlevel()<99) goto L_NotGM;
- mes "Welcome, I can set WoE times for you";
- mes "Simply follow the intruction given in each section after this, and it should be set and ready to use";
- next;
- mes "[Woe Setter]";
- mes "Now the fun starts";
- mes "Please select what you want to do";
- next;
- menu "Add a WoE time",L_Add,"Reset All WoE times",L_Reset,"View Current WoE times",-;
- mes "[Woe Setter]";
- mes "Ok currently you have WoE times set for:-";
- set @num,0;
-L_LoopList:
- if($sday[@num] == 0 && $eday[@num] == 0 && $woetime[@num] == 0 && $woetime2[@num] == 0) goto L_LoopListEnd;
- if($sday[@num]==0) set $@tempday$,"Sunday";
- if($sday[@num]==1) set $@tempday$,"Monday";
- if($sday[@num]==2) set $@tempday$,"Tuesday";
- if($sday[@num]==3) set $@tempday$,"Wednesday";
- if($sday[@num]==4) set $@tempday$,"Thursday";
- if($sday[@num]==5) set $@tempday$,"Friday";
- if($sday[@num]==6) set $@tempday$,"Saturday";
- if($eday[@num]==0) set $@tempday2$,"Sunday";
- if($eday[@num]==1) set $@tempday2$,"Monday";
- if($eday[@num]==2) set $@tempday2$,"Tuesday";
- if($eday[@num]==3) set $@tempday2$,"Wednesday";
- if($eday[@num]==4) set $@tempday2$,"Thursday";
- if($eday[@num]==5) set $@tempday2$,"Friday";
- if($eday[@num]==6) set $@tempday2$,"Saturday";
- if($eday[@num]==$sday[@num]) mes $@tempday$+" from "+$woetime[@num]+":00 till "+$woetime2[@num]+":00";
- if($eday[@num]!=$sday[@num]) mes "From "+$@tempday$+" "+$woetime[@num]+":00 till "+$@tempday2$+" "+$woetime2[@num]+":00";
- set @num,@num+1;
- goto L_LoopList;
-L_LoopListEnd:
- close;
-L_Add:
- set @num,0;
-L_AddLoop:
- if($sday[@num] == 0 && $eday[@num] == 0 && $woetime[@num] == 0 && $woetime2[@num] == 0) goto L_AddLoopEnd;
- set @num,@num+1;
- goto L_AddLoop;
-L_AddLoopEnd:
- mes "[Woe Setter]";
- mes "What day do you want the WoE to start ^FF0000start^000000 in?";
- next;
- menu "Sunday",-,"Monday",-,"Tuesday",-,"Wednesday",-,"Thursday",-,"Friday",-,"Saturday",-;
- if(@menu==1) set $sday[@num],0;
- if(@menu==2) set $sday[@num],1;
- if(@menu==3) set $sday[@num],2;
- if(@menu==4) set $sday[@num],3;
- if(@menu==5) set $sday[@num],4;
- if(@menu==6) set $sday[@num],5;
- if(@menu==7) set $sday[@num],6;
- mes "[Woe Setter]";
- mes "Ok, now please enter the hour you wish the WoE to ^FF0000start^000000 at";
- mes "This is using a 24 hour clock";
- mes "00 = Midnight";
- mes "12 = Mid-day";
- mes "23 = 11pm";
- next;
- input @input;
- if (@input < 0 || @input > 24) goto L_BadNumber;
- set $woetime[@num],@input;
- mes "[Woe Setter]";
- mes "What day do you want the WoE to start ^FF0000finish^000000 in?";
- next;
- menu "Same as start",-,"Sunday",-,"Monday",-,"Tuesday",-,"Wednesday",-,"Thursday",-,"Friday",-,"Saturday",-;
- if(@menu==1) set $eday[@num],$sday[@num];
- if(@menu==2) set $eday[@num],0;
- if(@menu==3) set $eday[@num],1;
- if(@menu==4) set $eday[@num],2;
- if(@menu==5) set $eday[@num],3;
- if(@menu==6) set $eday[@num],4;
- if(@menu==7) set $eday[@num],5;
- if(@menu==8) set $eday[@num],6;
- mes "[Woe Setter]";
- mes "Ok, now please enter the hour you wish the WoE to ^FF0000finish^000000 at";
- mes "This also uses the 24 hour clock";
- mes "00 = Midnight";
- mes "12 = Mid-day";
- mes "23 = 11pm";
- next;
- input @input;
- if (@input < 0 || @input > 24) goto L_BadNumber;
- set $woetime2[@num],@input;
- mes "[Woe Setter]";
- mes "You WoE time has now been set";
- mes "To confirm this, ask me to show you the ^FF0000'View Current WoE times'^000000";
- close;
-L_Reset:
- mes "[Woe Setter]";
- mes "You are about to reset all the set WoE times you have created";
- mes "Are you sure?";
- next;
- menu "No, what was I thinking",L_No,"Yes I really want to do it",-;
- if(agitcheck()) goto L_WoEOn;
- deletearray $sday[0],200;
- deletearray $eday[0],200;
- deletearray $woetime[0],200;
- deletearray $woetime2[0],200;
- mes "[Woe Setter]";
- mes "They are all gone now, please remember to set new ones";
- close;
-L_WoEOn:
- mes "[Woe Setter]";
- mes "Sorry since there is a WoE in progress you cannot reset the WoE times";
- close;
-L_No:
- mes "[Woe Setter]";
- mes "Oh, good, come back whenever";
- close;
-L_NotGM:
- mes "The current WoE times are :-";
- set @num,0;
- goto L_LoopList;
- end;
-L_BadNumber:
- mes "[Woe Setter]";
- mes "Sorry that was an invalid number, please try again";
- close;
-}
-- script Agit_Event2 -1,{
- end;
-OnInit:
-disablenpc "Agit_Event";
-OnMinute00:
-OnAgitInit:
-
-// starting time check
- set $@num,0;
-L_StartLoop:
- if($sday[$@num] == 0 && $eday[$@num] == 0 && $woetime[$@num] == 0 && $woetime2[$@num] == 0) goto L_StartLoopEnd;
- if(gettime(4)==$sday[$@num] && gettime(3)>=$woetime[$@num] && (gettime(3)<$woetime2[$@num] || $sday[$@num]!=$eday[$@num])) goto L_Start;
- set $@num,$@num+1;
- goto L_StartLoop;
-
-// end time checks
- L_StartLoopEnd:
- set $@num,0;
- L_EndLoop:
- if($eday[$@num] == 0 && $woetime[$@num] == 0 && $woetime2[$@num] == 0) end;
- if((gettime(4)==$eday[$@num]) && (gettime(3)==$woetime2[$@num])) goto L_End;
- set $@num,$@num+1;
- goto L_EndLoop;
- end;
-
-// Stop WoE
-L_End:
- if(!agitcheck()) end;
- Announce "The War Of Emperium is over!",8;
- AgitEnd;
- end;
-
-// Start WoE
-L_Start:
- if(agitcheck()) end;
- Announce "The War Of Emperium has begun!",8;
- AgitStart;
- end;
-}
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
new file mode 100644
index 000000000..ff515fb32
--- /dev/null
+++ b/npc/custom/woe_controller.txt
@@ -0,0 +1,325 @@
+//===== rAthena Script =======================================
+//= WOE Controller
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.3a
+//===== Description: =========================================
+//= A controller for War of Emperium designed for
+//= simplicity and ease of use.
+//= Many concepts taken from ToastOfDoom's script,
+//= and "rewards" function originally by Goddameit.
+//===== Additional Comments: =================================
+//= Be sure to disable the default agit controllers!
+//== npc\guild\agit_controller.txt
+//== npc\guild2\agit_start_se.txt
+//============================================================
+
+prontera,149,193,4 script WOE Information 835,{ doevent "WOE_CONTROL::OnMenu"; end; OnAgitStart: while(agitcheck()) { misceffect 58; sleep 425; } end; }
+
+- script WOE_CONTROL -1,{
+function Disp_Owner; function Add_Zero;
+
+OnInit:
+// --------------------------------------------------------------------------------------------------------------------------
+
+ set .CastleWarp,0; // 1: Always enable all castle warps. | 0: Warp only to active castles.
+ set .AutoKick,1; // Automatically kick players from inactive castles during WOE? (1:yes / 0:no)
+ set .ExitWarp,0; // Warp all players from castles when WOE ends? (1:yes / 0:no)
+ set .GMAccess,99; // GM level required to access Session Manager (cannot be 0)
+ setarray .Reward[0],14001,1; // Reward for all members of conquering guilds, per castle: <ID>,<Count>{,...} (0 to disable)
+
+// --------------------------------------------------------------------------------------------------------------------------
+ set .Size, getarraysize($WOE_CONTROL);
+ setarray .Castles$[0],
+ "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
+ "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
+ "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
+ "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
+ "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
+ "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
+ setarray .EndLabel$[0],"aru01","aru02","aru03","aru04","aru05","sch01","sch02","sch03","sch04","sch05";
+ setarray .Days$[0],"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday";
+ setarray .Regions$[0],"Prontera","Payon","Geffen","Aldebaran","Arunafeltz","Schwaltzvalt";
+ setarray .Map$[0],"prt_gld","pay_gld","gef_fild13","alde_gld","aru_gld","sch_gld";
+ setarray .MapX[0],134,240,153,111,208,121,295,317,140,204,214,308,143,193,305,48, 95,142,239,264,158,83, 68,299,292,293,288, 97,137, 71;
+ setarray .MapY[0], 65,128,137,240,240,233,116,293,160,266, 75,240,240,278, 87,83,249, 85,242, 90,272,47,155,345,107,100,252,196, 90,315;
+ if (!agitcheck() && !agitcheck2()) sleep 4000;
+ set .Init,1;
+OnMinute00:
+ freeloop(1);
+ if (agitcheck() || agitcheck2()) {
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)==$WOE_CONTROL[.@i+2]) {
+ OnWOEEnd:
+ announce "The War Of Emperium is over!",bc_all|bc_woe;
+ AgitEnd; AgitEnd2;
+ sleep 1000;
+ for(set .@j,0; .@j<30; set .@j,.@j+1) {
+ if (.Active[0]&(1<<.@j)) Disp_Owner(.Castles$[.@j],1);
+ else if (.AutoKick) removemapflag .Castles$[.@j], mf_loadevent;
+ if (.ExitWarp) maprespawnguildid .Castles$[.@j],0,3; }
+ if (.Reward[0] && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0];
+ deletearray .Active[0],2;
+ if (.ForceEnd) { set .ForceEnd,0; end; }
+ break; } }
+ if ((!agitcheck() && !agitcheck2()) || .Init) {
+ if (!agitcheck() && !agitcheck2()) set .Init,0;
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)>=$WOE_CONTROL[.@i+1] && gettime(3)<$WOE_CONTROL[.@i+2]) {
+ deletearray .Active[0],2;
+ set .Active[0], $WOE_CONTROL[.@i+3];
+ if (.Init) { AgitEnd; AgitEnd2; }
+ else announce "The War Of Emperium has begun!",bc_all|bc_woe;
+ sleep 1000;
+ AgitStart; AgitStart2;
+ for(set .@j,0; .@j<30; set .@j,.@j+1) {
+ if (.Active[0]&(1<<.@j)) {
+ if (!.Init) Disp_Owner(.Castles$[.@j],0);
+ set .Active[1], .Active[1] | (1<<((.@j/5)+1));
+ } else {
+ if (.AutoKick) setmapflag .Castles$[.@j], mf_loadevent;
+ if (.@j<20) {
+ donpcevent "Agit#"+.Castles$[.@j]+"::OnAgitEnd";
+ killmonster .Castles$[.@j], "Agit#"+.Castles$[.@j]+"::OnAgitBreak";
+ } else {
+ donpcevent "Manager#"+.Castles$[.@j]+"_02::OnAgitEnd2";
+ killmonster .Castles$[.@j], "Steward#"+.EndLabel$[.@j-20]+"::OnStartArena"; } } }
+ break; } }
+ set .Init,0;
+ freeloop(0);
+ end;
+
+function Disp_Owner {
+ set .@o, getcastledata(getarg(0),1);
+ if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildname(.@o)+"] guild.",bc_all|bc_woe;
+ else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe;
+ return; }
+
+function Add_Zero {
+ return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00"; }
+
+OnReward:
+ for(set .@i,0; .@i<30; set .@i,.@i+1)
+ if (getarg(0)&(1<<.@i)) {
+ set .@guild, getcastledata(.Castles$[.@i],1);
+ if (.@guild) {
+ deletearray .@acc[0], getarraysize(.@acc); deletearray .@char[0], getarraysize(.@char);
+ query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@guild+"'", .@acc, .@char);
+ for(set .@j,0; .@j<getarraysize(.@acc); set .@j,.@j+1)
+ if (isloggedin(.@acc[.@j],.@char[.@j])) {
+ for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2)
+ getitem .Reward[.@k], .Reward[.@k+1], .@acc[.@j];
+ message rid2name(.@acc[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; } } }
+ return;
+
+OnPCLoadMapEvent:
+ if (!compare(strcharinfo(3),"g_cas")) end;
+ sleep2 1000;
+ message strcharinfo(0), getcastlename(strcharinfo(3))+" is inactive during this WOE session.";
+ sleep2 5000;
+ if (compare(strcharinfo(3),"g_cas")) warp "SavePoint",0,0;
+ end;
+
+OnMenu:
+while(1) {
+ mes "[WOE Information]";
+ if (agitcheck() || agitcheck2()) {
+ if (!.Size) mes "The War of Emperium is ^0055FFactive^000000.";
+ else {
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)>=$WOE_CONTROL[.@i+1] && gettime(3)<$WOE_CONTROL[.@i+2]) {
+ set .@i, $WOE_CONTROL[.@i+2]; break; }
+ mes "The War of Emperium is ^0055FFactive^000000 until ^FF0000"+Add_Zero(.@i)+"^000000 in the following regions:";
+ mes " ";
+ for(set .@i,0; .@i<6; set .@i,.@i+1)
+ if (.Active[1]&(1<<(.@i+1))) mes " > ^777777"+.Regions$[.@i]+"^000000"; }
+ } else {
+ set .@j,0; set .@k,0;
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if ((gettime(4)==$WOE_CONTROL[.@i] && gettime(3)<=$WOE_CONTROL[.@i+1]) || gettime(4)<$WOE_CONTROL[.@i]) {
+ set .@j, $WOE_CONTROL[.@i]; set .@k, $WOE_CONTROL[.@i+1]; break; }
+ if (!.@j && !.@k) {
+ set .@j, $WOE_CONTROL[0]; set .@k, $WOE_CONTROL[1]; }
+ mes "The War of Emperium is ^777777inactive^000000.";
+ if (.Size) {
+ mes " ";
+ mes "The next session will begin";
+ mes "on ^0055FF"+.Days$[.@j]+"^000000 at "+Add_Zero(.@k)+"^000000."; } }
+ next;
+ switch(select(""+((.CastleWarp || .Active[1])?" ~ Warp to castles...":"")+": ~ Check schedule...: ~ View castle owners...:"+((getgmlevel()<.GMAccess || !getgmlevel())?"":" ~ Manage sessions...")+": ~ ^777777Cancel^000000")) {
+ case 1:
+ set .@menu$,"";
+ for(set .@i,0; .@i<6; set .@i,.@i+1) {
+ if (.CastleWarp || .Active[1]&(1<<(.@i+1))) set .@menu$, .@menu$+" ~ "+((.Active[1]&(1<<(.@i+1)))?"^0055FF":"^777777")+.Regions$[.@i]+" Castles^000000";
+ set .@menu$, .@menu$+":"; }
+ set .@i, select(.@menu$)-1;
+ set .@menu$,"";
+ for(set .@j,.@i*5; .@j<(.@i*5)+5; set .@j,.@j+1) {
+ if (.CastleWarp || .Active[0]&(1<<.@j)) set .@menu$, .@menu$+" ~ "+((.Active[0]&(1<<.@j))?"^0055FF":"^777777")+getcastlename(.Castles$[.@j])+"^000000";
+ set .@menu$, .@menu$+":"; }
+ set .@j, select(.@menu$)-1;
+ warp .Map$[.@i],.MapX[(.@i*5)+.@j],.MapY[(.@i*5)+.@j];
+ close;
+ case 2:
+ mes "[Schedule]";
+ if (.Size) {
+ freeloop(1);
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4) {
+ mes "> ^FF0000"+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1])+"-"+Add_Zero($WOE_CONTROL[.@i+2])+")^000000";
+ for(set .@j,0; .@j<30; set .@j,.@j+1)
+ if ($WOE_CONTROL[.@i+3]&(1<<.@j)) mes " ~ "+getcastlename(.Castles$[.@j])+" ^777777("+.Castles$[.@j]+")^000000";
+ if (.@i+4<.Size) mes " "; }
+ freeloop(0);
+ } else mes "No times are configured.";
+ next;
+ break;
+ case 3:
+ mes "[Castle Ownership]";
+ for(set .@i,0; .@i<6; set .@i,.@i+1) {
+ set .@k, .@i*5;
+ mes "> ^FF0000"+.Regions$[.@i]+"^000000";
+ for(set .@j,.@k; .@j<(.@k+5); set .@j,.@j+1) {
+ set .@t, getcastledata(.Castles$[.@j],1);
+ mes " ~ "+getcastlename(.Castles$[.@j])+": "+((.@t)?"^0055FF"+getguildname(.@t):"^777777unoccupied")+"^000000"; }
+ if (.@i<5) mes " "; }
+ next;
+ break;
+ case 4:
+ while(1) {
+ mes "[Session Manager]";
+ mes "There are ^0055FF"+(.Size/4)+" session(s)^000000 configured.";
+ mes "What would you like to do?";
+ next;
+ switch(select(" ~ Add a session...: ~ Delete a session...: ~ Reload settings...:"+((agitcheck() || agitcheck2())?" ~ End WOE session...":"")+": ~ ^777777Go back^000000")) {
+ case 1:
+ mes "[New Session]";
+ if (.Size > 127) {
+ mes "You have already reached the maximum of 32 sessions."; next; break; }
+ mes "Select a day.";
+ next;
+ set .@Day, select(" ~ "+implode(.Days$,": ~ "))-1;
+ mes "[New Session]";
+ mes "Select a start time for ^0055FF"+.Days$[.@Day]+"^000000.";
+ next;
+ set .@menu$,"";
+ for(set .@i,0; .@i<23; set .@i,.@i+1)
+ set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":";
+ set .@Start, select(.@menu$)-1;
+ mes "[New Session]";
+ mes "Select an end time for ^0055FF"+.Days$[.@Day]+"^000000.";
+ next;
+ set .@menu$,"";
+ for(set .@i,.@Start+1; .@i<24; set.@i,.@i+1)
+ set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":";
+ set .@End, select(.@menu$)+.@Start;
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if (.@Day==$WOE_CONTROL[.@i] &&
+ ((.@Start >= $WOE_CONTROL[.@i+1] && .@Start < $WOE_CONTROL[.@i+2]) ||
+ (.@End > $WOE_CONTROL[.@i+1] && .@End <= $WOE_CONTROL[.@i+2]) ||
+ (.@Start <= $WOE_CONTROL[.@i+1] && .@End >= $WOE_CONTROL[.@i+2]))) {
+ mes "[New Session]";
+ mes "The chosen times overlap with an existing session.";
+ next;
+ set .@d,1; break; }
+ if (.@d) { set .@d,0; break; }
+ set .@Castle,0;
+ while(1) {
+ mes "[New Session]";
+ mes "^0055FF"+.Days$[.@Day]+" ("+Add_Zero(.@Start)+"-"+Add_Zero(.@End)+")^000000";
+ mes " > Castles:";
+ if (!.@Castle) mes " ~ ^777777(none selected)^000000";
+ else for(set .@i,0; .@i<30; set .@i,.@i+1)
+ if (.@Castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")";
+ next;
+ set .@menu$,((.@Castle)?" ~ ^FF0000Finished...^000000":"")+":";
+ for(set .@i,0; .@i<30; set .@i,.@i+1)
+ set .@menu$, .@menu$+" ~ "+((.@Castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:";
+ set .@i, select(.@menu$)-1;
+ if (.@i) set .@Castle, .@Castle^(1<<(.@i-1));
+ else {
+ mes "[New Session]";
+ mes "Are you sure?";
+ next;
+ switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) {
+ case 1:
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if ((.@Day==$WOE_CONTROL[.@i] && .@End<=$WOE_CONTROL[.@i+1]) || .@Day<$WOE_CONTROL[.@i]) {
+ set .@d,1; break; }
+ if (!.@d) { set .@d,1; set .@i,.Size; }
+ copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i;
+ setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle;
+ set .Size, getarraysize($WOE_CONTROL);
+ case 3:
+ mes "[New Session]";
+ mes ((.@d)?"Session added.":"Cancelled.");
+ next;
+ set .@d,1;
+ case 2:
+ break;
+ } if (.@d) { set .@d,0; break; } }
+ } break;
+ case 2:
+ mes "[Remove Session]";
+ if (!.Size) {
+ mes "There are no sessions configured."; next; break; }
+ mes "Select a session to remove.";
+ next;
+ set .@menu$,"";
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ set .@menu$, .@menu$+" ~ "+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1],1)+"-"+Add_Zero($WOE_CONTROL[.@i+2],1)+"):";
+ set .@menu$, .@menu$+" ~ ^777777Cancel^000000";
+ set .@i, select(.@menu$)-1;
+ if (.@i==(.Size/4)) break;
+ mes "[Remove Session]";
+ mes "Delete ^0055FF"+.Days$[$WOE_CONTROL[.@i*4]]+"'s^000000 session?";
+ mes "This action cannot be undone.";
+ next;
+ set .@j, select(" ~ ^FF0000Delete session...^000000: ~ ^777777Cancel^000000");
+ mes "[Remove Session]";
+ if (.@j==2) mes "Cancelled.";
+ else {
+ deletearray $WOE_CONTROL[.@i*4],4;
+ set .Size, getarraysize($WOE_CONTROL);
+ mes "Session deleted."; }
+ next;
+ break;
+ case 3:
+ mes "[Reload Settings]";
+ mes "This will trigger all events related to new session configurations, if any.";
+ if (agitcheck() || agitcheck2()) { mes " "; mes "Be aware that this will disrupt the current WOE session."; }
+ next;
+ set .@i, select(" ~ ^0055FFReload settings...^000000: ~ ^777777Cancel^000000");
+ mes "[Reload Settings]";
+ if (.@i==2) mes "Cancelled.";
+ else {
+ set .Init,1;
+ donpcevent "WOE_CONTROL::OnMinute00";
+ mes "Variables have been re-initialized."; }
+ next;
+ break;
+ case 4:
+ mes "[Force Agit End]";
+ if (!agitcheck() && !agitcheck2()) {
+ mes "WOE has already ended."; next; break; }
+ mes "This command will safely execute all AgitEnd events.";
+ mes " ";
+ mes "Kill the current WOE session?";
+ next;
+ set .@i, select(" ~ ^FF0000End session...^000000:"+((.Reward[0])?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000");
+ mes "[Force Agit End]";
+ if (.@i==3) mes "Cancelled.";
+ else {
+ set .ForceEnd, .@i;
+ donpcevent "WOE_CONTROL::OnWOEEnd";
+ mes "WOE session terminated."; }
+ next;
+ break;
+ case 5:
+ set .@d,1; break;
+ } if (.@d) { set .@d,0; break; } }
+ break;
+ case 5:
+ close; }
+ }
+} \ No newline at end of file
diff --git a/npc/events/bossnia.txt b/npc/events/bossnia.txt
index 9f772d308..514193cbd 100644
--- a/npc/events/bossnia.txt
+++ b/npc/events/bossnia.txt
@@ -1,15 +1,16 @@
//===== rAthena Script =======================================
-//= Bossnia Warp NPC's.
+//= Bossnia Warp NPCs
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= rAthena
//===== Description: =========================================
//= Bossnia Warp NPC's.
//===== Additional Comments: =================================
//= 1.0 Converted from the official script.
+//= 1.1 Optimized. [Euphy]
//============================================================
prontera,132,125,4 script Bossnia Staff::bsw 908,{
@@ -23,15 +24,15 @@ prontera,132,125,4 script Bossnia Staff::bsw 908,{
next;
mes "[Riss]";
mes "What? My name is...";
- mes "'Bossnia Staff'?? no no..";
+ mes "'Bossnia Staff'?? No no...";
mes "Well, my name is not so important.";
mes "Sometimes you should be generous.";
mes "No time for considering that kind of small stuff";
mes "when you have to concentrate on more important things.";
next;
mes "[Riss]";
- mes "Hum... anyway i want to say..something..";
- mes "While i was travelling through some places,";
+ mes "Hum... anyway I want to say... something..";
+ mes "While I was travelling through some places,";
mes "I found a really fearful place.";
next;
mes "[Riss]";
@@ -40,12 +41,12 @@ prontera,132,125,4 script Bossnia Staff::bsw 908,{
mes "Isn't it?";
next;
mes "[Riss]";
- mes "But.. but.. in there..";
- mes "There are lots of fearful and strong monsters in there..";
+ mes "But... but... in there...";
+ mes "There are lots of fearful and strong monsters in there...";
mes "That was really frightful.";
next;
mes "[Riss]";
- mes "If I had reacted a bit later.. a few seconds..";
+ mes "If I had reacted a bit later... a few seconds...";
mes "I might have been killed.";
next;
mes "[Riss]";
@@ -56,7 +57,7 @@ prontera,132,125,4 script Bossnia Staff::bsw 908,{
next;
mes "[Riss]";
mes "Uh... you already know?";
- mes "Although you know the place, you want to go in..";
+ mes "Although you know the place, you want to go in...";
mes "Good, I will send you there.";
mes "But after you went there, don't hold";
mes "a grudge against me. Also it costs 5,000 zeny.";
@@ -66,48 +67,14 @@ prontera,132,125,4 script Bossnia Staff::bsw 908,{
mes "Would you really like to take the challenge??";
mes "Ok, just choose the course.";
next;
- switch(select("First","Second","Third","Fourth")) {
- case 1:
- mes "[Riss]";
- mes "Take care, boy~";
- mes "Don't hold a grudge against me.";
- close2;
- set Zeny, Zeny - 5000;
- set .@boss_x, rand(202,204);
- set .@boss_y, rand(202,204);
- warp "bossnia_01",.@boss_x,.@boss_y;
- end;
- case 2:
- mes "[Riss]";
- mes "Take care, boy~";
- mes "Don't hold a grudge against me.";
- close2;
- set Zeny, Zeny - 5000;
- set .@boss_x, rand(202,204);
- set .@boss_y, rand(202,204);
- warp "bossnia_02",.@boss_x,.@boss_y;
- end;
- case 3:
- mes "[Riss]";
- mes "Take care, boy~";
- mes "Don't hold a grudge against me.";
- close2;
- set Zeny, Zeny - 5000;
- set .@boss_x, rand(202,204);
- set .@boss_y, rand(202,204);
- warp "bossnia_03",.@boss_x,.@boss_y;
- end;
- case 4:
- mes "[Riss]";
- mes "Take care, boy~";
- mes "Don't hold a grudge against me.";
- close2;
- set Zeny, Zeny - 5000;
- set .@boss_x, rand(202,204);
- set .@boss_y, rand(202,204);
- warp "bossnia_04",.@boss_x,.@boss_y;
- end;
- }
+ set .@i, select("First","Second","Third","Fourth");
+ mes "[Riss]";
+ mes "Take care, boy~";
+ mes "Don't hold a grudge against me.";
+ close2;
+ set Zeny, Zeny - 5000;
+ warp "bossnia_0"+.@i,rand(202,204),rand(202,204);
+ end;
}
mes "[Riss]";
mes "You don't have enough money...";
@@ -116,7 +83,7 @@ prontera,132,125,4 script Bossnia Staff::bsw 908,{
}
geffen,124,169,4 duplicate(bsw) Bossnia Staff#2 908
-Payon,165,150,4 duplicate(bsw) Bossnia Staff#3 908
+payon,165,150,4 duplicate(bsw) Bossnia Staff#3 908
morocc,142,100,4 duplicate(bsw) Bossnia Staff#4 908
lighthalzen,203,140,4 duplicate(bsw) Bossnia Staff#5 908
rachel,132,144,4 duplicate(bsw) Bossnia Staff#6 908
diff --git a/npc/events/idul_fitri.txt b/npc/events/idul_fitri.txt
index 8b0121fcf..0c11775ca 100644
--- a/npc/events/idul_fitri.txt
+++ b/npc/events/idul_fitri.txt
@@ -12,7 +12,6 @@
//= 1.1 Replaced effect numerics with constants. [Samuray22]
//============================================================
-
prontera,146,92,3 script Cellerb 58,{
set @npcname$,"[Staff Idul Fitri]";
mes @npcname$;
@@ -67,12 +66,10 @@ prontera,146,92,3 script Cellerb 58,{
mes "We appreciate your participation in this special event.";
emotion e_thx;
close;
-
case 2:
mes @npcname$;
mes "Oh well, maybe you will participate in tommorow's quest.";
emotion e_hmm;
close;
}
-}
-
+} \ No newline at end of file
diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf
index 2fbd6899b..5d98c6fc1 100644
--- a/npc/scripts_custom.conf
+++ b/npc/scripts_custom.conf
@@ -17,8 +17,7 @@
//npc: npc/custom/resetnpc.txt
//npc: npc/custom/card_remover.txt
//npc: npc/custom/item_signer.txt
-// -- WoE Time Setter from inside the game [Fredzilla]
-//npc: npc/custom/WoE_Setter.txt
+//npc: npc/custom/woe_controller.txt
// -- Wedding script that supports same-sex marriages
//npc: npc/custom/marriage.txt
// -- Warper that works only after locations are unlocked
diff --git a/npc/scripts_renewal.conf b/npc/scripts_renewal.conf
index e468349d3..8ab257020 100644
--- a/npc/scripts_renewal.conf
+++ b/npc/scripts_renewal.conf
@@ -11,6 +11,7 @@
// --------------------------------------------------------------
//Dungeons
+npc: npc/mobs/dungeons/lhz_dun_re.txt
npc: npc/mobs/dungeons/dew_dun.txt
npc: npc/mobs/dungeons/dic_dun.txt
npc: npc/mobs/dungeons/ma_dun.txt