Ir para conteúdo
  • 0

Alavanca Da Anihi


jhowxd

Pergunta

Bom Gostaria se alguém puder me ajuda eh claro rsrsrr

 

Esse scrpit eu fiz para minha 2° anihi mas a alavanca nao volta? só da para fazer uma vez, ou eu reseto o OT para os player fazer de novo ou tenho que ir la com o GOD alguem pode dar uma olhada?

 

 

 

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

 

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

player1pos = {x=1002, y=1104, z=7, stackpos=253}

player1 = getThingfromPos(player1pos)

 

player2pos = {x=1001, y=1104, z=7, stackpos=253}

player2 = getThingfromPos(player2pos)

 

player3pos = {x=1000, y=1104, z=7, stackpos=253}

player3 = getThingfromPos(player3pos)

 

player4pos = {x=999, y=1104, z=7, 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,7005)

queststatus2 = getPlayerStorageValue(player2.uid,7005)

queststatus3 = getPlayerStorageValue(player3.uid,7005)

queststatus4 = getPlayerStorageValue(player4.uid,7005)

 

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

nplayer1pos = {x=997, y=1107, z=8}

nplayer2pos = {x=996, y=1107, z=8}

nplayer3pos = {x=995, y=1107, z=8}

nplayer4pos = {x=994, y=1107, z=8}

 

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

 

 

 

Gostaria de saber se tem como por tmb para hora que puxar a alavanca sumonar os bichos e se os player morrer os mob sumir ou serem teleportados para um outro lugar ;D

Grato Jhonatan

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

8 respostass a esta questão

Posts Recomendados

  • 0

estou com o mesmo problema, a alavanca não volta, só quando vou com ADM e volta a alavanca alguém poderia ajudar se possível creio que tem muitas pessoas que arrumaria isso com 1 dedo rs

 

-- annihilator lever

 

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

 

if item.uid == 7000 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)

 

 

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)

 

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}

 

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

Usei a Tag

 

<action actionid="7778" script="anihi_reformulada.lua"/>

 

e o scrpit fico assim

 

 

local t = {

lvl = 100,

entrada =

{

{x = 999, y = 1104, z = 7},

{x = 1000, y = 1104, z = 7},

{x = 1001, y = 1104, z = 7},

{x = 1002, y = 1104, z = 7}

},

saida =

{

{x = 994, y = 1107, z = 8},

{x = 995, y = 1107, z = 8},

{x = 996, y = 1107, z = 8},

{x = 997, y = 1107, z = 8}

},

monstros =

{

{{x = 994, y = 1105, z = 8}, "Gribler"},

{{x = 996, y = 1105, z = 8}, "Gribler"},

{{x = 994, y = 1109, z = 8}, "Gribler"},

{{x = 996, y = 1109, z = 8}, "Gribler"},

{{x = 999, y = 1107, z = 8}, "Hulk"},

{{x = 1000, y = 1107, z = 8}, "Thor"},

}

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

local check = {}

for _, k in ipairs(t.entrada) do

local x = getTopCreature(k).uid

if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then

doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.')

return true

end

table.insert(check, x)

end

for _, summon in pairs(t.monstros) do

local creature = getTopCreature(summon[1]).uid

if(creature > 0 and not isPlayer(creature)) then

doRemoveCreature(creature)

end

doCleanTile(summon[1])

doCreateMonster(summon[2], summon[1])

end

for i, tid in ipairs(check) do

doSendMagicEffect(t.entrada, CONST_ME_POFF)

doTeleportThing(tid, t.saida, false)

doSendMagicEffect(t.saida, CONST_ME_ENERGYAREA)

end

doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)

return true

end

 

 

 

 

 

mais agora nem puxa os player ela puxa....

 

e usei o unic ID 7778

 

ajuda ae Vodkart

Link para o comentário
Compartilhar em outros sites

  • 0

mas tem que colocar ACTIONID = 7778 E NÃO UNIQUEID na propriedade da alavanca

 

local t = {
lvl = 100,
entrada ={
{x = 999, y = 1104, z = 7},
{x = 1000, y = 1104, z = 7},
{x = 1001, y = 1104, z = 7},
{x = 1002, y = 1104, z = 7}
},
saida ={
{x = 994, y = 1107, z = 8},
{x = 995, y = 1107, z = 8},
{x = 996, y = 1107, z = 8},
{x = 997, y = 1107, z = 8}
},
monstros ={
{{x = 994, y = 1105, z = 8}, "Gribler"},
{{x = 996, y = 1105, z = 8}, "Gribler"},
{{x = 994, y = 1109, z = 8}, "Gribler"},
{{x = 996, y = 1109, z = 8}, "Gribler"},
{{x = 999, y = 1107, z = 8}, "Hulk"},
{{x = 1000, y = 1107, z = 8}, "Thor"}
} 
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local check = {}
for _, k in ipairs(t.entrada) do
local x = getTopCreature(k).uid
if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then
doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.')
return true
end
table.insert(check, x)
end
for _, summon in pairs(t.monstros) do
local creature = getTopCreature(summon[1]).uid
if(creature > 0 and not isPlayer(creature)) then
doRemoveCreature(creature)
end
doCleanTile(summon[1])
doCreateMonster(summon[2], summon[1])
end
for i, tid in ipairs(check) do
doSendMagicEffect(t.entrada[i], CONST_ME_POFF)
doTeleportThing(tid, t.saida[i], false)
doSendMagicEffect(t.saida[i], CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
return true
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...