• 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 Problem with Simple Script

Bonbon

.: Mútànt :.
Joined
Jul 24, 2008
Messages
240
Reaction score
0
Location
Germany
Well,
Hi there all.

I am using Crying Damson 0.3.6 pl1

My Problem:
It's a very simple Script, but idk what's wrong with it.
Code:
function onStepIn(cid, item, frompos, item2, topos)
local pos = {x=79, y=96, z=3} 
if item.itemid == 9566 then
elseif getCreaturePosition (cid) == pos  then
doPlayerSendTextMessage (cid,21,"You can climb up this Mountain with the Spell exani hur up.")
end
return TRUE
end
I'll rep++
 
Last edited:
Lua:
function onStepIn(cid, item, frompos, item2, topos)
local pos = {x=79, y=96, z=3} 
if item.itemid == 9566 then
elseif getCreaturePosition (cid) == pos  then
doPlayerSendTextMessage (cid, "You can climb up this Mountain with the Spell exani hur up.", 21)
end
return TRUE
end
 
I'm not sure if you can use getCreaturePosition(cid) == pos
Lua:
function onStepIn(cid, item, frompos, item2, topos)
local pos = {x=79, y=96, z=3}
	if item.itemid == 9566 then
		if getCreaturePosition(cid) == pos then
			doPlayerSendTextMessage (cid, 22, "You can climb up this Mountain with the Spell exani hur up.")
		end
	end
return true
end

If it doesn't work then try this one:
Lua:
function onStepIn(cid, item, frompos, item2, topos)
local pos = {x=79, y=96, z=3}
	if item.itemid == 9566 then
		if getCreaturePosition(cid).x == pos.x and getCreaturePosition(cid).y == pos.y and getCreaturePosition(cid).z == pos.z then
			doPlayerSendTextMessage (cid, 22, "You can climb up this Mountain with the Spell exani hur up.")
		end
	end
return true
end
 
Code:
local _pos = {x=79, y=96, z=3}
function onStepIn(cid, item, pos, fromPosition)
	if pos.x == _pos.x and pos.y == _pos.y and pos.z == _pos.z then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You can climb up this Mountain with the Spell exani hur up.")
	end
end
 
Back
Top Bottom