Arlaxis
www.arlaxis.com
estaría majo, la vrdad xD
registerDeath(myGuild, enemyGuild, cid, target)
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
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
[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
error in function TimetoTeleport,
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