Ir para conteúdo

Featured Replies

Postado

Eu queria adicionar  6 mostro nessa anihi pra quando pusharem a alavanca os mostro aparecer  ,ta ae meu script e o mostro caso precise editar

 

 

MINHA ANIHI 

 

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
position = {x=1183, y=1224, z=7}, -- Posição aonde sera criado o teleport
position1 = {x=1216, y=1250, z=7},
position2 = {x=1216, y=1258, z=7},
position3 = {x=1222, y=1250, z=7},
position4 = {x=1222, y=1258, z=7},
fromPosition = {x=1215, y=1249, z=7},
toPosition = {x=1223, y=1259, z=7},
walls = {x=1177, y=1224, z=7},
wallr = {x=1177, y=1224, z=7,  stackpos = 1},
id = 1498,
time = 2 -- tempo que o teleport ira sumir em minutos
}
local t = {
level = 120, -- level minimo para poder entrar
inicio = -- posical inicial dos players
{
{x=1184,y=1224,z=7},
{x=1183,y=1224,z=7},
{x=1182,y=1224,z=7},
{x=1181,y=1224,z=7},
{x=1180,y=1224,z=7}
},
fim =  -- posição para onde serão teleportados
{
{x=1221,y=1254,z=7},
{x=1220,y=1254,z=7},
{x=1219,y=1254,z=7},
{x=1218,y=1254,z=7},
{x=1217,y=1254,z=7}
}
}
local time = 120
local sto = 5937
 
local test = {}
for _, k in ipairs(t.inicio) do
local x = getTopCreature(k).uid
if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.level) then
doPlayerSendCancel(cid, 'Você precisa de 5 jogadores')
return true
end
if getGlobalStorageValue(sto) == 1 then
doPlayerSendCancel(cid, 'Espere o tempo acabar')
return true
end
table.insert(test, x)
end
for i, pid in ipairs(test) do
doSendMagicEffect(t.inicio, CONST_ME_POFF)
doTeleportThing(pid, t.fim, false)
doSendMagicEffect(t.fim, CONST_ME_ENERGYAREA)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
setGlobalStorageValue(sto, 1)
for i = 1,time do
formula = time - 1*i
addEvent(doSendAnimatedText,i*1000, config.position, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position1, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position2, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position3, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position4, formula, math.random(1, 255))
end
function removeWall()
setGlobalStorageValue(sto, -1)
return true
end
addEvent(removeWall, config.time*60*1000)
for x = config.fromPosition.x, config.toPosition.x do
for y = config.fromPosition.y, config.toPosition.y do
for z = config.fromPosition.z, config.toPosition.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getMonsters = getThingfromPos(areapos)
if isMonster(getMonsters.uid) then
doRemoveCreature(getMonsters.uid)
end
end
end
end
function removePlayer()
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
end
end
addEvent(removePlayer, config.time*60*1000)
return TRUE
end 
 
 
 
MEU OUTRO ANINI
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
position = {x=1183, y=1224, z=7}, -- Posição aonde sera criado o teleport
position1 = {x=1216, y=1250, z=7},
position2 = {x=1216, y=1258, z=7},
position3 = {x=1222, y=1250, z=7},
position4 = {x=1222, y=1258, z=7},
fromPosition = {x=1215, y=1249, z=7},
toPosition = {x=1223, y=1259, z=7},
walls = {x=1177, y=1224, z=7},
wallr = {x=1177, y=1224, z=7,  stackpos = 1},
id = 1498,
time = 2 -- tempo que o teleport ira sumir em minutos
}
local t = {
level = 120, -- level minimo para poder entrar
inicio = -- posical inicial dos players
{
{x=1182,y=1224,z=7}
},
fim =  -- posição para onde serão teleportados
{
{x=1221,y=1254,z=7}
}
}
local time = 120
local gsto = 4567
 
