Ir para conteúdo
  • 0

Pedido: Script Para Poketibia Sistema De Ataques


lais16gatinha

Pergunta

10 respostass a esta questão

Posts Recomendados

  • 0

@Topic'

 

 

Se vc tem o pet system, vc vai ver que no arquivo "petConfig.lua" tem tipo uma tabela de ataques.

No original vai estar:

 

!petattack "nome do poder ( que esta escrito lá ).

ex: !petattack "mini exori

 

aí o pet manda um mini exori.

 

Se não der conta, posta aí q eu faço um tuto completo '

Link para o comentário
Compartilhar em outros sites

  • 0

@brunin86

 

Só um problema, esse Pet system, já tentei colocar em duas versões (são elas: 8.42, 8.1) e não funcionou :winksmiley02:

Peguei aqui mesmo no XTibia, mas infelizmente não deu :mellow:

Será que não teria outro que funcionasse pra mim?

Grata

 

@Edit

Eu te conheço Oo

Pelo post eu sei que sim

Vou confirmar no msn e espero que você me ajude ^^

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

  • 0

@Laaay

 

Conhece sim ! '-', vc fica pedindo os script :S

 

@Up (Laaay)

 

Tenta colocar esse

 

petSystemExhaustion = 0 --in secods, 0 = no exhausted. 
frases = {"Men, im still exhausted!", "Ok, in one momment", "afff, again?!", "meh, one second"}
lenght = 39 -- maximun lenght the !petsay can have...
manaGainTicks = 3000 -- 
--how fast the pet gains mana
manaGainAmmount = 20 --//
manaGainPerLevel = 30 -- mana that gains the pet for each level the player gain
magicLevelRate = 10 -- how faster the pet will gain mlvl compared to real tibia,,
base = 2000 --base storage. All storages will depend of this number
storages = {
petMag = base,
petUid = base+1,
petExha = base+2,
petDamage = base+3,
petManaSpent = base+4,
petIsOnline = base+5,
petMana = base+6,
petIsHealing = base+7,
petCap = base+8,
petSystemExhaustion = base+9
}

