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

Movementtype = push?

Ecstacy

Mothafuckaaa
Joined
Dec 26, 2008
Messages
3,836
Reaction score
108
Location
The Netherlands
Hey,

is there any function that will make a player get pushed instead of walking? (For when a player is on no tile(air))

thanks in advance,
unknown666
 
Last edited:
I don't know if nil will work, but if it doesn't try change
if item.itemid == nil then
to
if item.itemid <= 1 then

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if item.itemid == nil then
        doTeleportThing(cid, fromPosition, FALSE)
    end
    return TRUE
end
or
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if item.itemid == nil then
        doMoveCreature(cid, direction) -- Just change direction to somthing, I don't know xD 1,2,3,4 maybe :p
    end
    return TRUE
end
EDIT; WOops forgot you can't step on air XD
 
Last edited:
tile.cpp
Code:
ReturnValue Tile::__queryAdd(int32_t index, const Thing* thing, uint32_t count,
	uint32_t flags) const
{
	const CreatureVector* creatures = getCreatures();
	const TileItemVector* items = getItemList();
	if(const Creature* creature = thing->getCreature())
	{
		if(hasBitSet(FLAG_NOLIMIT, flags))
			return RET_NOERROR;

		if(hasBitSet(FLAG_PATHFINDING, flags))
		{
			if(floorChange() || positionChange())
				return RET_NOTPOSSIBLE;
		}

[B]		if(!ground)
[COLOR="Red"]			return RET_NOTPOSSIBLE;[/COLOR][/B]
can't help you further, learn c++ :/
 
Back
Top