local test = {}
for _, k in ipairs(t.inicio) do
local x = getTopCreature(k).uid
if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.level ) then
doPlayerSendCancel(cid, 'Não tem 5 players.')
return true
end
table.insert(test, x)
end
for i, pid in ipairs(test) do
doSendMagicEffect(t.inicio, CONST_ME_POFF)
doTeleportThing(pid, t.fim, false)
doSendMagicEffect(t.fim, CONST_ME_ENERGYAREA)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
doCreateItem(config.id, 1, config.walls)
for i = 1,time do
formula = time - 1*i
addEvent(doSendAnimatedText,i*1000, config.position, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position1, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position2, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position3, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position4, formula, math.random(1, 255))
end
function removeWall()
return true
end
addEvent(removeWall, config.time*60*1000)
for x = config.fromPosition.x, config.toPosition.x do
for y = config.fromPosition.y, config.toPosition.y do
for z = config.fromPosition.z, config.toPosition.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getMonsters = getThingfromPos(areapos)
if isMonster(getMonsters.uid) then
doRemoveCreature(getMonsters.uid)
end
end
end
end
function removePlayer()
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
end
end
addEvent(removePlayer, config.time*60*1000)
return TRUE
end
 
 
 
MEU MONSTRO 
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<monster name="Annihilon" nameDescription="annihilon" race="fire" experience="0" speed="500" manacost="0">
 
<health now="400000" max="400000"/>
 
<look type="12" head="0" body="19" legs="0" feet="0" corpse="6068"/>
 
<targetchange interval="2000" chance="10"/>
 
<strategy attack="70" defense="10"/>
 
<flags>
 
<flag summonable="0"/>
 
<flag attackable="1"/>
 
<flag hostile="1"/>
 
<flag illusionable="0"/>
 
<flag convinceable="0"/>
 
<flag pushable="0"/>
 
<flag canpushitems="1"/>
 
<flag canpushcreatures="1"/>
 
<flag targetdistance="1"/>
 
<flag runonhealth="0"/>
 
</flags>
 
<attacks>
 
<attack name="melee" interval="2000" skill="10" attack="2000"/>
 
<attack name="effect" interval="700" chance="6" radius="5" target="0">
 
<attribute key="areaEffect" value="blackspark"/>
 
</attack>
 
<attack name="fire" interval="2000" chance="43" range="7" radius="7" target="1" min="-700" max="-1000">
 
<attribute key="shootEffect" value="fire"/>
 
<attribute key="areaEffect" value="firearea"/>
 
</attack>
 
<attack name="firefield" interval="2000" chance="10" range="7" radius="4" target="1">
 
<attribute key="shootEffect" value="fire"/>
 
</attack>
 
<attack name="energy" interval="2000" chance="15" length="8" spread="0" min="-700" max="-1000">
 
<attribute key="areaEffect" value="energy"/>
 
</attack>
 
</attacks>
 
<defenses armor="90" defense="111">
 
<defense name="healing" interval="1000" chance="10" min="700" max="1400">
 
<attribute key="areaEffect" value="blueshimmer"/>
 
<attribute key="areaEffect" value="redshimmer"/>
 
</defense>
 
</defenses>
 
<elements>
 
<element firePercent="0"/>
 
<element earthPercent="0"/>
 
<element deathPercent="0"/>
 
<element icePercent="0"/>
 
<element holyPercent="0"/>
 
</elements>
 
<immunities>
 
<immunity lifedrain="1"/>
 
<immunity paralyze="1"/>
 
<immunity invisible="1"/>
 
</immunities>
 
<voices interval="5000" chance="10">
 
<voice sentence="You Are Dead" yell="1"/>
 
<voice sentence="Run From Here" yell="1"/>
 
<voice sentence="You Will not pass!!!" yell="1"/>
 
<voice sentence="Be prepared for the day my masters will come for you!"/>
 
<voice sentence="SOULS FOR ORSHABAAL!" yell="1"/>
 
</voices>
 
<loot>
 
<item id="2160" countmax="8" chance="125000"/><!-- crystal coin -->
<item id="2160" countmax="9" chance="125000"/><!-- Crystal coin -->
<item id="2160" countmax="8" chance="125000"/><!-- Crystal coin -->
 
</loot>
 
</monster>

Editado por damiaotorres (veja o histórico de edições)

  • Respostas 9
  • Visualizações 570
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Cara, utilize a opção de código, fica meio dificil entender desse geito rsrs.

 

Pois bem, essas posições :

position1 = {x=1177, y=1241, z=8},
position2 = {x=1177, y=1249, z=8},
position3 = {x=1183, y=1241, z=8},
position4 = {x=1183, y=1249, z=8},

São as posições que aparecem os monstros??

Postado

@GstavoLiber ele quer que quando os players entrem crie 6 monstros em posições que ele não falou mas espera que a gente leia a mente dele, a unica edição que tem que fazer aí é aumentar a area do fromposition  e toposition pro local que ele for colocar os monstros no mapa editor;

