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

Lua tile that when you step on displays a book like msg

sharpy

New Member
Joined
Jan 4, 2010
Messages
77
Reaction score
0
Im trying to make a tile with an action id that when you step on it a book like message pops up on the players screen here is the code ive got it returns no errors in the server but does nothing when you step on it

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		if onStepIn(cid, {getPlayerLevel(cid)}) then
			if getPlayerLevel(cid) == 1 then
				doPlayerPopupFYI(cid, "You venture onto a wierd town with a lever that somehow spawns rats.")
			end
		end
	return 1
end
 
You made weird things there.
It should be like this
Lua:
function onStepIn(cid, item, pos)
         if getPlayerLevel(cid) == 1 then
            doPlayerPopupFYI(cid, "You venture onto a wierd town with a lever that somehow spawns rats.")
            end
	return 1
end
 
lol ya im just learning to script and all i really have to go on is other scripts and trial and error
again i have a problem
(Warning event::load script) event onUse not found
 
lol ya im just learning to script and all i really have to go on is other scripts and trial and error
again i have a problem
(Warning event::load script) event onUse not found

Haha, its ok
Anyway, this should go in movements/scripts not actions/scripts.
Since its a movement(you stepIn a tile :p)
 
ohhh ya that makes more sense TY again for your help XD deffinatly giving you some rep for helping me so much :p
 
Last edited:
Back
Top