• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

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
 
if don't work use this:

talkactions.xml:
Code:
<talkaction log="yes" words="/mute;/desmute" access="2" event="script" value="muteplayer.lua"/>

data/talkactions/scripts/mute.lua:
Code:
 local v = {}
for k = 1, 100 do
table.insert(v, createConditionObject(CONDITION_MUTED))
setConditionParam(v[k], CONDITION_PARAM_TICKS, k*60*1000)
end
function onSay(cid, words, param)
if (words == "/mute") then
local t = string.explode(param, ",") 
if param == '' then  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")  return true end 
local player,time,pid = getPlayerByName(t[1]),t[2],getPlayerByNameWildcard(t[1]) 
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")  return TRUE  end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already muted "..t[1].." by "..time.." minutes.")
doAddCondition(player, v[tonumber(time)])
setPlayerStorageValue(player, 90000, os.time()+time*60)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "You muted "..time.." minutes.")
elseif (words == "/desmute") then
if param == '' then  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")  return true end 
local player = getPlayerByNameWildcard(param)
if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true end
if getCreatureCondition(player, CONDITION_MUTED) == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this player dont muted.") return true end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You unmuted the player "..param..".")
doRemoveCondition(player, CONDITION_MUTED)
setPlayerStorageValue(player, 90000, -1)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "You already unmuted.")
end
return true 
end
creaturescript.xml:
Code:
<event type="login" name="MutePlayer" event="script" value="mute_check.lua"/>

creaturescript/script/mute_check.lua:
Code:
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

by Vodkart
 
Back
Top