Nenhuma parte desse script tá configurada pra criar monstros, apenas pra remover os monstros qnd eles entrarem, o summon das criaturas tá pelo map editor, aposto que um spaw bem rápido do tipo 1 segundo.

Muda o script pra que quando eles derem go cheque se tem players dentro e retorne um erro caso tenha pois aí não tem o risco do povo bugar a anihi.
Ao entrar, remover tudo que tem lá dentro e recriar as criaturas nas posições predefinidas (usar uma table pras posições é opcional)

Eu faria mas o script é bem simpleszinho e tem um monte de anihis que ele poderia baixar e editar as duas posições a mais que ele quer, fora que to com o dedo quebrado me incomoda muito scriptar de tala

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Postado
  • Autor

Gstavoliber essas position é a posição inicial do player ,a position dos monstro eu edito depois to só pedindo pra alguem colocar pra nasce monstro quando apertarem a alavanca, e whitewolf essa anihi e por tempo quando a alanca e acionada os player tem 120 segundos para sair de dentro caso eles não saiam eles são expulso para fora automaticamente , eu só queria que alguém coloca-se pra nasce monstro quando aperta a alavanca ela só ta faltando isso o resto dela ta perfeitamente funcionando bem as actions o tile tbm tudo falta só os montros. atualizei la em cima que eu editei as position do player 

Editado por damiaotorres (veja o histórico de edições)

Postado

edite as posições e teste. Se não funfar avisa aqui que eu nem tive tempo de testar
 

function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
position = {x=1183, y=1224, z=7}, -- Posição aonde sera criado o teleport
position1 = {x=1216, y=1250, z=7},
position2 = {x=1216, y=1258, z=7},
position3 = {x=1222, y=1250, z=7},
position4 = {x=1222, y=1258, z=7},
fromPosition = {x=1215, y=1249, z=7},
toPosition = {x=1223, y=1259, z=7},
walls = {x=1177, y=1224, z=7},
wallr = {x=1177, y=1224, z=7,  stackpos = 1},
id = 1498,
time = 2 -- tempo que o teleport ira sumir em minutos
}


local monsterPositions = {
{x = 75, y = 140, z = 7}, --posição do monstro 1
{x = 75, y = 140, z = 7},  --posição do monstro 2
{x = 75, y = 140, z = 7},  --posição do monstro 3
{x = 75, y = 140, z = 7}, --posição do monstro 4
{x = 75, y = 140, z = 7}, --posição do monstro 5
{x = 75, y = 140, z = 7}  --posição do monstro 6
}


local t = {
level = 120, -- level minimo para poder entrar
inicio = -- posical inicial dos players
{
{x=1182,y=1224,z=7}
},
fim =  -- posição para onde serão teleportados
{
{x=1221,y=1254,z=7}
}
}
local time = 120
local gsto = 4567


local test = {}
for _, k in ipairs(t.inicio) do
local x = getTopCreature(k).uid
if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.level ) then
doPlayerSendCancel(cid, 'Não tem 5 players.')
return true
end
table.insert(test, x)
end
for i, pid in ipairs(test) do
for _, mPos in ipairs(monsterPositions) do
local mob = getTopCreature(cPos).uid
if mob ~= 0 and isMonster(mob) then
doRemoveCreature(mob) 
doCreateMonster("Annihilon", mPos)
else
doCreateMonster("Annihilon", mPos)
end 


end
doSendMagicEffect(t.inicio[i], CONST_ME_POFF)
doTeleportThing(pid, t.fim[i], false)
doSendMagicEffect(t.fim[i], CONST_ME_ENERGYAREA)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
doCreateItem(config.id, 1, config.walls)
for i = 1,time do
formula = time - 1*i
addEvent(doSendAnimatedText,i*1000, config.position, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position1, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position2, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position3, formula, math.random(1, 255))
addEvent(doSendAnimatedText,i*1000, config.position4, formula, math.random(1, 255))
end
function removeWall()
return true
end
addEvent(removeWall, config.time*60*1000)
for x = config.fromPosition.x, config.toPosition.x do
for y = config.fromPosition.y, config.toPosition.y do
for z = config.fromPosition.z, config.toPosition.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getMonsters = getThingfromPos(areapos)
if isMonster(getMonsters.uid) then
doRemoveCreature(getMonsters.uid)
end
end
end
end
function removePlayer()
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
end
end
addEvent(removePlayer, config.time*60*1000)
return TRUE
end

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo