Strona Główna Belxena 8.4 RPG

Forum poświęcone powstawaniu Belxena OTS


#1 2009-05-02 10:05:17

Wiesiu

Administrator

Zarejestrowany: 2009-04-03
Posty: 59
Punktów :   

Desert Quest

function onUse(cid, item, frompos, item2, topos)
local level = 20 --wymagany lvl
local found = 0  --koniecznie na 0!  Zabiezpieczy to teleportowaniu np polowy graczy. A z reszta nie wazne... Nie ruszaj =]
local pos = {
spellbook = {x=435, y=404, z=9, stackpos=1},
crossbow = {x=443, y=404, z=9, stackpos=1},
apple = {x=430, y=404, z=9, stackpos=1},
sword = {x=439, y=404, z=9, stackpos=1}}
local id = {
spellbook = 2175,
crossbow = 2455,
apple = 2674,
sword = 2376}
local pPos = {
sorcerer = {x=435, y=405, z=9, stackpos=253},
paladin = {x=443, y=405, z=9, stackpos=253},
druid = {x=430, y=405, z=9, stackpos=253},
knight = {x=439, y=405, z=9, stackpos=253}}
local npos = {
sorcerer = {x=443, y=396, z=9},
paladin = {x=443, y=396, z=9},
druid = {x=436, y=396, z=9},
knight = {x=436, y=396, z=9}}
    for i = 1, 4 do
        if getThingfromPos(pos[i]).itemid == id[i] then
            if getPlayerLevel(getThingfromPos(pPos[i])) >= level then  --ta funkcja sprawdza nie tylko level graczy, ale tez czy gracz znajduje sie na pozycji
                found = found + 1
            else
                doPlayerSendCancel(cid,"Musisz miec 4 graczy z levelem powyzej 20!")
                break
            end
        else
            doPlayerSendCancel(cid,"Musisz polozyc odpowiednie itemy na odpowiednich pozycjach!")
            break
        end
    end
    if found == 4 then
        for xd = 1, 4 do
            doTeleportThing(getThingfromPos(pPos[i]),npos[i])
            doSendMagicEffect(npos[i],12)
        end
    end
    return 1
end


http://images.net.pl/file/u6iur6fo6sojbxta16uv.jpg

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.msg.pun.pl www.promotyle.pun.pl www.vspolmiedztrans.pun.pl www.realnet.pun.pl www.zspjasliska.pun.pl