• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

floorchange

foxkbt

Member
Joined
Sep 29, 2009
Messages
290
Reaction score
7
Location
Salvador
hello ot landers!

i need help with some shit in c++

i making a new system of down stairs
I want that when the creature moves over the tile with floorchange attribute,it is not teleported
but when an item is thrown on the tile he fell to the floor below

Code:
	<item id="459" name="stairs">
		<attribute key="floorchange" value="down" />
	</item>

Rep ++
 
can't you use a movement??
LUA:
function onAddItem
if not (isPlayer(cid)) then
if tileitem == blabla then
doTeleportThing(moveitem, blabla)-- you know to use your mind and i want to sleep

i just gave you an idea on how it can be done you can use your mind and make it
 
sirion@
i want only items be teleported
to my moveevents script work

tetra@
ow thx man
i will try here!

~~~EDIT~~~
I did it!
thx tetra for idea!
^^
 
Last edited:
its here
Code:
function onAddItem(moveitem, tileitem, position, cid)
	if(tileitem.itemid == jumptile) then
		for zica = 1,14 do
			if getTileThingByPos({x = position.x,y = position.y,z = position.z+zica,stackpos = 0}).itemid > 0 then 
				doTeleportThing(moveitem.uid, {x = position.x,y = position.y,z = position.z+zica})
			end
		end
	end
	return true
end
 
Code:
function onAddItem(moveitem, tileitem, position, cid)
	if(tileitem.itemid == jumptile) then
		for zica = 1,14 do
			if getTileThingByPos({x = position.x,y = position.y,z = position.z+zica,stackpos = 0}).itemid > 0 then 
				doTeleportThing(moveitem.uid, {x = position.x,y = position.y,z = position.z+zica})
      elseif moveitem == xx then -- corpse id 
              doSendMagicEffect(getThingPos(moveitem), 15)---if it work you will see magic effect :)
			end
		end
	end
	return true
end
 
Back
Top