• 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!

Request: Tile that add exp - DONE - ONE MORE TIME CYKOTITAN SOLVED ;D

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
I want one script ( i think globalevent) for one tile.
Each 1 hour, the player on that tile with X actionid will receive 500000 exp. Per hour.
Is that possible?
Ty,
Inferno-OT OWnwer.
Rep+++ ofc ;P
:peace:
 
Try this:

globalevents.xml:
Code:
	<globalevent name="gainExp" interval="3600" event="script" value="gainExp.lua"/>

gainExp.lua:
Code:
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
 
playerPos = {x=000, y=000, z=0} --Edit the position here
ill have to edit that with every fking tile ._. and i want do a place like 300x300 lol
 
I think it should look like this.

Code:
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
 
o ye, it's globalevent :/
Code:
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
 
Last edited:
ok. I will be finishing my update of my serv and upload map to serv and... well test :P
ill post here later if worked. thnanks :D always, cykotitan rulex :P
 
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

buggas
 

MoBHC.png
 
Back
Top