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

[Doors]Some error.

slaw

Software Developer
Joined
Aug 27, 2007
Messages
3,784
Solutions
133
Reaction score
1,275
Location
Germany
GitHub
slawkens
Code:
	elseif isInArray(horizontalOpenDoors, item.itemid) == TRUE then
		local newPosition = toPosition
		newPosition.y = newPosition.y + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if getTilePzInfo(doorPosition) == FALSE or getTilePzInfo(newPosition) == TRUE then
			if doorCreature.itemid ~= 0 then
				doTeleportThing(doorCreature.uid, newPosition, TRUE)
			end
			doTransformItem(item.uid, item.itemid - 1)
		else
			doPlayerSendCancel(cid, "Sorry, not possible.")
		end
		return TRUE
This is taken from orginal doors.lua, and there is a errors, that you can only open doors which are under you, i can show it:
...P....
...D....
P- Player
D- Door
At this moment you can open door, but now:
...D...
...P...
"Sorry, not possible."

I was trying to fix it, and i fount it:
Code:
newPosition.y = newPosition.y + 1
when you'll change "+" to "-" then you can do it inversely(conversely, contrariwise - don't know which word to use ;D)
I'm speaking about houses. After changing + to - to can open doors above you, but under you - "Sorry, not possible."
 
horizontalOpenDoors are all open doors, so you can't open them, but only close, and the newpos.y = newpos.y + 1 or w/e is meaning that if you are standing on the door pos and closing them, you will get pushed to pos y + 1. Also, I do not have any problem with opening/closing any doors.
 
@Sry, reply in Polish ;P

A w domach tez Ci działają? Bo mi jakoś nie, mam najnowsze global oraz doors, problem rozwiązałem dodając pare linijek.

Mi po prostu nie działały albo drzwi które były nademną, albo te podemną. I tak zresztą miałem na serwerze, że w niektórych domkach sie dało, a w niektórych nie.
 
Back
Top