Ir para conteúdo
  • 0

Alavanca que precisa de 6 jogadores para teleportar parecida com anihilator.


KennyConrad

Pergunta

6 respostass a esta questão

Posts Recomendados

  • 0

em actions/scriptes crie um arquivo chamado annihilator.lua

 

-- annihilator level 350 lever

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

if item.uid == 7100 and item.itemid == 1945 then
player1pos = {x=214, y=146, z=8, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=214, y=147, z=8, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=214, y=148, z=8, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=214, y=149, z=8, stackpos=253}
player4 = getThingfromPos(player4pos)

 

player5pos = {x=214, y=149, z=8, stackpos=253}
player5 = getThingfromPos(player5pos)

 

player6pos = {x=214, y=149, z=8, stackpos=253}
player6 = getThingfromPos(player6pos)


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

queststatus5 = getPlayerStorageValue(player5.uid,7100)

queststatus6 = getPlayerStorageValue(player6.uid,7100)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x=211, y=148, z=10}
nplayer2pos = {x=212, y=148, z=10}
nplayer3pos = {x=213, y=148, z=10}
nplayer4pos = {x=214, y=148, z=10}

nplayer4pos = {x=214, y=148, z=10}

nplayer4pos = {x=214, y=148, z=10}

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

doSendMagicEffect(player5pos,2)

doSendMagicEffect(player6pos,2)

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

doTeleportThing(player5.uid,nplayer5pos)

doTeleportThing(player6.uid,nplayer6pos)

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

doSendMagicEffect(nplayer5pos,10)

doSendMagicEffect(nplayer6pos,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 ==7100 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

 

 

 

em action.xml adicione na haba quest

<action uniqueid="30015" script="quests/annihilator.lua"/>

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

  • 0

em actions/scriptes crie um arquivo chamado annihilator.lua

 

-- annihilator level 350 lever

 

 

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

 

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

player1pos = {x=214, y=146, z=8, stackpos=253}

player1 = getThingfromPos(player1pos)

 

player2pos = {x=214, y=147, z=8, stackpos=253}

player2 = getThingfromPos(player2pos)

 

player3pos = {x=214, y=148, z=8, stackpos=253}

player3 = getThingfromPos(player3pos)

 

player4pos = {x=214, y=149, z=8, stackpos=253}

player4 = getThingfromPos(player4pos)

 

player5pos = {x=214, y=149, z=8, stackpos=253}

player5 = getThingfromPos(player5pos)

 

player6pos = {x=214, y=149, z=8, stackpos=253}

player6 = getThingfromPos(player6pos)

 

 

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

queststatus1 = getPlayerStorageValue(player1.uid,7100)

queststatus2 = getPlayerStorageValue(player2.uid,7100)

queststatus3 = getPlayerStorageValue(player3.uid,7100)

queststatus4 = getPlayerStorageValue(player4.uid,7100)

queststatus5 = getPlayerStorageValue(player5.uid,7100)

queststatus6 = getPlayerStorageValue(player6.uid,7100)

 

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

nplayer1pos = {x=211, y=148, z=10}

nplayer2pos = {x=212, y=148, z=10}

nplayer3pos = {x=213, y=148, z=10}

nplayer4pos = {x=214, y=148, z=10}

nplayer4pos = {x=214, y=148, z=10}

nplayer4pos = {x=214, y=148, z=10}

 

doSendMagicEffect(player1pos,2)

doSendMagicEffect(player2pos,2)

doSendMagicEffect(player3pos,2)

doSendMagicEffect(player4pos,2)

doSendMagicEffect(player5pos,2)

doSendMagicEffect(player6pos,2)

 

doTeleportThing(player1.uid,nplayer1pos)

doTeleportThing(player2.uid,nplayer2pos)

doTeleportThing(player3.uid,nplayer3pos)

doTeleportThing(player4.uid,nplayer4pos)

doTeleportThing(player5.uid,nplayer5pos)

doTeleportThing(player6.uid,nplayer6pos)

 

doSendMagicEffect(nplayer1pos,10)

doSendMagicEffect(nplayer2pos,10)

doSendMagicEffect(nplayer3pos,10)

doSendMagicEffect(nplayer4pos,10)

doSendMagicEffect(nplayer5pos,10)

doSendMagicEffect(nplayer6pos,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 ==7100 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

 

 

 

em action.xml adicione na haba quest

<action uniqueid="30015" script="quests/annihilator.lua"/>

Lógico que não vai funcionar né... pelo amor:!

 

 

 

function onUse(cid, item, frompos, item2, topos)
if item.uid == 7100 and item.itemid == 1945 then
player1pos = {x=214, y=146, z=8, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=214, y=147, z=8, stackpos=253}
player2 = getThingfromPos(player2pos)
player3pos = {x=214, y=148, z=8, stackpos=253}
player3 = getThingfromPos(player3pos)
player4pos = {x=214, y=149, z=8, stackpos=253}
player4 = getThingfromPos(player4pos)
player5pos = {x=214, y=149, z=8, stackpos=253}
player5 = getThingfromPos(player5pos)
player6pos = {x=214, y=149, z=8, stackpos=253}
player6 = getThingfromPos(player6pos)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,7100)
queststatus2 = getPlayerStorageValue(player2.uid,7100)
queststatus3 = getPlayerStorageValue(player3.uid,7100)
queststatus4 = getPlayerStorageValue(player4.uid,7100)
queststatus5 = getPlayerStorageValue(player5.uid,7100)
queststatus6 = getPlayerStorageValue(player6.uid,7100)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x=211, y=148, z=10}
nplayer2pos = {x=212, y=148, z=10}
nplayer3pos = {x=213, y=148, z=10}
nplayer4pos = {x=214, y=148, z=10}
nplayer5pos = {x=214, y=148, z=10}
nplayer6pos = {x=214, y=148, z=10}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)
doSendMagicEffect(player5pos,2)
doSendMagicEffect(player6pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)
doTeleportThing(player5.uid,nplayer5pos)
doTeleportThing(player6.uid,nplayer6pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)
doSendMagicEffect(nplayer5pos,10)
doSendMagicEffect(nplayer6pos,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 ==7100 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

  • 0

Vá em data/actions/scripts, crie um arquivo chamado 6lever.lua e adicione dentro:

 

 

function onUse(cid, item)

    local tiles = {
        {x = 1, y = 2, z = 7},
        {x = 1, y = 2, z = 7},
        {x = 1, y = 2, z = 7},
        {x = 1, y = 2, z = 7},
        {x = 1, y = 2, z = 7},
        {x = 1, y = 2, z = 7},
    }
    local tPos = {x = 500, y = 400, z = 7}

    for k, v in ipairs(tiles) do
        if isPlayer(getThingFromPos(v)) then
        doTeleportThing(getThingFromPos(v), tPos)
    else
        doSendMagicEffect(getThingPos(item.uid), 2)
    end
end

    return true
end

 

Na tabela tiles você deve configurar todas as coordenadas aonde devem ficar os 6 players. E em tPos você configura para aonde serão teleportados.

 

Em actions.xml adicione a seguinte tag:

 

 

<action uniqueid="15559" event="script" value="6lever.lua"/>

 

Basta ir no RME e colocar UniqueID 15559 na alavanca. #GoodLuck!

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...