<moveevent type ="StepIn" actionid = "20321" event = "script" value = "TileEXP.lua" />
TileEXP.lua
local exp = 150 -- Quanto de exp vai adicionar
local interval = 3 -- Em quantos segundos
local function xp(uid, pos)
if not isCreature(uid) then
return false
end
local p = getThingPos(uid)
if p.x ~= pos.x or p.y ~= pos.y or p.z ~= pos.z then
return false
end
doPlayerAddExperience(uid, exp)
addEvent(xp, interval * 1000, uid, pos)
return true
end
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if isPlayer(cid) then
addEvent(xp, interval * 1000, cid, toPosition)
end
return true
end