petItems = {}
maxItems = 10 --Max items the pet can carry
--lol V
x = 0 y = function() x = x + 1 end table.foreach(storages, y)
for i = 1, maxItems do
petItems[i] = base+x+i
end
--Pets, dependiong on the level
pets = 
{
{vocations = {4, 8}, pets =
{{level = 350, name = "Juggernaut"}, {level = 255, name = "Dark Torturer"}, {level = 190, name = "Hellfire Fighter"}, {level = 120, name = "Hydra"}, {level = 80, name = "Quara Hydromancer"}, {level = 50, name = "Cyclops Smith"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Barbarian Skullhunter"}, {level = 20, name = "Monk"}, {level = 10, name = "Bear"}, {level = 0, name = "Wolf"}}
},
{vocations = {1, 5}, pets =
{{level = 7, name = "Ferumbras"}, {level = 260, name = "Demon"}, {level = 180, name = "Betrayed Wraith"}, {level = 120, name = "Diabolic Imp"}, {level = 80, name = "Braindeath"}, {level = 50, name = "Ice Golem"}, {level = 40, name = "Acolyte Of The Cult"}, {level = 30, name = "Barbarian Headsplitter"}, {level = 20, name = "Dark Monk"}, {level = 10, name = "Polar Bear"}, {level = 0, name = "Cave Rat"}}
},
{vocations = {2, 6}, pets =
{{level = 7, name = "Ferumbras"}, {level = 260, name = "Hand of Cursed Fate"}, {level = 175, name = "Phantasm"}, {level = 120, name = "Frost Dragon"}, {level = 80, name = "Massive Water Elemental"}, {level = 50, name = "Water Elemental"}, {level = 40, name = "Dwarf Geomancer"}, {level = 30, name = "Barbarian Brutetamer"}, {level = 20, name = "Assassin"}, {level = 10, name = "Lion"}, {level = 0, name = "Rat"}}
},
{vocations = {3, 7}, pets =
{{level = 350, name = "Orshabaal"}, {level = 260, name = "Plaguesmith"}, {level = 185, name = "Destroyer"}, {level = 120, name = "Dragon Lord"}, {level = 80, name = "Quara Hydromancer Scout"}, {level = 50, name = "Orc Leader"}, {level = 40, name = "Elf Arcanist"}, {level = 30, name = "Barbarian Bloodwalker"}, {level = 20, name = "Hunter"}, {level = 10, name = "Panda"}, {level = 0, name = "Bat"}}
}
}
--attacks of the pet. !petattack "param
--It's pretty easy how to config, I think it doesn't need an extra explanation.
attacks = {{param = "m1", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 1, exhausted = 1, range = 6, combatType = COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 2, 
formula = {maxb = 0.4, maxa = 30, minb = 0.2, mina = 0},
},
{param = "m2", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 1, exhausted = 1, range = 0, combatType = COMBAT_PHYSICALDAMAGE, combatAni = CONST_ME_HITAREA, area = 2, 
formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0},
},
{param = "m3", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 100, exhausted = 1, range = 3, combatType = COMBAT_FIREDAMAGE, combatAni = CONST_ME_FIREAREA, area = 1, 
formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0}
},
{param = "m4", theFunction = false, offensive = 1, needLevel = 0, self = 0, needMag = 0, manaSpent = 1, exhausted = 1, range = 1, combatType = COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 1, 
formula = {maxb = 0.13, maxa = 0, minb = 0.262, mina = 0}
},
{param = "m5", theFunction = false, offensive = -1, needLevel = 1, self = 1, needMag = 0, manaSpent = 1, exhausted = 2, range = 0, combatType = COMBAT_HEALING, combatAni = CONST_ME_MAGIC_BLUE, area = 1, 
formula = {maxb = 0.4, maxa = 20, minb = 0.7, mina = 0}
},
{param = "m6", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 1, exhausted = 2, range = 0, combatType = COMBAT_ICEDAMAGE, combatAni = CONST_ANI_FIRE, area = 8, 
formula = {maxb = 1.0, maxa = 50, minb = 1.7, mina = 0}
},
{param = "paralize", needLevel = 1, needMag = 0, manaSpent = 300, exhausted = 2,
theFunction = function (parameters)
daPet = getPlayerStorageValue(parameters.cid, storages.petUid)
if getCreatureTarget(daPet) ~= 0 then
doAddCondition(getCreatureTarget(parameters.cid), 4)
end
end
},
{param = "speed", needLevel = 10, needMag = 4, manaSpent = 60, exhausted = 2,
theFunction = function (parameters) 
doAddCondition(getPlayerStorageValue(parameters.cid, storages.petUid), 11)
end
},
{param = "double fire", needLevel = 1, needMag = 0, manaSpent = 220, exhausted = 2,
theFunction = function (parameters)


local myAttack = formulaAttack(getPlayerLevel(parameters.cid), getPlayerStorageValue(parameters.cid, storages.petMag), 0.7, 0, 1.0, 0)
function doAreaCombatHealthEx(params)
local randoms = {[1] = math.random(-2, 2),
[2] = math.random(-2, 2) 
}

local attackCreature = getPlayerStorageValue(parameters.cid, storages.petUid)
if getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid)) ~= 0 then
attackCreature = getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid))
end 
local posa = getCreaturePosition(attackCreature)
doAreaCombatHealth(getPlayerStorageValue(parameters.cid, storages.petUid), COMBAT_FIREDAMAGE, {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, 1, -params.myAttack.minD, -params.myAttack.maxD, CONST_ME_FIREAREA)
doSendDistanceShoot(getCreaturePosition(getPlayerStorageValue(parameters.cid, storages.petUid)), {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, CONST_ANI_FIRE)

end
doAreaCombatHealthEx({cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})
for i = 1, 7 do
addEvent(doAreaCombatHealthEx, 200*i, {cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})
end
end
}
}
function setExhausted(cid)
setPlayerStorageValue(cid, storages.petSystemExhaustion, os.clock()+1)
end
function formulaAttack(magicLevel, level, maxb, maxa, minb, mina)
return {minD = (level * 2 + magicLevel * 3) * (1 + mina) + minb,
maxD = (level * 2 + magicLevel * 3) * (1 + maxb) + maxa
}
end

