• 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.
xD...
/////

@PATrar:
It already count frags in website...
 
o.o ... okay...il try it, but it will work on styller yuroots 8.50~8.52?
 
I don't know cos' I only tested it on TFS 0.3.x
 
Frags not count on because the file war_kill.lua does not send to deaths_in_wars tables in the database of information about the kill in war


The text translated in translate.google.com

@edit
And guilds/kills
 
It must count the frags, I can see a lot of websites that uses this system and it count the frags.
As you can see, in war_kill.lua there's:
Lua:
registerDeath(myGuild, enemyGuild, cid, target)
And you can go to GuildWar.lua from OTServer directory (where the .exe is), then open it; search for "registerDeath" function and you can see that all is correct.

PHP:
function registerDeath(myGuild, enemyGuild, cid, target)
	db.executeQuery("INSERT INTO `deaths_in_wars` (`guild_id`, `player_id`, `killer_guild`, `killer`, `date`) VALUES ("..enemyGuild..", "..getPlayerGUID(target)..", "..myGuild..", "..getPlayerGUID(cid)..", " .. os.time() ..");")	
	db.executeQuery("UPDATE `guilds` SET `kills` = `kills` + 1 WHERE `id` = ".. myGuild .."")
end
 
Nie chce mi się tłumaczyć więc napisze po polsku


To co może być źle że w death_in_wars jest puste?> w guild też niewysyła ile jest zabić
 
¿¿¿¿¿¿¿¿¿¿??????????

Write in English, please.
 
@twitbeef,icechaw,softcore this sys is improved :blink::( i want itttt
 
What could be wrong that death_in_wars is empty?> In the guild or if not send a kill
 
I have a problem ;/
bladq.png

Anybody know what is it?
 
@Batonek
What is your version? I think is a lack functions in the engine
 
@PATrar:
Maybe you forgot something. Read the tutorial again and do all again.


@Batonek:
It's because there isn't any guild in war yet. No problem about that, when two guilds in war, you won't care about this error.
 
Could you make a script which doesn't count several frags because your war system counts kinda much frags...
Example:
One person died by 4 people and these 4 peoples gain the kills at war kill statics. xD
 
It's already done. Check war_kill.lua, check it on main post or change yours by this:
Lua:
dofile("./GuildWar.lua")

local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('whiteSkullTime'))

function onKill(cid, target, lastHit)
        if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
                local myGuild = getPlayerGuildId(cid)
                local enemyGuild = getPlayerGuildId(target)
                if myGuild ~= 0 and enemyGuild ~= 0 then
                        if enemyGuild == getGuildWarInfo(myGuild).With then
                                doAddCondition(cid, PZ)
                                if lastHit == TRUE then
                                    registerDeath(myGuild, enemyGuild, cid, target)
                                end
                        end
                end
        end
        return TRUE
end
 
Using mod system say this error:
[27/10/2009 23:04:04] Loading wars.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/wars.xml
[27/10/2009 23:04:04] Line: 1, Info: XML declaration allowed only at the start of the document

Using script system talkactions,global,creaturescripts etc say:
error in function TimetoTeleport,

I'm using lastet version of TFS, 0.3.5 ;x
 
It's already done. Check war_kill.lua, check it on main post or change yours by this:
Lua:
dofile("./GuildWar.lua")

local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('whiteSkullTime'))

function onKill(cid, target, lastHit)
        if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
                local myGuild = getPlayerGuildId(cid)
                local enemyGuild = getPlayerGuildId(target)
                if myGuild ~= 0 and enemyGuild ~= 0 then
                        if enemyGuild == getGuildWarInfo(myGuild).With then
                                doAddCondition(cid, PZ)
                                if lastHit == TRUE then
                                    registerDeath(myGuild, enemyGuild, cid, target)
                                end
                        end
                end
        end
        return TRUE
end

Nope ain't working. People still get several frags.
 
Status
Not open for further replies.
Back
Top