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

[MOVEMENTS] Movement doesn't work, why?

dizoxur

New Member
Joined
Feb 27, 2009
Messages
54
Reaction score
0
Well here's the script:

Movements.xml
PHP:
 <movevent type="StepIn" actionid="10201" event="script" value="PitsOfInferno/MagicWallEntrance.lua" />

MagicWallEntrance.lua
PHP:
local position = {x=920, y=545, z=8}
local position2 = {x=912, y=525, z=8}

function onStepIn(cid, item, pos)
		if (getPlayerItemCount(cid,1970) < 1) then
			doTeleportThing(cid,position)
			doSendMagicEffect(position,10)
		else

			doTeleportThing(cid,position2)
						doSendMagicEffect(position2,10)
		end
	end

The file's at the right location, rly don't know what's wrong. What it should do: when a player steps on a tile and HAS a holy tible, it teleports the player to location "position2", ifnot to "position". But for some reason it doesn't work.. Any idea why?

PS: The tile DOES have the uniqueid 10201. Will give rep if you solve this! :p
 
Lua:
<movevent type="StepIn" uniqueid="10201" event="script" value="PitsOfInferno/MagicWallEntrance.lua"/>


Lua:
local position = {x=920, y=545, z=8}
local position2 = {x=912, y=525, z=8}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if getPlayerItemCount(cid, 1970) > 0 then
        doTeleportThing(cid,position2)
        doSendMagicEffect(position2,10)
        return true
    end 
    doTeleportThing(cid,position)
    doSendMagicEffect(position,10)
return true
end
 
it should
maybe you have configured it bad in the map
well, you began telling in the script it had an actionid then you said it had an uniqueid:huh:
 
Back
Top