in TFs0.3.4pl2 is working good
same
in TFs0.3.4pl2 is working good
[23/05/2009 09:57:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
[23/05/2009 09:57:36] data/talkactions/scripts/GuildWar.lua:20: 'end' expected (to close 'if' at line 12) near '<eof>'
[23/05/2009 09:57:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
[23/05/2009 09:57:36] data/talkactions/scripts/GuildWar.lua:20: 'end' expected (to close 'if' at line 12) near '<eof>'
[23/05/2009 09:57:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
[23/05/2009 09:57:36] data/talkactions/scripts/GuildWar.lua:20: 'end' expected (to close 'if' at line 12) near '<eof>'
[23/05/2009 09:57:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
[23/05/2009 09:57:36] data/talkactions/scripts/GuildWar.lua:20: 'end' expected (to close 'if' at line 12) near '<eof>'
[23/05/2009 09:57:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
[23/05/2009 09:57:36] data/talkactions/scripts/GuildWar.lua:20: 'end' expected (to close 'if' at line 12) near '<eof>'
[23/05/2009 09:57:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
[23/05/2009 09:57:36] data/talkactions/scripts/GuildWar.lua:20: 'end' expected (to close 'if' at line 12) near '<eof>'
dofile("./GuildWar.lua")
local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('pzLocked'))
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
removeFrag(cid)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This Frag will not count") --Remove this if you wish
doAddCondition(cid, PZ)
registerDeath(myGuild, enemyGuild, cid, target)
end
end
end
return TRUE
end
function onKill(cid, target)
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You can enter to next room!')
end
return TRUE
end
registerCreatureEvent(cid, "PlayerKill")
<event type="kill" name="PlayerKill" event="script" value="kill.lua"/>
<event type="attack" name="WarAttack" event="script" value="war_attack.lua"/>
<event type="kill" name="WarKill" event="script" value="war_kill.lua"/>
dofile("./GuildWar.lua")
function onAttack(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
if getPlayerSkullType(cid) == 3 or getPlayerSkullType(cid) == 4 then
if getPlayerSkullType(target) == 0 then
doCreatureSetSkullType(cid, 1)
doCreatureSetSkullType(target, 1)
end
end
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)
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)
registerDeath(myGuild, enemyGuild, cid, target)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This frag will not count!")
end
end
end
return TRUE
end
registerCreatureEvent(cid, "WarAttack")
registerCreatureEvent(cid, "WarKill")
@up & re-up xD:
Thanks
So Lording & richiaddict, maybe you missed something, some step or whatever.
Do it again, step per step and it will work. Or, re-download the server 0.3.4 pl2 (or pl1 for Lording) and change the database.lua file only.
Regards.
@Pietia:
Maybe I will make it for 0.2 if I have some free time, cos' now I have final exams in my school and I have to study a lot...
@Raggarn:
What do you mean? If a player is killed by the last hit of two people (blahblah was killed by One and Two.) ??? And it count two frags? I will revise the script. Thank for advise.
data/lib/database.lua:60: [Result:getDataInt] Result not set!
stack traceback:
[C]: in function 'error'
data/lib/database.lua:60: in function 'getDataInt'
./GuildWar.lua:225: in function 'guildExist'
data/talkactions/scripts/GuildWar.lua:9: in function <data/talkactions/scripts/GuildWar.lua:3>
@Elox & Zonet:
I will test it and repair it on TFS 0.3.4 PL2 and the TFS 0.2.2; I will post the scripts for that versions, if I can, this weekend.
Sorry.