Jump to content

Toasty's WoE Controller


Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   48
  • Joined:  11/19/11
  • Last Seen:  

Toasty's WoE Controller
So...once upon a time when I did have a server to run and one of the few questions that would always come up was..."What time was WoE and what region was it?" (WoE on this server was broken up into regions). Usually I didn't know the answer and so I had to go through the awful task of trying to find it in the forums and eventually I just directed everyone to it. And then there's the issue with people not understanding timezones or knowing how to substract. Soo...one day i got off my lazy ass and wrote this little thingymabob that would tell people exactly how long left it is till WoE, where it was and other random tiddy-bits of info. Worked pretty well.
Anyways...just recently I was pretty bored and decided to clean it up abit and thought...well...since it's already keeping time..why not just let it do all the agit_controller stuff too. So I added that and presto!....this came out."

Features:

  • WoE 2.0 ready
  • Novice WoE ready
  • Real-time updated time display of how much longer till WoE starts/ends
  • WoE configurable on a Castle level basis
  • Useful castle owner listing feature
  • Even more useful region map warper feature
  • Some random skip/start/end WoE functions for GMs
  • Auto-Restart WoE after server crash
  • Now with a mildly easy to use online generator script.
  • Though tested on trunk, will very much likely work on stable (provided you tick the correct box while generating the script)

Description:
Basically what you get is a little banner NPC with a chatroom on it who's title updates with the amount of time left till WoE starts or ends. (Little idea stolen from one of annie's scripts =P...some mvp arena i think)
woeinfo_00.png
Clicking on the NPC (the npc not the chatroom) opens up a menu with a couple useful options which are self-explanatory.
Note: Castle Owner listing is only for castles of the current/upcoming WoE session. Too much spam to print all
woeinfo_01.png

Scripts:

Installation:

  • Generate the script by inputting the times you require and any options you may want in the generator form
  • Install the script as you would for any NPC. Depending if you want to use this to replace agit_controller.txt or not you can replace the contains of ./npc/guild/agit_controller.txt with this script.
  • IF you use this script to manage your WoE timings (which you prob would..). Remove any existing WoE timing management scripts. By default...
    ./npc/guild/agit_controller.txt -if you didn't replace it with this script
    ./npc/guild2/agit_start_se.txt -for woe2 controller

If you want to use any of the Novice castles make sure you enable them in ./npc/scripts_athena.conf

npc: npc/events/nguild/nguild_dunsw.txt
npc: npc/events/nguild/nguild_treas.txt
npc: npc/events/nguild/nguild_guardians.txt
npc: npc/events/nguild/nguild_warper.txt
npc: npc/events/nguild/nguild_ev_agit.txt
npc: npc/events/nguild/nguild_flags.txt
npc: npc/events/nguild/nguild_managers.txt
npc: npc/events/nguild/nguild_kafras.txt

Restart/Startup server...enjoy =D

