<event type="login" name="vip" event="script" value="vip.lua"/>
<event type="login" name="exp" event="script" value="exp.lua"/>
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildEvents")
registerCreatureEvent(cid, "vip")
registerCreatureEvent(cid, "exp")
registerCreatureEvent(cid, "Idle")
function onLogin(cid)
if isPremium(cid) == TRUE then
if getPlayerStorageValue(cid, 30002) == -1 then
setPlayerStorageValue(cid, 30002, 1)
end
elseif isPremium(cid) == FALSE then
if getPlayerStorageValue(cid, 30002) == 1 then
setPlayerStorageValue(cid, 30002, -1)
doPlayerSetTown(cid, 1)
doTeleportThing(cid, {x = 32369, y = 32239, z = 7, stackpos = 1}, TRUE)
end
end
return TRUE
end
local ex = getPlayerRates(cid)[SKILL__LEVEL]
function onLogin(cid)
if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 12345) == 0 then
setPlayerStorageValue(cid, 12345, 1)
doPlayerSetRate(cid, SKILL__LEVEL, (ex+0.05))
elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
doPlayerSetRate(cid, SKILL__LEVEL, (ex-0.05))
setPlayerStorageValue(cid, 12345, 0)
end
return TRUE
end
[18/11/2012 16:54:24] [Error - Test Interface]
[18/11/2012 16:54:24] data/creaturescripts/scripts/exp.lua
[18/11/2012 16:54:24] Description:
[18/11/2012 16:54:24] (LuaInterface::luaGetPlayerRates) Player not found
[18/11/2012 16:54:24] [Error - Test Interface]
[18/11/2012 16:54:24] data/creaturescripts/scripts/exp.lua
[18/11/2012 16:54:24] Description:
[18/11/2012 16:54:24] data/creaturescripts/scripts/exp.lua:1: attempt to index a boolean value
[18/11/2012 16:54:24] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/exp.lua)
[Error - Test Interface]
[18/11/2012 17:59:11] data/creaturescripts/scripts/exp.lua
[18/11/2012 17:59:11] Description:
[18/11/2012 17:59:11] (LuaInterface::luaGetPlayerRates) Player not found
[18/11/2012 17:59:11] [Error - CreatureScript Interface]
[18/11/2012 17:59:11] data/creaturescripts/scripts/exp.lua
[18/11/2012 17:59:11] Description:
[18/11/2012 17:59:11] (LuaInterface::luaGetPlayerRates) Player not found
local ex = getPlayerRates(cid)[SKILL__LEVEL]
function onLogin(cid)
if isPlayer(cid) then
if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 12345) == 0 then
setPlayerStorageValue(cid, 12345, 1)
doPlayerSetRate(cid, SKILL__LEVEL, (ex+0.05))
elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
doPlayerSetRate(cid, SKILL__LEVEL, (ex-0.05))
setPlayerStorageValue(cid, 12345, 0)
end
end
return TRUE
end