
Tibia Fans-Czyli serwis o OTS i swiecie Tibia.com

WITAM. POTRZEBUJE SKRYPT NA DZRZWI TYLKO DLA DANEJ PROFESJI NP: KNIGHT MOZE TYLKO PRZEZ NIE PRZEJSC
Offline
Mówisz i masz
Wchodzimy w Ots/data/Actions/scripts/leveldoors
i zmieniamy all na:
function onUse(cid, item, frompos, item2, topos)
local enter = 0
if item.actionid >= 1000 then
if getPlayerLevel(cid) >= item.actionid - 1000 then
enter = 1
else
doPlayerSendTextMessage(cid, 22, "You need "..(item.actionid - 1000).." level to pass this door.")
enter = 0
end
elseif item.actionid > 100 and item.actionid < 110 then
if getPlayerVocation(cid) == item.actionid - 100 then
enter = 1
else
doPlayerSendTextMessage(cid, 22, "Your vocantion canot pass this door.")
enter = 0
end
end
if enter == 1 then
doTransformItem(item.uid, item.itemid + 1)
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then
doMoveCreature(cid, 1)
elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 2)
elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then
doMoveCreature(cid, 3)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 4)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 5)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 6)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 7)
end
else
end
return 1
endUwaga!
Dzwi levelowe działały tak: Wybierało sie dany level na dzwi np.
Na 10 lev wpisywalo sie 1010 na 100 to 1100.
Lecz po zmianie tego skryptu to będzie działało troche inaczej. Mianowicie:
Po wybraniu profy. wpisuje sie w action id tak np. dla sorka to 1001
(Sork:1 Drut:2 Pall:3 Knight:4 Master Sork:5 Elder Druid:6 Royal Pall:7 Elite Knight:8)
Może sie komuś przyda(ale nie mi) ;]
Dużo ludzi mi pisało czy jest możliwość zrobienia takich dzwi.
Wiec dałem wam skrypt.
Yours,
LukiS
Offline