• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua error script

kleitonalan

New Member
Joined
Mar 21, 2013
Messages
289
Reaction score
3
[Error - CreatureScript Interface]
data/creaturescripts/scripts/endPremium.lua:eek:nLogin
Description:
data/creaturescripts/scripts/endPremium.lua:5: attempt to compare number with boolean
stack traceback:
data/creaturescripts/scripts/endPremium.lua:5: in function <data/creaturescripts/scripts/endPremium.lua:1>

[Error - CreatureScript Interface]
data/creaturescripts/scripts/vs_guard.lua:eek:nLogin
Description:

[Error - CreatureScript Interface]
data/creaturescripts/scripts/premiumrate.lua:eek:nLogin
Description:
(luaDoPlayerSendTextMessage) Player not found

endpremium.lua

function onLogin(cid)

if isPremium(cid) then
setPlayerStorageValue(cid, 12449, 1)
elseif getPlayerStorageValue(cid, 12449) >= 1 and not isPremium(cid) then
setPlayerStorageValue(cid, 12449, -1)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerSendTextMessage(cid, 20, "O seu tempo como VIP DONATE terminou, obrigado.")
return true
end

return true
end
 
function onLogin(cid)

local rate = 1.20
local days = getPlayerPremiumDays(cid)

if isPremium(cid) then
doPlayerSetExperienceRate(cid, rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem "..((rate - 1)*100).."% de EXP em vantagem, Ainda lhe restam "..days.." dias de VIP DONATE!")

else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Tornesse Premium e tenha "..((rate - 1)*100).."% a mais de EXP!")
end
return true
end
 
Code:
function onLogin(cid)
    if getPlayerPremiumDays(cid) > 0 then
        setPlayerStorageValue(cid, 12449, 1)
    elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 12449) == 1 then
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
        doPlayerSendTextMessage(cid, 20, "O seu tempo como VIP DONATE terminou, obrigado.")       
        setPlayerStorageValue(cid, 12449, -1)
    end
    return true
end
 
[Error - CreatureScript Interface]
data/creaturescripts/scripts/vs_guard.lua:eek:nLogin
Description:

dofile("./_woe.lua")

function onLogin(cid)
registerCreatureEvent(cid, "vs_guard")
return true
end

function onStatsChange(cid, attacker, type, combat, value)
if not isCreature(attacker) or isPlayer(attacker) then
return true
end
Woe.getInfo()
if (type == STATSCHANGE_HEALTHLOSS) then
if (getCreatureName(attacker):lower() == "guard") then
if (infoLua[2] == getPlayerGuildId(cid)) then
doMonsterChangeTarget(attacker)
return false
end
end
end
return true
end
 
register this in login.lua:
Code:
registerCreatureEvent(cid, "vs_guard")

and use this code:
Code:
function onStatsChange(cid, attacker, type, combat, value) 
if not isCreature(attacker) or isPlayer(attacker) then 
return true
end
Woe.getInfo()
if (type == STATSCHANGE_HEALTHLOSS) then
if (getCreatureName(attacker):lower() == "guard") then
if (infoLua[2] == getPlayerGuildId(cid)) then
doMonsterChangeTarget(attacker)
return false
end
end
end 
return true
end

if error persist send-me the ./_woe.lua
 
the last script

local v = {}
for k = 1, 100000 do
table.insert(v, createConditionObject(CONDITION_MUTED))
setConditionParam(v[k], CONDITION_PARAM_TICKS, k*1000)
end
function onLogin(cid)
if getPlayerStorageValue(cid, 90000) >= os.time() then
doAddCondition(cid, v[tonumber(getPlayerStorageValue(cid, 90000) - os.time())])
end
return TRUE
end
 
Try this:
Code:
local v = {}
for k = 1, 100000 do
table.insert(v, createConditionObject(CONDITION_MUTED))
setConditionParam(v[k], CONDITION_PARAM_TICKS, k*1000)
setPlayerStorageValue(cid, 90000)
end
function onLogin(cid)
if getPlayerStorageValue(cid, 90000) then
doAddCondition(cid, v[tonumber(getPlayerStorageValue(cid, 90000) - os.time())])
end
return TRUE
end
 
Back
Top