Monday, December 1, 2008

War Of Emperium Setter 3

Ultimate WoE 3

Created by: [GM]Xeon
Global Version: 3.4.2


Features:

Players can view a detailed listing [Is it active now? What towns it applies to, what castles it applies to, the start/end day, hour, minute] of all WoE times that are set and it it sorted by which WoE is next.
GM's can add, modify and delete WoE times
WoE times can be set to any town, and multiple at the same time!
WoE times can be set to any castles within the selected town(s) at the same time!
WoE times can be set for all the classic towns and castles, as well as the new second edition ones!
WoE time starts/ends can be randomized by a specified amount of seconds. This only works to an extent.. See known bugs.
WoE can be manually started/ended.
WoE may resume in the event of a server crash.
Mob spawns in empty castles can be disabled.
Script automatically creates the SQL tables for you on the first load!
See plug-ins for extended features.


Plug-ins:

Player - Castle Ownership View
GM - Change/Release Castle Ownership
GM - Edit Castle Investments
GM - Guild Information Query Tool
GM - Guild Manager Jump-to
Player - Guild Recruiter
GM - Treasure Spawner
GM - Enable/Disable Treasure Spawns
Player - Secured Guild Storage
Player - Guild Mailbox
GM - Castle/Emperium Warp-to
Player - Secure Guild Bank


Known Bugs:

WoE time randomization is only set when the time is added or modified. NOT when the script automatically updates the tick columns in the SQL table. I'll fix this in a future version.
When a server crashes or is shut down, WoE times *may* not resume when it's back up. Test this thoroughly for me please =).
Disabling mob spawns in empty castles will not kill them if they already spawned, restarting the server or killing them manually solves this problem.
Modifying a WoE time while it is active to a time frame where WoE should not be active currently (Is NOT smart) does NOT automatically stop the WoE, so you should stop it beforehand! (This does not apply to extended active WoE times, that works perfect.)


Future Features:

Available upon request


Changes: (Bug fixes and optimizations not recorded here, check the change log inside the rar)

v1.x: The original WoE Setter script by Fredzilla. The foundation and guideline of the WoE Setter series by me.
v2.x: What I consider my old school highly unoptimized WoE setter
v3.0: The new generation of WoE management created! (This script )
v3.1: NPC now has a WoE start/end time message above its head (Very useful for testing!), can manually start WoE through the NPC GM menu, players can view a list of what guilds own what castles.
v3.2: Castle ownership can now be changed through the NPC.
v3.3: Added treasure spawn function and Emperium breaker announce.
v3.4: Added plug-in mod


If you see...:

[Error]AgitStart2; Expect command, missing function name or calling undeclared function when the script loads - Update your SVN (It has to be the LATEST, not "Oh, it's close enough. 3 weeks old.")! Please guys, DO NOT REPLY SAYING YOU GET A RUNTIME ERROR BECAUSE YOUR SVN IS OUTDATED!
[SQL]DB error - Table 'woe_times' doesn't exist, displayed on the map server when the script loads or you try to use it - You must either @reloadscript or restart your server so the OnInit in the main script executes. You cannot @loadnpc this for the first time! If the problem persists, read the next error about not being able to create the table and use that solution.
[SQL]You don't have permission to create the table in MySQL, displayed on the map server when the script loads - Open the .sql file included in the rar and highlight the code, paste it into your favorite SQL client (query browser, myphpadmin, etc.). Also, if the error keeps happening (Which it will if your server SQL account doesn't have table creation privs) on every server OnInit, simply comment the line starting with 'query_sql("CREATE'.
[Error]Your PC constantly beeps and gives you hundreds of "unmatch )" messages when the script loads - Your SVN is way outdated and doesn't support agistart/end2; and agitcheck2(); update your SVN!
[In-game]I set a WoE time and it won't start when it's supposed to! - Verify you updated your scripts_guild.conf/guild folder/guild2 folder with the rar, then verify that the time you set was not set to a time that was in the past to present/future, because then it'll just default to starting next week. Also, make sure you set the time in MILITARY TIME, i.e. a 24-hour clock. Not AM/PM, 0:00-23:59, 0=12 AM, 23=11 PM. Easy trick to know military time: If the current time is AM that is the hour to enter (12AM=00 though), if it is PM add 12 (Unless it is 12 PM).
[Debug]You receive "Map "" doesn't exist" debug messages while changing castle ownership - Ignore these, it's a temporary bug I'll fix later. There is no adverse side effects.
[In-game]Your plug-in didn't show up in the NPC's menu - You need to load the plug-in by restarting the map server, not using @loadnpc or @reloadscript.
You're using TXT - This is SQL only; why on earth are you still using TXT?
You're using stable - Use trunk, like the huge red letters below state.

Your server MUST be TRUNK SQL and at LEAST SVN 13202 to properly work, and there are some reported cases that SVN 13202 doesn't work, so I recommend an even higher SVN. It is also highly recommended your server SQL account has table creation privileges for the first time the script is run.

Install instructions: First off make sure you HAVE THE LATEST SVN! Now onto the real part, unrar the downloaded file to a new folder, CUT the guild folder, guild2 folder, scripts_guild.conf file, and the scripts_woe.conf file and PASTE them IN your server's NPC FOLDER, overwrite everything. Now in the custom folder from the rar cut the woe_setter_3.txt and Plugins folder and paste them in your npc/custom folder. Add this to your scripts_main.conf in your npc folder; "import: npc/scripts_woe.conf". Now open scripts_woe.conf with notepad, uncomment and plugin lines you wish to load with the script. You're done, start the server and have fun (You must either @reloadscript or restart the entire server)! Report bugs!

Download-Updated When Changed.

To the pro scripters out there: If you find optimizations to the script, send em in a PM to me! And yes, I know the tick count function is severely...dilapidated... But it seems to work, so i'm fine with it

Reporting ANY bugs is very appreciated, even minor spelling bugs I'd like to fix. I have not tested this script much, so your replies are very appreciated. Note: WoE (In specific, agit and agit2) for both normal and second edition are ALWAYS ON, do NOT use @agistart{2} and @agitend{2} because it may have serious side effects with automatic WoE times. Though they are always on, emperium should not spawn unless this script has a WoE time active! And remember, have fun!!

@L0ne_Wolf/Anyone who is going to officially optimize the WoE SE script: Give me a heads up to the structure of the new script, so i can update this script so it'll work with the new WoE SE'!

Mirrors are welcome!

No comments: