Could you say what has been changed, so I don't have to compare the files? thanks.
Thanks for be patient !
Use the new war_kill.lua file posted in main thread.eace:
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) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This frag will not count!") if lastHit == TRUE then registerDeath(myGuild, enemyGuild, cid, target) end end end end return TRUE end
I'll check it tomorrow.:$
dofile("./GuildWar.lua")
local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('whiteSkullTime'))
function onKill(cid, target)
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)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This frag will not count!")
registerDeath(myGuild, enemyGuild, cid, target)
end
end
end
return TRUE
end
dofile("./GuildWar.lua")
local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('whiteSkullTime'))
function onKill(cid, target[COLOR="Red"], lastHit[/COLOR])
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)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This frag will not count!")
[COLOR="Red"]if lastHit == TRUE then
registerDeath(myGuild, enemyGuild, cid, target)
end[/COLOR]
end
end
end
return TRUE
end
[08/11/2009 13:26:12] Lua Script Error: [TalkAction Interface]
[08/11/2009 13:26:12] data/talkactions/scripts/GuildWar.luanSay
[08/11/2009 13:26:12] data/lib/database.lua:60: [Result:getDataInt] Result not set!
[08/11/2009 13:26:12] stack traceback:
[08/11/2009 13:26:12] [C]: in function 'error'
[08/11/2009 13:26:12] data/lib/database.lua:60: in function 'getDataInt'
[08/11/2009 13:26:12] ./GuildWar.lua:225: in function 'guildExist'
[08/11/2009 13:26:12] data/talkactions/scripts/GuildWar.lua:8: in function <data/talkactions/scripts/GuildWar.lua:2>
I have this Error:
Please Help Me
The Following Errors Have Occurred:
# Guild with ID 0 doesn't exist.
[C]: in function 'error'
[11/11/2009 00:44:25] data/lib/database.lua:60: in function 'getDataInt'
[11/11/2009 00:44:25] ./GuildWar.lua:194: in function 'getGuildsWithWar'
[11/11/2009 00:44:25] data/globalevents/scripts/wars.lua:4: in function <data/globalevents/scripts/wars.lua:3>
[11/11/2009 00:44:25] [Error - GlobalEvents::think] Couldn't execute event: wars
dofile("./GuildWar.lua")
function onThink(interval, lastExecution)
for _, id in ipairs(getGuildsWithWar()) do
local Check = db.getResult("SELECT `name` FROM `guilds` WHERE id = ".. getGuildWarInfo(id).With .."")
if Check:getID() == LUA_ERROR then
cleanInfo(id)
end
end
return TRUE
end
u should add support for multiple wars