FLE
Member
hey this is the script i use for my anni ... anyways what I need done, I need the switch to reset back, after the quest was done.... so the next team can do it! I am not always available to reset it for players and i'm sure its possible to do in a script!
Thank You so much!
PHP:
-- annihilator lever
function onUse(cid, item, frompos, item2, topos)
monster = "Demon" ------ nome do monstro
pos = {x=33219, y=31657, z=13} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos2 = {x=33221, y=31657, z=13} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos3 = {x=33220, y=31661, z=13} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos4 = {x=33222, y=31661, z=13} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos5 = {x=33223, y=31659, z=13} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos6 = {x=33224, y=31659, z=13} ---posicao em que o monstro ira aparecer
if item.uid == 5000 and item.itemid == 1945 then
player1pos = {x = 33225, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE}
player1 = getThingfromPos(player1pos)
player2pos = {x = 33224, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE}
player2 = getThingfromPos(player2pos)
player3pos = {x = 33223, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE}
player3 = getThingfromPos(player3pos)
player4pos = {x = 33222, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE}
player4 = getThingfromPos(player4pos)
dzwignia = os.clock()
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,7000)
queststatus2 = getPlayerStorageValue(player2.uid,7000)
queststatus3 = getPlayerStorageValue(player3.uid,7000)
queststatus4 = getPlayerStorageValue(player4.uid,7000)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x = 33222, y = 31659, z = 13}
nplayer2pos = {x = 33221, y = 31659, z = 13}
nplayer3pos = {x = 33220, y = 31659, z = 13}
nplayer4pos = {x = 33219, y = 31659, z = 13}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)
doSummonCreature(monster,pos)
doSummonCreature(monster2,pos2)
doSummonCreature(monster,pos3)
doSummonCreature(monster2,pos4)
doSummonCreature(monster,pos5)
doSummonCreature(monster2,pos6)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Someone in the party has already done this quest")
end
else
doPlayerSendCancel(cid,"You Need 4 players for this quest.")
end
elseif item.uid ==5000 and item.itemid == 1946 then
if (dzwignia - os.clock()) > 60 then
doTransformItem(item.uid,item.itemid-1)
end
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
end
end
return 1
end
Thank You so much!