local config =
{
storage = 1112,
points = 100
level = 100,
}
function onAdvance(cid, skill, oldLevel, newLevel)
local storage = getPlayerStorageValue(cid, config.storage)
if (skill == SKILL__LEVEL and newLevel == config.level and storage == -1) then
doPlayerAddPremiumPoints(cid, config.points)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulation! You got 200 premium points")
setPlayerStorageValue(cid, config.storage, 1)
end
return true
end
[23/02/2010 17:19:16] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/200points.lua)
[23/02/2010 17:19:16] data/creaturescripts/scripts/200points.lua:5: '}' expected (to close '{' at line 2) near 'level'
[23/02/2010 17:48:02] Lua Script Error: [CreatureScript Interface]
[23/02/2010 17:48:02] data/creaturescripts/scripts/10cc.lua:onAdvance
[23/02/2010 17:48:02] data/creaturescripts/scripts/10cc.lua:10: attempt to call global 'addPlayerItem' (a nil value)
[23/02/2010 17:48:02] stack traceback:
[23/02/2010 17:48:02] data/creaturescripts/scripts/10cc.lua:10: in function <data/creaturescripts/scripts/10cc.lua:7>
local config =
{
storage = 1111,
item = {2160,10},
level = 80,
}
function onAdvance(cid, skill, oldLevel, newLevel)
local storage = getPlayerStorageValue(cid, config.storage)
if (skill == SKILL__LEVEL and newLevel == config.level and storage == -1) then
addPlayerItem(cid, config.item[1], config.item[2])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulation! You got 10 crystal coins")
setPlayerStorageValue(cid, config.storage, 1)
end
return true
end