Limitations:
Since WoE can be run in pretty much any format, it's kinda impossible for this script to accommodate for all types of WoE. Anyways...here are the limitations of this script.

  • WoE sessions have to start and end on the same day (usually the case but good to state)
  • Only one WoE session is available at a time. In order to start another one, you must end the current one. The generator will complain if you try to overlap sessions.
  • Standard array/variable limits. 128 for number of WoE sessions and separate regions. 31 different castles per region(Not that anyone is gonna use all that...unless they're planning like an all world WoE extravaganza).
  • Time is actually updated using an infinite loop. Depending on the refresh rate setting timing can be off sync with the time WoE actually starts/end (default 500ms/half a second. This isn't a problem if you are using the built in controller)
  • Due to the way in which the original WoE scripts were coded and how I implemented the castle based controller (calls OnAgitEnd/2 events) castles MAY remain open if they do not have an owner.

Notes:

  • Yup...idea for timer based waitingroom was stolen from annie's Mvp Ladder script
  • This script is semi-protected against @reloadscript/@loadnpc commands. Though not recommended that you load the script using this manner, if you must after loading the scripts, to restart the script click each NPC (one NPC only needs to start to initialise the floating main script that controls the WoE timing, but each banner NPC needs to be clicked to start the waitingroom)
  • When doing the timings, it is VERY IMPORTANT that you have the times in order from sunday to saturday and starting time. If you don't do this it'll skip over them till the next week. WoE happens in the order that the timings are specified. Sometimes it may be desirable to have them out of order so it can do one region this week and another one a different week...But this is only a side-effect to the timing design and weird things might happen..so do it at your own risk. (This is no longer a problem in ver 1.10 provided you didn't mess with the config after generating the script)
  • You can change the rate at which the banner is updated by modifying the ".banner_refresh_rate" value in the CONFIG section. The banner will update every '.banner_refresh_rate' seconds.
  • This script is rather dynamic and so adding additional castles just involves modifying and adding arrays. Adding castles to existing regions should be self-explanatory. But setting up a new region...maybe not..
    Steps to setup a new region are as follows:
  • Make up a prefix for the region you are adding (in this example I am using "test"
  • Put all the maps for the castles in an array named ".castles_***" (eg. .castles_test$)
  • Put all the put all the woe ending function addresses into an array named "woe_kill_***" (eg. .woe_kill_test$)
  • Go to the constants section in the script (search for CONSTANTS START)
  • Add the castles and portals in the corresponding sections
  • Add the prefix to the end of the array .regions$, the name of the region in .region_names$ and the map that contains all the castle entrances in the array .region_maps$
  • Tah da!! you have now added a new region.

Feel free to test the hell out of this and report bugs/suggestions/criticism.
88x31.png
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

Edited by Skorm
Added Mirrors.
  • Upvote 12
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

Toasty why I use a script like this WoE?

Untitled.png

make my server crash. Please help, thank you.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

compile your server with higher event queue......

src/map/map.h

#define MAX_EVENTQUEUE 2

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

how to disable timer for this script? my server speed no fast and some of player internet speed slow. it's better i dun use timing thing. to prevent server lag =)

Edited by manabeast
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   48
  • Joined:  11/19/11
  • Last Seen:  

@manabeast

You can either increase the update time of the banner to something longer (default 10 sec)

set .banner_refresh_rate, 10; //how many seconds per banner refresh...keep 1 or above (in seconds)

Or you can completely remove it by changing the WoE Info NPC as so:

FROM:
prontera,163,194,4	script	WoE Info	837,{
if(getwaitingroomstate(3, strnpcinfo(3)) == -1)
	donpcevent strnpcinfo(3)+"::OnInit";

doevent "WoEInfoBase::OnStartMenu";
end;

OnInit:
	while (1) {
		//only updates if msg is different
		set .banner$, getwaitingroomstate(4, strnpcinfo(3));
		if(getvariableofnpc(.roomMsg$, "WoEInfoBase") != .banner$) {
			delwaitingroom;
			waitingroom getvariableofnpc(.roomMsg$, "WoEInfoBase"), 0;
		}
		sleep 500;
	}
	end;
}

TO:
prontera,163,194,4	script	WoE Info	837,{
doevent "WoEInfoBase::OnStartMenu";
end;
}

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

thx thx... love this script :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

hello, im trying to setup the WOE controller for the first time, I was able to, the WOE time shows correct (7pm to 8pm).. however, it says WOE starts at 12:22(AM I guess) and its 10:39A (my server time).. please help .. i am trying my best to understand the script.. im kinda new to this... =( thanks in advance....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

compile your server with higher event queue......

src/map/map.h

#define MAX_EVENTQUEUE 2

what should I replace with the number 3? or with a higher rate?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

up to you ~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  7
  • Reputation:   0
  • Joined:  02/05/12
  • Last Seen:  

need help, i get a problems with this script.

when woe begins, the castle should be open only in accordancewith the schedule.

but the castle is open all the woe starts now.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   4
  • Joined:  12/05/11
  • Last Seen:  

Hello.... where i can get mirror of this websites... becoz sometimes I always get RTO.... Thanks /no1

Hello.... where i can get mirror of this websites... becoz sometimes I always get RTO.... Thanks /ok

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

http://sushiduy.plesk3.freepgs.com/ROScripts/WoeInfo/woeinfo_122.php

i dont think there is any other mirror..beside..it work fine for me all the time.. /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  7
  • Reputation:   0
  • Joined:  02/05/12
  • Last Seen:  

need help, i get a problems with this script.

whenwoebegins,thecastleshould beopenonlyin accordancewith theschedule.

but thecastleis openall thewoestartsnow.

bump /no1(

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  71
  • Topics Per Day:  0.02
  • Content Count:  328
  • Reputation:   13
  • Joined:  11/27/11
  • Last Seen:  

I love this script :)

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

need help, i get a problems with this script.

whenwoebegins,thecastleshould beopenonlyin accordancewith theschedule.

but thecastleis openall thewoestartsnow.

bump :)(

  • Due to the way in which the original WoE scripts were coded and how I implemented the castle based controller (calls OnAgitEnd/2 events) castles MAY remain open if they do not have an owner.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   0
  • Joined:  01/03/12
  • Last Seen:  

how to set 3 day woe in that script ??

friday = 21:00~22:00

saturday = 21:00~22:00

sunday = 21:00~22:00

castle prtg_cas03

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

how to set 3 day woe in that script ??

friday = 21:00~22:00

saturday = 21:00~22:00

sunday = 21:00~22:00

castle prtg_cas03

have you visit the link before you ask this ?

you just need to key in all the info you want your woe to be....

then download..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

where should i place the generated script??and should i delete agit_controller??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  03/02/12
  • Last Seen:  

hey emistry.. i used your script before and its awesome, but one day ive experience a bug during woe.. after the emperium breaks, it doesn't respawn again.. if i'm not mistaken i used the version 1.21.. is this bug is already fix in v.1.22??

i use your script at 3ceam svn revision 640+..

now i'm planning to use again your script at 3ceam 661.. i hope it's already fix..

thanks for the script btw. :)

Edited by friomixx
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

can i use toasty woe controller for woeSE?

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

why is it damage are shown here?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

why is it damage are shown here?

On your confbattleclient.conf

find this block of text

// When set to yes, the damage field in packets sent from woe maps will be set
// to -1, making it impossible for GMs, Bots and Hexed clients to know the
// actual damage caused by attacks. (Note 1)
hide_woe_damage: no

set it to "yes" w/out the quotes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

- how can remove the emperium of other castle that is not activated in our script?..

- as Toasty said you need to capture that castle.. what if i dont want someone capture it because player may get items in tb of that castle when captured

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

gm kill it then

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

gm kill it then

Agree.

That is what I also did. :)

I think no one has ever found a solution for this yet. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...