Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio
Klient: 8.41 & 8.42
Silnik: TFS 0.3.4 Patch 2(Crying Damson)
Opis B??du: Wyskakuja mi w konsoli takie Bledy:
[.CODE]Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/GuildWar.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/GuildWar.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/GuildWar.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/GuildWar.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/GuildWar.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/GuildWar.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/GuildWar.lua)
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/war_attack.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/war_attack.lua)
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/war_kill.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/war_kill.lua)
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/wars.lua
cannot open ./GuildWar.lua: No such file or directory
[Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/wars.lua)[.CODE]
Skrypty:
Guild War:
[.CODE]dofile("./GuildWar.lua")
function onSay(cid, words, param)
if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then
local myGuild = getPlayerGuildId(cid)
if words == "/war-invite" then
if GuildIsInPEace(myGuild) == true then
if param ~= "" then
if guildExist(param) ~= LUA_ERROR then
local invitedGuild = getGuildId(param)
if invitedGuild ~= LUA_ERROR then
if invitedGuild ~= myGuild then
if GuildIsInPEace(invitedGuild) == true then
doInviteToWar(myGuild, invitedGuild)
doBroadcastMessage(BroadCast[1][1] ..getPlayerGuildName(cid).. BroadCast[1][2] ..getGuildNameById(invitedGuild).. BroadCast[1][3], BroadCast_Type)
else
doPlayerSendCancel(cid, CancelMessagesWar[6])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[8])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[4])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[4])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[7])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[5])
end
elseif words == "/war-accept" then
if getGuildWarInfo(myGuild).By ~= 0 then
local enemyGuild = getGuildWarInfo(myGuild).By
doBroadcastMessage(BroadCast[2][1] ..getPlayerGuildName(cid).. BroadCast[2][2] ..getGuildNameById(enemyGuild).. BroadCast[2][3], BroadCast_Type)
WarAccept(myGuild, enemyGuild)
else
doPlayerSendCancel(cid, CancelMessagesWar[1])
end
elseif words == "/war-reject" then
if getGuildWarInfo(myGuild).By ~= 0 then
doBroadcastMessage(BroadCast[3][1] ..getPlayerGuildName(cid).. BroadCast[3][2] ..getGuildNameById(getGuildWarInfo(myGuild).By).. BroadCast[3][3], BroadCast_Type)
cleanInfo(getGuildWarInfo(myGuild).By)
cleanInfo(myGuild)
else
doPlayerSendCancel(cid, CancelMessagesWar[1])
end
elseif words == "/war-cancel-invite" then
if getGuildWarInfo(myGuild).To ~= 0 then
if getGuildWarInfo(myGuild).With == 0 then
doBroadcastMessage(BroadCast[4][1] ..getPlayerGuildName(cid).. BroadCast[4][2] ..getGuildNameById(getGuildWarInfo(myGuild).To).. BroadCast[4][3], BroadCast_Type)
cleanInfo(getGuildWarInfo(myGuild).To)
cleanInfo(myGuild)
else
doPlayerSendCancel(cid, CancelMessagesWar[3])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[1])
end
elseif words == "/war-challenge" then
local map = Maps[param]
if map then
if getGuildWarInfo(myGuild).With ~= 0 and getGuildWarInfo(myGuild).ON == 0 then
local enemyGuild = getGuildWarInfo(myGuild).With
addEvent(StarWar, 15 * 1000, {myGuild = myGuild, enemyGuild = enemyGuild, map = param})
doBroadcastMessage(BroadCast[5][1] ..getPlayerGuildName(cid).. BroadCast[5][2] ..getGuildNameById(enemyGuild).. BroadCast[5][3] .. param ..".", BroadCast_Type)
else
doPlayerSendCancel(cid, CancelMessagesWar[10])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[9])
end
elseif words == "/war-cancel" then
local enemy = getGuildWarInfo(myGuild).With
if enemy ~= 0 then
if (os.time() - getGuildWarInfo(myGuild).T) >= (1 * DelayToCancel) then
StopWar(myGuild, enemy)
doBroadcastMessage(BroadCast[6][1] ..getGuildNameById(myGuild).. BroadCast[6][2] ..getGuildNameById(enemy).. BroadCast[6][3], BroadCast_Type)
else
doPlayerSendCancel(cid, CancelMessagesWar[11])
end
else
doPlayerSendCancel(cid, CancelMessagesWar[10])
end
end
else
doPlayerSendCancel(cid, CancelMessagesWar[2])
end
local file = io.open("data/logs/Wars.txt", "a")
file:write("".. os.date("%d %B %Y %X ", os.time()) .." --> "..getCreatureName(cid)..": "..words.." "..param.."\n")
file:close()
return TRUE
end[.CODE]
War_Attack:
[.CODE]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[.CODE]
War_Kill:
[.CODE]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[.CODE]
Wars:
[.CODE]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[.CODE]
Ewentualne Uwagi: Nie wiem w czym problem ktorys z skryptow nie dziala poprawnie i prosze o poprawienie go oraz jesli nie bedzie to sprawialo duzego klopotu wyjasnienie bledu z gory dziekuje.