Ir para conteúdo

[Actions] Quest Bugada


churupetinha

Posts Recomendados

Ae galera em meu ot tem 2 quest tipo anihi que presisa de 4 pessoas pra ir pra quest. ate ae de boa, mas quando o player aperta a lavanca eles vao pro lugar desejado mas a alavanca trava nao pode mas nimguem ir so com o god pra destravar ae sim eles podem ir.

aki estao os 2 sript

 

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

      if item.uid == 7998 and item.itemid == 1945 then
       player1pos = {x=299, y=149, z=9, stackpos=253}
       player1 = getThingfromPos(player1pos)

       player2pos = {x=298, y=149, z=9, stackpos=253}
       player2 = getThingfromPos(player2pos)

       player3pos = {x=297, y=149, z=9, stackpos=253}
       player3 = getThingfromPos(player3pos)

       player4pos = {x=296, y=149, z=9, stackpos=253}
       player4 = getThingfromPos(player4pos)


       if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
           queststatus1 = getPlayerStorageValue(player1.uid,7998)
           queststatus2 = getPlayerStorageValue(player2.uid,7998)
           queststatus3 = getPlayerStorageValue(player3.uid,7998)
           queststatus4 = getPlayerStorageValue(player4.uid,7998)

           if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
               nplayer1pos = {x=278, y=148, z=9}
               nplayer2pos = {x=278, y=152, z=9}
               nplayer3pos = {x=276, y=150, z=9}
               nplayer4pos = {x=280, y=150, z=9}

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

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

               doSendMagicEffect(nplayer1pos,49)
               doSendMagicEffect(nplayer2pos,49)
               doSendMagicEffect(nplayer3pos,49)
               doSendMagicEffect(nplayer4pos,49)

               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 ==7998 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

 

 

 

 

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

      if item.uid == 7999 and item.itemid == 1945 then
       player1pos = {x=213, y=118, z=9, stackpos=253}
       player1 = getThingfromPos(player1pos)

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

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

       player4pos = {x=210, y=118, z=9, stackpos=253}
       player4 = getThingfromPos(player4pos)


       if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
           queststatus1 = getPlayerStorageValue(player1.uid,7999)
           queststatus2 = getPlayerStorageValue(player2.uid,7999)
           queststatus3 = getPlayerStorageValue(player3.uid,7999)
           queststatus4 = getPlayerStorageValue(player4.uid,7999)

           if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
               nplayer1pos = {x=211, y=108, z=9}
               nplayer2pos = {x=209, y=106, z=9}
               nplayer3pos = {x=213, y=106, z=9}
               nplayer4pos = {x=211, y=104, z=9}

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

               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,"Somebody in your team has already done this quest.")
           end
       else
           doPlayerSendCancel(cid,"You need four players for this quest.")
       end

   elseif item.uid ==7999 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

 

Vlw ae galera !

Link para o comentário
Compartilhar em outros sites

function onUse(cid, item, frompos, item2, topos) 
if item.uid == 7999 and item.itemid == 1945 then 
       player1pos = {x=213, y=118, z=9, stackpos=253} 
       player1 = getThingfromPos(player1pos) 
       player2pos = {x=212, y=118, z=9, stackpos=253} 
       player2 = getThingfromPos(player2pos) 
       player3pos = {x=211, y=118, z=9, stackpos=253} 
       player3 = getThingfromPos(player3pos) 
       player4pos = {x=210, y=118, z=9, stackpos=253} 
       player4 = getThingfromPos(player4pos) 
       if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then 
           queststatus1 = getPlayerStorageValue(player1.uid,7999) 
           queststatus2 = getPlayerStorageValue(player2.uid,7999) 
           queststatus3 = getPlayerStorageValue(player3.uid,7999) 
           queststatus4 = getPlayerStorageValue(player4.uid,7999) 
           if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then 
               nplayer1pos = {x=211, y=108, z=9} 
               nplayer2pos = {x=209, y=106, z=9} 
               nplayer3pos = {x=213, y=106, z=9} 
               nplayer4pos = {x=211, y=104, z=9} 
               doSendMagicEffect(player1pos,2) 
               doSendMagicEffect(player2pos,2) 
               doSendMagicEffect(player3pos,2) 
               doSendMagicEffect(player4pos,2) 
               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,"Somebody in your team has already done this quest.") 
           end 
       else 
           doPlayerSendCancel(cid,"You need four players for this quest.") 
       end 

   elseif item.uid == 7999 and item.itemid == 1946 then 
           doTransformItem(item.uid, item.itemid-1) 
   else 
       return 0 
   end 

   return 1 
end

Teste com isso

Editado por Eskylo
Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...