<globalevent name="gainExp" interval="3600" event="script" value="gainExp.lua"/>
function onThink(interval, lastExecution)
playerPos = {x=000, y=000, z=0} --Edit the position here
getPlayer = getThingfromPos(playerPos)
if isPlayer(getPlayer.uid) then
doPlayerAddExp(getPlayer.uid, 500000)
return TRUE
else
return FALSE
end
end
function onThink(cid, interval)
local players = getPlayersOnline()
for _,cid in ipairs(players) do
if getTileThingByPos(getThingPos(cid)).aid == [B]4605[/B] then
doPlayerAddExperience(cid,500000)
return doSendMagicEffect(getThingPos(cid),12)
end
end
end
function onThink(interval, lastExecution)
for _, pid in ipairs(getPlayersOnline()) do
local pos = getThingPos(pid)
pos.stackpos = 0
if getThingfromPos(pos).actionid == 4605 then
doPlayerAddExperience(pid, 500000)
doSendMagicEffect(pos, 12)
end
end
return true
end
What else? :huh:
o ye, it's globalevent :/
Code:function onThink(interval, lastExecution) for _, [B]pid[/B] in ipairs(getPlayersOnline()) do local pos = getThingPos(pid) pos.stackpos = 0 if getThingfromPos(pos).actionid == 4605 then doPlayerAddExperience([B]cid[/B], 500000) doSendMagicEffect(pos, 12) end end return true end