function isExhausted(cid)
if isPlayer(cid) == 1 then 
local CRONOMETRO = getPlayerStorageValue(cid, storages.petSystemExhaustion)
local CRONOMETRO2 = os.clock()
local TIEMPO = os.difftime(CRONOMETRO2, CRONOMETRO)
if petSystemExhaustion - TIEMPO > petSystemExhaustion or CRONOMETRO == -1 then
setPlayerStorageValue(cid, storages.petSystemExhaustion, CRONOMETRO2+1)
return 0
end
if petSystemExhaustion - TIEMPO <= 0 then
return 0
end
end
return 1
end

function addMana(a)
local cid = a.cid
local petManaMax = getPlayerLevel(cid)*manaGainPerLevel
if getPlayerStorageValue(cid, storages.petMana) < petManaMax then
if petManaMax - getPlayerStorageValue(cid, storages.petMana) < 10 then
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + petManaMax - getPlayerStorageValue(cid, storages.petMana))
else
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + 10)
end
addEvent(addMana, manaGainTicks, {cid = cid})
else
setPlayerStorageValue(cid, storages.petIsHealing, 0)
end
end

 

!petattack "m1

!petattack "m2

!petattack "m3

!petattack "m4

!petattack "m5

!petattack "m6

 

Se não funcionar, posta aí, pq to cum preguiça de entrar no msn. ._.

bYe.

Link para o comentário
Compartilhar em outros sites

  • 0

tem como por esse script abaixo por itens igual pokebola ?

 

petSystemExhaustion = 0 --in secods, 0 = no exhausted.

frases = {"Men, im still exhausted!", "Ok, in one momment", "afff, again?!", "meh, one second"}

lenght = 39 -- maximun lenght the !petsay can have...

manaGainTicks = 3000 --

--how fast the pet gains mana

manaGainAmmount = 20 --//

manaGainPerLevel = 30 -- mana that gains the pet for each level the player gain

magicLevelRate = 10 -- how faster the pet will gain mlvl compared to real tibia,,

base = 2000 --base storage. All storages will depend of this number

storages = {

petMag = base,

petUid = base+1,

petExha = base+2,

petDamage = base+3,

petManaSpent = base+4,

petIsOnline = base+5,

petMana = base+6,

petIsHealing = base+7,

petCap = base+8,

petSystemExhaustion = base+9

}

 

petItems = {}

maxItems = 10 --Max items the pet can carry

--lol V

x = 0 y = function() x = x + 1 end table.foreach(storages, y)

for i = 1, maxItems do

petItems = base+x+i

end

--Pets, dependiong on the level

pets =

