Administrator
PostWysłany: Czw 13:51, 28 Gru 2006    Temat postu: poradnik jak zrobić bramkę lvl'ow±

Stwórz plik lvldoor.lua i napisz w nim:

-- Level door by Sir Dzidek --
function onUse(cid, item, frompos, item2, topos)

if item.uid == 8504 then
queststatus = getPlayerStorageValue(cid,8504)
if queststatus == -1 or queststatus == 0 then
if getPlayerLevel(cid) >= 100 then
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendTextMessage(cid,22,"Sorry, you need 100 level to open this door.")
end
end
if item.uid == 8504 and item.itemid == 1628 then
doorpos = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}
getplayer = getThingfromPos(doorpos)
if getplayer.itemid > 0 then
npos = {x=frompos.x+1, y=frompos.y, z=frompos.z}
doTeleportThing(getplayer.uid,npos)
doTransformItem(item.uid,item.itemid-1)
else
doTransformItem(item.uid,item.itemid-1)

end


end
return 1
end



Otwórz plik actions.lua i dopisz:

<action uniqueid="8504" script="lvldoor.lua" />


Co oznaczaj± owe rumerki:
8504 -- Ustawione uniqe id drzwi.
100 -- Odpowiada za lvl który może otwierać drzwi.
Wszystkie czasy w strefie EET (Europa)
   

Powered by phpBB © 2001, 2002 phpBB Group