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

doTeleportThing(cid, newpos[, pushmove = true, ignoreBlocking = true])

Oskar1121

Excellent OT User
Joined
Jul 15, 2009
Messages
706
Reaction score
713
Location
Poland
I'm looking for someone who remake me that function so you can decide whether you want to teleport objects blocking or not.

PHP:
doTeleportThing(cid, newpos[, pushmove = true[, ignoreBlocking = false]])

If this option (ignoreBlocking) is selected it does not teleport us and returns false.

And on occasion add an option to this feature, which would be set up where an object is a player to receive:
PHP:
doPlayerAddItem(uid, itemid[, count/subtype[, canDropOnMap = true[, slot = CONST_SLOT_BACKPACK]]])
 
Last edited:
add this in any file inside data/lib (preferably 050-function.lua):
LUA:
local _f = doTeleportThing
function doTeleportThing(cid, newpos, pushmove, ignoreBlocking)
	return (not ignoreBlocking or doTileQueryAdd(cid, newpos) == 1) and _f(cid, newpos, pushmove)
end
it won't teleport you to newpos if there's a creature/player there, do you want to it to ignore creatures?

doPlayerAddItem is a bit more complicated, best done with source edit or eventually a hack in lua
 
Last edited:
Back
Top