Ir para conteúdo
  • 0

Annihilator Por Vocaçao


PablinRush

Pergunta

Please eu preciso de uma ajuda com script, eu quero uma annihilator por vocaçoes, meu ot tem 15 vocaçoes .tipo tem que ter um player de cada vocaçaoas vocaçoes que eu quero que participem da quest sao, 5,6,7,8,13

 

esse aqui e meu script.

 

function onUse(cid, item, frompos, item2, topos)

if item.uid == 7200 and item.itemid == 1945 then

player1pos = {x=544, y=525, z=8, stackpos=253}

player1 = getThingfromPos(player1pos)

player2pos = {x=543, y=524, z=8, stackpos=253}

player2 = getThingfromPos(player2pos)

player3pos = {x=544, y=524, z=8, stackpos=253}

player3 = getThingfromPos(player3pos)

player4pos = {x=545, y=524, z=8, stackpos=253}

player4 = getThingfromPos(player4pos)

player5pos = {x=544, y=523, z=8, stackpos=253}

player5 = getThingfromPos(player5pos)

 

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

queststatus1 = getPlayerStorageValue(player1.uid,7200)

queststatus2 = getPlayerStorageValue(player2.uid,7200)

queststatus3 = getPlayerStorageValue(player3.uid,7200)

queststatus4 = getPlayerStorageValue(player4.uid,7200)

queststatus5 = getPlayerStorageValue(player5.uid,7200)

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

nplayer1pos = {x=543, y=538, z=7}

nplayer2pos = {x=542, y=537, z=7}

nplayer3pos = {x=543, y=537, z=7}

nplayer4pos = {x=544, y=537, z=7}

nplayer5pos = {x=543, y=536, z=7}

doSendMagicEffect(player1pos,2)

doSendMagicEffect(player2pos,2)

doSendMagicEffect(player3pos,2)

doSendMagicEffect(player4pos,2)

doSendMagicEffect(player5pos,2)

doTeleportThing(player1.uid,nplayer1pos)

doTeleportThing(player2.uid,nplayer2pos)

doTeleportThing(player3.uid,nplayer3pos)

doTeleportThing(player4.uid,nplayer4pos)

doTeleportThing(player5.uid,nplayer5pos)

doSendMagicEffect(nplayer1pos,10)

doSendMagicEffect(nplayer2pos,10)

doSendMagicEffect(nplayer3pos,10)

doSendMagicEffect(nplayer4pos,10)

doSendMagicEffect(nplayer5pos,10)

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

else

doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")

end

else

doPlayerSendCancel(cid,"You need four players for this quest.")

end

elseif item.uid ==7200 and item.itemid == 1946 then

if getPlayerAccess(cid) > 0 then

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

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

else

return 0

end

return 1

end

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

Tenta essa:

 

 


function onUse(cid, item, frompos, item2, topos)
local vocations = {5, 6, 7, 8, 13 }
if isInArray(vocations, getPlayerVocation(cid)) then
else
doPlayerSendTextMessage(cid, 27, "Sorry, you dont have this correct vocation for this quest.")
return true
end
if item.uid == 7200 and item.itemid == 1945 then
player1pos = {x=544, y=525, z=8, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=543, y=524, z=8, stackpos=253}
player2 = getThingfromPos(player2pos)
player3pos = {x=544, y=524, z=8, stackpos=253}
player3 = getThingfromPos(player3pos)
player4pos = {x=545, y=524, z=8, stackpos=253}
player4 = getThingfromPos(player4pos)
player5pos = {x=544, y=523, z=8, stackpos=253}
player5 = getThingfromPos(player5pos)

if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 and player5.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,7200)
queststatus2 = getPlayerStorageValue(player2.uid,7200)
queststatus3 = getPlayerStorageValue(player3.uid,7200)
queststatus4 = getPlayerStorageValue(player4.uid,7200)
queststatus5 = getPlayerStorageValue(player5.uid,7200)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 and queststatus5 == -1 then
nplayer1pos = {x=543, y=538, z=7}
nplayer2pos = {x=542, y=537, z=7}
nplayer3pos = {x=543, y=537, z=7}
nplayer4pos = {x=544, y=537, z=7}
nplayer5pos = {x=543, y=536, z=7}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)
doSendMagicEffect(player5pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)
doTeleportThing(player5.uid,nplayer5pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)
doSendMagicEffect(nplayer5pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need four players for this quest.")
end
elseif item.uid ==7200 and item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end
return 1
end

 

 

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...