{

{vocations = {4, 8}, pets =

{{level = 350, name = "Juggernaut"}, {level = 255, name = "Dark Torturer"}, {level = 190, name = "Hellfire Fighter"}, {level = 120, name = "Hydra"}, {level = 80, name = "Quara Hydromancer"}, {level = 50, name = "Cyclops Smith"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Barbarian Skullhunter"}, {level = 20, name = "Monk"}, {level = 10, name = "Bear"}, {level = 0, name = "Wolf"}}

},

{vocations = {1, 5}, pets =

{{level = 7, name = "Ferumbras"}, {level = 260, name = "Demon"}, {level = 180, name = "Betrayed Wraith"}, {level = 120, name = "Diabolic Imp"}, {level = 80, name = "Braindeath"}, {level = 50, name = "Ice Golem"}, {level = 40, name = "Acolyte Of The Cult"}, {level = 30, name = "Barbarian Headsplitter"}, {level = 20, name = "Dark Monk"}, {level = 10, name = "Polar Bear"}, {level = 0, name = "Cave Rat"}}

},

{vocations = {2, 6}, pets =

{{level = 7, name = "Ferumbras"}, {level = 260, name = "Hand of Cursed Fate"}, {level = 175, name = "Phantasm"}, {level = 120, name = "Frost Dragon"}, {level = 80, name = "Massive Water Elemental"}, {level = 50, name = "Water Elemental"}, {level = 40, name = "Dwarf Geomancer"}, {level = 30, name = "Barbarian Brutetamer"}, {level = 20, name = "Assassin"}, {level = 10, name = "Lion"}, {level = 0, name = "Rat"}}

},

{vocations = {3, 7}, pets =

{{level = 350, name = "Orshabaal"}, {level = 260, name = "Plaguesmith"}, {level = 185, name = "Destroyer"}, {level = 120, name = "Dragon Lord"}, {level = 80, name = "Quara Hydromancer Scout"}, {level = 50, name = "Orc Leader"}, {level = 40, name = "Elf Arcanist"}, {level = 30, name = "Barbarian Bloodwalker"}, {level = 20, name = "Hunter"}, {level = 10, name = "Panda"}, {level = 0, name = "Bat"}}

}

}

--attacks of the pet. !petattack "param

--It's pretty easy how to config, I think it doesn't need an extra explanation.

attacks = {{param = "m1", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 1, exhausted = 1, range = 6, combatType = COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 2,

formula = {maxb = 0.4, maxa = 30, minb = 0.2, mina = 0},

},

{param = "m2", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 1, exhausted = 1, range = 0, combatType = COMBAT_PHYSICALDAMAGE, combatAni = CONST_ME_HITAREA, area = 2,

formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0},

},

{param = "m3", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 100, exhausted = 1, range = 3, combatType = COMBAT_FIREDAMAGE, combatAni = CONST_ME_FIREAREA, area = 1,

formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0}

},

{param = "m4", theFunction = false, offensive = 1, needLevel = 0, self = 0, needMag = 0, manaSpent = 1, exhausted = 1, range = 1, combatType = COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 1,

formula = {maxb = 0.13, maxa = 0, minb = 0.262, mina = 0}

},

{param = "m5", theFunction = false, offensive = -1, needLevel = 1, self = 1, needMag = 0, manaSpent = 1, exhausted = 2, range = 0, combatType = COMBAT_HEALING, combatAni = CONST_ME_MAGIC_BLUE, area = 1,

formula = {maxb = 0.4, maxa = 20, minb = 0.7, mina = 0}

},

{param = "m6", theFunction = false, offensive = 1, needLevel = 1, self = 0, needMag = 0, manaSpent = 1, exhausted = 2, range = 0, combatType = COMBAT_ICEDAMAGE, combatAni = CONST_ANI_FIRE, area = 8,

formula = {maxb = 1.0, maxa = 50, minb = 1.7, mina = 0}

},

{param = "paralize", needLevel = 1, needMag = 0, manaSpent = 300, exhausted = 2,

theFunction = function (parameters)

daPet = getPlayerStorageValue(parameters.cid, storages.petUid)

if getCreatureTarget(daPet) ~= 0 then

doAddCondition(getCreatureTarget(parameters.cid), 4)

end

end

},

{param = "speed", needLevel = 10, needMag = 4, manaSpent = 60, exhausted = 2,

theFunction = function (parameters)

doAddCondition(getPlayerStorageValue(parameters.cid, storages.petUid), 11)

end

},

{param = "double fire", needLevel = 1, needMag = 0, manaSpent = 220, exhausted = 2,

theFunction = function (parameters)

 

 

local myAttack = formulaAttack(getPlayerLevel(parameters.cid), getPlayerStorageValue(parameters.cid, storages.petMag), 0.7, 0, 1.0, 0)

function doAreaCombatHealthEx(params)

local randoms = {[1] = math.random(-2, 2),

[2] = math.random(-2, 2)

}

 

local attackCreature = getPlayerStorageValue(parameters.cid, storages.petUid)

if getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid)) ~= 0 then

attackCreature = getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid))

end

local posa = getCreaturePosition(attackCreature)

doAreaCombatHealth(getPlayerStorageValue(parameters.cid, storages.petUid), COMBAT_FIREDAMAGE, {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, 1, -params.myAttack.minD, -params.myAttack.maxD, CONST_ME_FIREAREA)

doSendDistanceShoot(getCreaturePosition(getPlayerStorageValue(parameters.cid, storages.petUid)), {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, CONST_ANI_FIRE)

 

end

doAreaCombatHealthEx({cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})

for i = 1, 7 do

addEvent(doAreaCombatHealthEx, 200*i, {cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})

end

end

}

}

