• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[GESIOR2012] Wars on WWW [TFS 1.0 only] - beta version

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,967
Solutions
99
Reaction score
3,383
Location
Poland
GitHub
gesior
Invite guild/accept invitation /cancel invitation/reject invitation - all on WWW.

Some information about TFS 1.0 wars:
- Because of TFS 1.0 limits all wars length must be 7 days [not really :p ].
- Not accepted/canceled/rejected invitations for wars disappear after server restart.
- You can start war anytime (you must relog after start war on www, if you don't want to get 'unjust' in game)


Statistics of wars on page of each guild:
gwarss.PNG


This works only with TFS 1.0!

How to install [I will add on github after few days of tests]:
1. Replace content of pages/guilds.php file with:
http://paste.ots.me/560176/text

http://wklej.to/MZmZk/text

2. Replace content of pages/wars.php file with (you may also need to add link to layout):
http://paste.ots.me/560178/text
http://wklej.to/dx2qs/text

3. Create new file with name guildwar.php in folder classes and paste:
http://paste.ots.me/560177/text

http://wklej.to/pKWcF/text

Website is ready, you can start wars etc., but they will never finish :D
4. Now you must edit your server LUA script, open data/globalevents/scripts/startup.lua and under/over line:
PHP:
db.query("DELETE FROM `guild_wars` WHERE `status` = 0")
paste:
PHP:
db.query("UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `status` = 1 AND (`started` + 86400 * 7) < " .. os.time())

REPORT BUGS IN THIS THREAD
 
Last edited:
I did everything as you wrote in the thread.... Still the guild wars table in the community table just does NOT shows up!

I really want help this fixed or I do not know if I am doing something wrong lol... (100% that I am :p)

Using gesior 0.3.6 and tfs 0.3.6 Please help me :)
 
I did everything as you wrote in the thread.... Still the guild wars table in the community table just does NOT shows up!

I really want help this fixed or I do not know if I am doing something wrong lol... (100% that I am :p)

Using gesior 0.3.6 and tfs 0.3.6 Please help me :)

I think that this is just for TFS 1.0. (as the title states)

And really nice job Geisor, working smoothly for me! :D
 
I did everything as you wrote in the thread.... Still the guild wars table in the community table just does NOT shows up!

I really want help this fixed or I do not know if I am doing something wrong lol... (100% that I am :p)

Using gesior 0.3.6 and tfs 0.3.6 Please help me :)

If you are not using gesior 2012, upgrade due to the security issues, if you are using 0.3.6 download the correct branch and google elf war system.
 
On 0.3.6 / 0.4 you can only show wars, not invite to war on www. To invite to war on 0.3.6 / 0.4 you need special LUA script, but I'm not sure if anyone made that script.
 
Error

Fatal error: Call to a member function fetchAll() on a non-object in C:\xamp_novo\htdocs\classes\databaselist.php on line 68


@Gesior.pl
 
Edit index.php, there is:
define('DEBUG_DATABASE', false);
Change it to true and open page again. It should show error in 'database query' above this 'Fatal error'. Copy it and paste here.
 
Code:
Query:    SELECT `id`, `name`, `password`, `premdays`, `lastday`, `email`, `key`, `create_ip`, `creation`, `premium_points`, `page_access`, `location`, `rlname`, `email_new`, `email_new_time`, `email_code`, `next_email`, `last_post`, `flag` FROM `accounts` WHERE `name` = '758712'
SQLSTATE:    00000
Driver code:   
Error message:   
Query:    SELECT `id`, `name`, `ownerid`, `creationdata`, `motd`, `description`, `create_ip`, `guild_logo` FROM `guilds` WHERE `id` = '2'
SQLSTATE:    00000
Driver code:   
Error message:   
Query:    SELECT `id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `balance`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `deleted`, `create_ip`, `create_date`, `comment`, `hide_char` FROM `players` WHERE `id` = '7'
SQLSTATE:    00000
Driver code:   
Error message:   
Query:    SELECT `players`.`id`, `players`.`name`, `players`.`group_id`, `players`.`account_id`, `players`.`level`, `players`.`vocation`, `players`.`health`, `players`.`healthmax`, `players`.`experience`, `players`.`lookbody`, `players`.`lookfeet`, `players`.`lookhead`, `players`.`looklegs`, `players`.`looktype`, `players`.`lookaddons`, `players`.`maglevel`, `players`.`mana`, `players`.`manamax`, `players`.`manaspent`, `players`.`soul`, `players`.`town_id`, `players`.`posx`, `players`.`posy`, `players`.`posz`, `players`.`conditions`, `players`.`cap`, `players`.`sex`, `players`.`lastlogin`, `players`.`lastip`, `players`.`save`, `players`.`skull`, `players`.`skulltime`, `players`.`lastlogout`, `players`.`blessings`, `players`.`balance`, `players`.`stamina`, `players`.`skill_fist`, `players`.`skill_fist_tries`, `players`.`skill_club`, `players`.`skill_club_tries`, `players`.`skill_sword`, `players`.`skill_sword_tries`, `players`.`skill_axe`, `players`.`skill_axe_tries`, `players`.`skill_dist`, `players`.`skill_dist_tries`, `players`.`skill_shielding`, `players`.`skill_shielding_tries`, `players`.`skill_fishing`, `players`.`skill_fishing_tries`, `players`.`deleted`, `players`.`create_ip`, `players`.`create_date`, `players`.`comment`, `players`.`hide_char` FROM `players` WHERE `account_id` = '2' ORDER BY `name` ASC
SQLSTATE:    00000
Driver code:   
Error message:
 
Back
Top