• logo_cipsoft
    Nowe serwery zostały otwarte 27 Sie 2025:
    Escura (Retro Open PvP) Mystera (Retro Open PvP) us_logo Penumbra (Retro Open PvP)

-LUA & XML premium door 7.6 lua

oskar1232

Advanced User
Dołączył
Lipiec 16, 2010
Posty
175
Liczba reakcji
0
Witam szukam skryptu door/dzwignie albo jakies tp ktorego moga uzywac tylko gracze premium

---------- Tre?? dodana o 00:29 ----------

function onUse(cid, item, frompos, item2, topos)
if item.uid == 8000 then
if isPremium(cid) ~= 0 then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You need premium account to pass this door.')
end
return 1
else
return 0
end
end

mam cos takiego ale nie trybi?
 
Odp: premium door 7.6 lua

Wchodzimy do data\actions\scripts i tworzymy plik o nazwie premium_door.lua i wpisujemy:

Kod:
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 7000 and isPremium(cid) then
local pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
end
doTeleportThing(cid,pos)
end
end


Nast?pnie w actions.xml dodajemy:

Kod:
<action itemid="xxxx" script="premium_door.lua" />

Tam gdzie "xxxx" dodaj id drzwi.
 
Do góry