function setExhausted(cid)

setPlayerStorageValue(cid, storages.petSystemExhaustion, os.clock()+1)

end

function formulaAttack(magicLevel, level, maxb, maxa, minb, mina)

return {minD = (level * 2 + magicLevel * 3) * (1 + mina) + minb,

maxD = (level * 2 + magicLevel * 3) * (1 + maxb) + maxa

}

end

 

function isExhausted(cid)

if isPlayer(cid) == 1 then

local CRONOMETRO = getPlayerStorageValue(cid, storages.petSystemExhaustion)

local CRONOMETRO2 = os.clock()

local TIEMPO = os.difftime(CRONOMETRO2, CRONOMETRO)

if petSystemExhaustion - TIEMPO > petSystemExhaustion or CRONOMETRO == -1 then

setPlayerStorageValue(cid, storages.petSystemExhaustion, CRONOMETRO2+1)

return 0

end

if petSystemExhaustion - TIEMPO <= 0 then

return 0

end

end

return 1

end

 

function addMana(a)

local cid = a.cid

local petManaMax = getPlayerLevel(cid)*manaGainPerLevel

if getPlayerStorageValue(cid, storages.petMana) < petManaMax then

if petManaMax - getPlayerStorageValue(cid, storages.petMana) < 10 then

setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + petManaMax - getPlayerStorageValue(cid, storages.petMana))

else

setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + 10)

end

addEvent(addMana, manaGainTicks, {cid = cid})

else

setPlayerStorageValue(cid, storages.petIsHealing, 0)

end

end

Link para o comentário
Compartilhar em outros sites

  • 0

Aee galera alguem ai poderiam me mandar ou criar um script,que quando os player fala (m1,m2,m3......m10) os pokemons vai soltando os poderes.quem me ajudar nisso do um +rep por uma semana todos os dias.se puderem entrar em contato meu msn é: lukkas.magnetud77@hotmail.com

Link para o comentário
Compartilhar em outros sites

  • 0

Postado 20 agosto 2011 - 07:03

Ola gente vim aqui postar um system de m1 a m12 em 2 script eu tiver que por em download porque o arquivo é grande e não deu pra postar

 

Download do scripts ae \/ ta com o tutorial dentro da pasta.

 

DOWNLOAD

 

mais para aqueles preguiçosos que não gostam de abrir os arquivo pra ler ai o tutorial \/.

 

Tutorial

 

 

Spoiler

 

 

vai na pasta data/talkactions/talkactions.xml

 

< talkaction words="m1;m2;m3;m4;m5;m6;m7;m8;m9;m10;m11;m12;m13;" case-sensitive="no" event="script" value="ataques.lua"/>

 

depois va na pasta data/talkactions/scripts/ e coloque o arquivo chamado ataques.lua

 

vai na pasta data/lib e coloque o arquivo chamando pokemon moves.lua

 

Explicando

 

["Bulbasaur"] = {- nome do pokemon

["m1"] = - Comando que o player ira usar

{spell = "Quick Attack" - Spell que o pokemon ira usar

minlvl = 20 - lvl minimo que o player tem q ter para usar o move

ex = 10001 - é a dex do pokemon e o comando ex: o 1 é o numero da dex + 000 + 1 < numero do comando se for m2 no final ponha 2.

st = - 2000 é pra diferenciar o cd dos outros ataques

cd = 7 - é o cooldown gente leia abaixo como funcionar o cd é importante.

base1 = 20 - Dano minimo

base2 = 30 - Dano max

dista = 1 - Distancia que o pokemon vai fica do inimigo

bonus = 2 - bonus que o pokemon recebe a cada level do player

type = normal} - Tipo de dano

 

 

 

CD LEIA IMPORTANTE

 

Gente o cd é o seguinte é meio complicado ele por exemplo se um pokemon tiver o cd de 30 você terá que por no script 59 porque 59? eu não sei mais pra saber o cd que tem q por é facil

 

30 + 30 = 60 - 1 = 59 tenteram

 

 

Ajudei Rep + :button_ok:

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...