• 01-04.05.2026 - DOUBLE EXP / SKILL EVENT!

Problem z dzwiami.

Status
Zamknięty.

Silent

User
Zarejestrowany
Dołączył
Czerwiec 14, 2008
Posty
32
Liczba reakcji
0
Wiek
31
Witam, mam taki maly problem z dzwiami. A dokladniej nie chca sie one zamykac/otwierac gdy odpalam silnik niby zaden blad nie wyskakuje pomocy! ;)

Posiadam silnik TFS - The Forgotten Server 3.0 na klienta 8.31.
 
Ostatnia edycja:
Odp: Problem z dzwiami.

Chmm czy?by b??d ?r?de? ? Mo?e pierw podaj sw?j plik Actions.xml.
 
Odp: Problem z dzwiami.

u mnie to nie da sie zrobic na klucz zrobilem odpalilem ale nei da sie ich otworzyc kluczem ktory podalem w map editorze(OTS 7.6 jak by co)
POMOCY
 
Odp: Problem z dzwiami.

Kod:
	<action fromid="6436" toid="6447" script="other/windows.lua"/>
	<action fromid="6450" toid="6473" script="other/windows.lua"/>
	<action fromid="6788" toid="6791" script="other/windows.lua"/>
	<action fromid="7025" toid="7032" script="other/windows.lua"/>
	<action fromid="1209" toid="1214" script="other/doors.lua"/>
	<action fromid="1219" toid="1262" script="other/doors.lua"/>
	<action fromid="1539" toid="1542" script="other/doors.lua"/>
	<action fromid="2086" toid="2092" script="other/doors.lua"/>
	<action fromid="3535" toid="3552" script="other/doors.lua"/>
	<action fromid="4913" toid="4918" script="other/doors.lua"/>
	<action fromid="5082" toid="5085" script="other/doors.lua"/>
	<action fromid="5098" toid="5145" script="other/doors.lua"/>
	<action fromid="5278" toid="5295" script="other/doors.lua"/>
	<action fromid="5515" toid="5518" script="other/doors.lua"/>
	<action fromid="5732" toid="5737" script="other/doors.lua"/>
	<action fromid="5745" toid="5749" script="other/doors.lua"/>
	<action fromid="6192" toid="6209" script="other/doors.lua"/>
	<action fromid="6249" toid="6266" script="other/doors.lua"/>
	<action fromid="6795" toid="6802" script="other/doors.lua"/>
	<action fromid="6891" toid="6908" script="other/doors.lua"/>
	<action fromid="7033" toid="7050" script="other/doors.lua"/>
	<action fromid="7054" toid="7057" script="other/doors.lua"/>
	<action fromid="8541" toid="8558" script="other/doors.lua"/>
Wklej to w actions.xml w zak?adce others
i dodaj ten skrypt do actions/scripts/others a nazwij go doors
Kod:
	local thing = getThingfromPos(position)
	position.stackpos = STACKPOS_TOP_FIELD
	local field = getThingfromPos(position)
	if item.uid ~= thing.uid and thing.itemid >= 100 or field.itemid ~= 0 then
		return FALSE
	end
	return TRUE
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInArray(questDoors, item.itemid) == TRUE then
		if getPlayerStorageValue(cid, item.actionid) ~= -1 then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
		end
		return TRUE
	elseif isInArray(levelDoors, item.itemid) == TRUE then
		if item.actionid > 0 and getPlayerLevel(cid) >= item.actionid - 1000 then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
		end
		return TRUE
	elseif isInArray(keys, item.itemid) == TRUE then
		if itemEx.actionid > 0 then
			if item.actionid == itemEx.actionid then
				if doors[itemEx.itemid] ~= nil then
					doTransformItem(itemEx.uid, doors[itemEx.itemid])
					return TRUE
				end
			end
			doPlayerSendCancel(cid, "The key does not match.")
			return TRUE
		end
		return FALSE
	elseif isInArray(horizontalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition) == 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 doorCreature.itemid ~= 0 then
			if getTilePzInfo(doorPosition) == TRUE and getTilePzInfo(newPosition) == FALSE and doorCreature.uid ~= cid then
				doPlayerSendCancel(cid, "Sorry, not possible.")
			else
				doTeleportThing(doorCreature.uid, newPosition, TRUE)
				if isInArray(openSpecialDoors, item.itemid) ~= TRUE then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end
			return TRUE
		end
		doTransformItem(item.uid, item.itemid - 1)
		return TRUE
	elseif isInArray(verticalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition) == TRUE then
		local newPosition = toPosition
		newPosition.x = newPosition.x + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if doorCreature.itemid ~= 0 then
			if getTilePzInfo(doorPosition) == TRUE and getTilePzInfo(newPosition) == FALSE and doorCreature.uid ~= cid then
				doPlayerSendCancel(cid, "Sorry, not possible.")
			else
				doTeleportThing(doorCreature.uid, newPosition, TRUE)
				if isInArray(openSpecialDoors, item.itemid) ~= TRUE then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end
			return TRUE
		end
		doTransformItem(item.uid, item.itemid - 1)
		return TRUE
	elseif doors[item.itemid] ~= nil and checkStackpos(item, fromPosition) == TRUE then
		if item.actionid == 0 then
			doTransformItem(item.uid, doors[item.itemid])
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
		end
		return TRUE
	end
	return FALSE
end
 
Odp: Problem z dzwiami.

Ehh nadal zle... Gdy wkleilem ten kod ktory Ty mi poradziles to wyskakiwaly bledy w silniku typu:



"Warning: [Event:: LoadScript] Can not load script. data/actions/scripts/other/doors.lua"
 
Odp: Problem z dzwiami.

je?li masz ots'a powy?ej 8.0 i s? to drzwi magiczne wystarczy w map edytorze w Preperties>>> Action ID wpisa? 1001 (1xxx)w miejsce x wpisujesz od jakiego lvl maj? by? te drzwi
 
Status
Zamknięty.
Back
Do góry