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

Pozycja po wejściu na drabinkę.

Martin93

~WebDesign
Joined
Nov 11, 2008
Messages
194
Reaction score
0
Location
Poland
Witam, możecie mi powiedzieć co mam zrobić, żeby zmienić działanie drabinki? Chcę żeby działała tak jak na obrazku...
2mdo16o.png
 
Jeżeli jest jakiś skrypt, to bym poprosił, ale wolałbym, to zmienić w źródłach. Nie wiecie gdzie?
 
Wystarczy że dodasz nad drabinke tile id: 459
Kuźwa, aleś się inteligencją wykazał, pozazdrościć.

@topic:
Możesz pozostawić bez zmian, wtedy będzie można skakać przy exani hur.
ew. data/actions/other/teleport.lua zamień podobny fragment na to i ustaw aid drabinki 4567, nie gwarantuje że działa bo skrypt robię na śpiąco!

Code:
    if(isInArray(UP_FLOORS, item.itemid) and (item.actionid == 100 or item.actionid == 0)) then
        fromPosition.z = fromPosition.z - 1
        fromPosition.y = fromPosition.y + 1

        fromPosition.stackpos = STACKPOS_GROUND
        if(item.actionid == 100 or getThingFromPos(fromPosition, false).itemid == 0) then
            fromPosition.y = fromPosition.y - 2
        end
    elseif(isInArray(UP_FLOORS, item.itemid) and item.actionid == 0) then
        fromPosition.z = fromPosition.z + 1
        fromPosition.y = fromPosition.y + 1
        
        fromPosition.stackpos = STACKPOS_GROUND
    else
        fromPosition.z = fromPosition.z + 1
    end
 
Last edited:
Aha sory cos mi sie popierdo^^lo ze drabinki dzialaja na podobnej zasadzie co schodki....

ew. możesz zrobić że wszystkie drabniki będą działać o jedną kratke do przodu.

W moim OTS wyglądało by to tak:
PHP:
local upFloorIds = {1386, 3678, 5543}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInArray(upFloorIds, item.itemid) == TRUE then
		fromPosition.y = fromPosition.y - 1
		fromPosition.z = fromPosition.z - 1
	else
		fromPosition.z = fromPosition.z + 1
	end
	doTeleportThing(cid, fromPosition, FALSE)
	return TRUE
end
 
Wystarczy, że użyjesz oryginalnego teleport.lua z 0.3.5 (choć to może z 0.3.6, ale nie ważne)

Code:
local UP_FLOORS = {1386, 3678, 5543, 8599, 10035}
local DRAW_WELL = 1369

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.itemid == DRAW_WELL and item.actionid ~= 100) then
		return false
	end

	if(isInArray(UP_FLOORS, item.itemid)) then
		fromPosition.z = fromPosition.z - 1
		fromPosition.y = fromPosition.y + 1

		fromPosition.stackpos = STACKPOS_GROUND
		if(item.actionid == 100 or getThingFromPos(fromPosition, false).itemid == 0) then
			fromPosition.y = fromPosition.y - 2
		end
	else
		fromPosition.z = fromPosition.z + 1
	end

	local pos, dir = getCreaturePosition(cid), SOUTH
	if(pos.x < fromPosition.x) then
		dir = EAST
	elseif(pos.x == fromPosition.x) then
		if(pos.y == fromPosition.y) then
			dir = getCreatureLookDirection(cid)
		elseif(pos.y > fromPosition.y) then
			dir = NORTH
		end
	elseif(pos.x > fromPosition.x) then
		dir = WEST
	end

	doTeleportThing(cid, fromPosition, false)
	doCreatureSetLookDirection(cid, dir)
	return true
end

I ustawisz ActionID 100 dla drabinki.
 
Lol xD skopiowac w items.xml wlasciwosci Shodki a potem to podmienic na drabinek ^ ^
 
Back
Top