TFS 0.3.6pl1 , cant load the script :/ why,
[20/09/2010 21:05:17] [Error - LuaScriptInterface::loadFile] cannot open data/talkactions/scripts/Blessings.lua: No such file or directory
[20/09/2010 21:05:17] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/Blessings.lua)
[20/09/2010 21:05:17] cannot open data/talkactions/scripts/Blessings.lua: No such file or directory
[20/09/2010 21:05:17] [Error - LuaScriptInterface::loadFile] cannot open data/talkactions/scripts/Blessings.lua: No such file or directory
[20/09/2010 21:05:17] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/Blessings.lua)
[20/09/2010 21:05:17] cannot open data/talkactions/scripts/Blessings.lua: No such file or directory
PHP:
local levelNeeded = 30
local basePrice = 2000
local blessLeveled = true
local bless = {}
local t = 0
function onSay(cid, words, param, channel)
local level = getPlayerLevel(cid)
local v = (blessLeveled and ((level > 30 and level < 120) and ((level - 30) * 200 + basePrice) or level > 120 and 20000 or level < 30 and basePrice) or 10000)
for i = 1, 5 do
if not getPlayerBlessing(cid, i) then
table.insert(bless, i)
t = t + 1
end
end
if level >= levelNeeded then
local price = v
if doPlayerRemoveMoney(cid, price * t) then
for i = 1, 5 do
if not getPlayerBlessing(cid, i) then doPlayerAddBlessing(cid, i) end
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, (price * t > 0 and "You bought " .. t .. " blessings for " .. price * t .. " gold coins." or "You already have all blessings."))
doSendMagicEffect(getCreaturePosition(cid), (price * t > 0 and CONST_ME_MAGIC_RED or CONST_ME_POFF))
price = 0
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You do not have enough money.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need level " .. levelNeeded .. " or higher to buy blessings.")
return true
end
end