• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Fixed Guild War System for Website [include all]-[will not count frags] (TFS 0.3+)

Status
Not open for further replies.
Wierd for a reason at some players it works fine and at some totaly not...
 
Well, I did everything as you wrote in tutorial and when player1 (guild 1) kills player2 (guild 2), player1 gets frag. Everything seems to be set :f

TFS0.4_DEV (latest revision from trunk)
 
@Zakie:
Hmmm, the function is correct, so I don't see any reason why some players got problem.

@Hermes:
I cannot test the system on 0.4 :$
 
Last edited:
Xampy, keep having this error:

Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\mtibia\xampp\htdocs\pot\OTS_Player.php:265 Stack trace: #0 C:\mtibia\xampp\htdocs\wars.php(556): OTS_Player->getName() #1 C:\mtibia\xampp\htdocs\index.php(95): include('C:\mtibia\xampp...') #2 {main} thrown in C:\mtibia\xampp\htdocs\pot\OTS_Player.php on line 265
 
@renancs look at first post

@Xampy
is that challenge to map fixed?
Lua:
Maps = {
        ["map1"] =
                {
                        Guild1Pos = {x=238, y=442, z=12},
                        Guild2Pos = {x=244, y=442, z=12}
                },
        ["map2"] =
                {
                        Guild1Pos = {x=994, y=1004, z=6},
                        Guild2Pos = {x=1000, y=1003, z=6}                      
                }
        }
 
Xampy you are the best!
Thanks :p xdd.
Xampy, keep having this error:

Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\mtibia\xampp\htdocs\pot\OTS_Player.php:265 Stack trace: #0 C:\mtibia\xampp\htdocs\wars.php(556): OTS_Player->getName() #1 C:\mtibia\xampp\htdocs\index.php(95): include('C:\mtibia\xampp...') #2 {main} thrown in C:\mtibia\xampp\htdocs\pot\OTS_Player.php on line 265
The reason why you get this error is because you deleted some player via phpmyadmin.

Maybe the error will be fixed by pressing these two links:
· http://mtibia.no-ip.info/index.php?subtopic=guilds&action=cleanup_players !
· http://mtibia.no-ip.info/index.php?subtopic=guilds&action=cleanup_guilds !

If this doesn't fix the problem, then you must delete the queries (lines) of the 'deaths_in_wars' table that contains a corrupted ID of player in 'player_id' or 'killer'.
where is this sql query??
I don't know what do you mean.
@renancs look at first post

@Xampy
is that challenge to map fixed?
Lua:
Maps = {
        ["map1"] =
                {
                        Guild1Pos = {x=238, y=442, z=12},
                        Guild2Pos = {x=244, y=442, z=12}
                },
        ["map2"] =
                {
                        Guild1Pos = {x=994, y=1004, z=6},
                        Guild2Pos = {x=1000, y=1003, z=6}                      
                }
        }
It works fine, but it has some bugs.
Example:
Guild 1 vS Guild2
If Player 1 (leader of guild 1) says "/war-challenge", both teams will be teleported to X coordinates whenever the leader of any of both guilds want. I mean, you can be teleported while you are in depot (you can teleport players only if both teams stay in PZ), changing items, etc...
So I'll perform the challenge, btw you can use it, I only disabled the "/war-challenge" command.
 
Last edited:
My gulids don't work when i follow this and can you make it more clearer on 2nd part of the tut please you just say after 1740~ any where ?
 
Not anywhere LOL... It says where. Read below...
 
Xampy I have a suggestion, on war system the PZ should last the normal and not 1 minute, could you tell me where to change it?
 
Uhms? Normally it's 15 minutes, but it takes automatically the time from config.lua -> whiteSkullTime.

PZ after attacking -> 1 minute normally (configurable in config.lua; nothing to be with this guild-war system)
PZ after killing -> 15 minutes normally (configurable in config.lua; the onKill creaturescript takes automatically the value from your config.lua)
 
Uhmm... thanks :)
I have a suggestion, could you add that one or more guilds could be in war, like allies or enemys.
 
Uhmsss... It is explained on the post.
4) Go to guilds.php [it's inside htdocs folder (xampp)] and AFTER (line 1740~) after thissssss V (read down):
PHP:
if($guild_leader) {
if($_POST['todo'] == 'save') {
delete_guild($guild->getId());
$saved = TRUE;
}
paste this:
PHP:
$war = $guild->getCustomField("in_war_with");

if($war == 0) {
and BEFORE (line 1760~) before thissssss V (read down):
PHP:
else
{
$guild_errors[] = 'You are not a leader of guild!';
}
}
paste this:
PHP:
else
{
$guild_errors[] = 'You are in war with with some other guild!';
}
}
 
Just 8~10 lines below that xd.
 
Status
Not open for further replies.
Back
Top