Forum TIBIA!OTS! i nie tylko! Strona Główna
  Obecny czas to Czw 20:49, 25 Kwi 2024   

Forum TIBIA!OTS! i nie tylko! Strona Główna -> Scrypty

Quest z tp do danego miesca xD

  Autor    Temat Napisz nowy temat Odpowiedz do tematu
Alfons II
Stały Gość



Dołączył: 17 Lis 2005
Posty: 59 Przeczytał: 0 tematów

Ostrzeżeń: 1/10
Skąd: KRAKÓW !!!

Quest z tp do danego miesca xD

ok a teraz postanowilem dodac questa w któym player sie tp za omaca dzwigni lub wielu playerów w tym przypadku 3 palyerów:

w actions tworzymy linijke

Kod:

<action itemid="2711" script="nazwa questa.lua" />


i w scrpitach tworzymy

nazwaquesta.lua

Kod:

nazwaquesta.lua


Kod:
function onUse(cid, item, frompos, item2, topos)
-- Warlock Quest
if item.uid == 7040 then
if item.itemid == 2711 then

player1pos = {x=194, y=118, z=9, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=193, y=118, z=9, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=192, y=118, z=9, stackpos=253}
player3 = getThingfromPos(player3pos)


if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then

player1level = getPlayerLevel(player1.uid)
player2level = getPlayerLevel(player2.uid)
player3level = getPlayerLevel(player3.uid)

questlevel = 70

if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel then

queststatus1 = getPlayerStorageValue(player1.uid,7000)
queststatus2 = getPlayerStorageValue(player2.uid,7000)
queststatus3 = getPlayerStorageValue(player3.uid,7000)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then

nplayer1pos = {x=194, y=118, z=10}
nplayer2pos = {x=193, y=118, z=10}
nplayer3pos = {x=192, y=118, z=10}

doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)

doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)

doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)

doTransformItem(item.uid,item.itemid+1)

else
doPlayerSendCancel(cid,"quest jest wlasnie wykonywany przez inna grópe osób.")
end
else
doPlayerSendCancel(cid,"kazdy player musi miec 70 lvl!!!.")
end
else
doPlayerSendCancel(cid,"twuj tea musi skladac sie z 3 graczy...")
end
elseif item.itemid == 2712 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end

end
return 1





UID dzwignij
pozycia gdzie maja stac playerzy
lvl wymagany do wszystkich playerów
ozycija gdzie ich ma tp
nais gdy quest w danej hwili jest wykonywany
napis gdy którys player lub wszyscy nie maja wymaganego
lvlu
napis gdy brakuje playera


Post został pochwalony 0 razy

Post Czw 21:43, 17 Lis 2005 
 Zobacz profil autora    
  Wyświetl posty z ostatnich:      
Napisz nowy temat Odpowiedz do tematu

Skocz do:  


Last Thread | Next Thread  >

Zasady:
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach

 

fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB Š 2001 phpBB Group

phpBB Template by Vereor.

Web Templates
Web Design Templates Š