Ir para conteúdo

Adicionando Items Novos.


lucasjockey

Posts Recomendados

Nesse tutorial vou ensinar aquelas pessoas que querem que as ammunitions novas apareçam quando são atiradas, tipo a sniper arrow, piercing bolt, entre outras.

 

Vá em "Data" e abra o arquivo "global.lua", adicione isso enbaixo de "CONST_ANI_INFERNALBOLT = 15":

 

CONST_ANI_HUNTINGSPEAR = 16
CONST_ANI_ENCHANTEDSPEAR = 17
CONST_ANI_ASSASSINSTAR = 18
CONST_ANI_GREENSTAR = 19
CONST_ANI_ROYALSPEAR = 20
CONST_ANI_SNIPERARROW = 21
CONST_ANI_ONYXARROW = 22
CONST_ANI_PIERCINGBOLT = 23
CONST_ANI_WHIRLWINDSWORD = 24
CONST_ANI_WHIRLWINDAXE = 25
CONST_ANI_WHIRLWINDCLUB = 26
CONST_ANI_ETHEREALSPEAR = 27

 

Salve e agora vá em "Data\weapons" e abra o arquivo "weapons.xml" e coloque isso aonde quiser:

 

<distance id="7367" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="enchanted spear.lua"></distance>
<distance id="7364" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="sniper arrow.lua"></distance>
<distance id="7363" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="piercing bolt.lua"></distance>
<distance id="7365" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="onyx arrow.lua"></distance>
<distance id="7378" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="royal spear.lua"></distance>
<distance id="3965" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="hunting spear.lua"></distance>
<distance id="7368" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="assassin star.lua"></distance>
<distance id="7366" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="viper star.lua"></distance>

 

Salve e agora vá na pasta "Data\weapons\scripts" e crie os arquivos abaixo:

 

enchanted spear.lua

sniper arrow.lua

piercing bolt.lua

onyx arrow.lua

royal spear.lua

hunting spear.lua

assassin star.lua

viper star.lua

 

Agora dentro de cada um:

 

enchanted spear.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 17)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, -0.5, -3, -1, -6)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

sniper arrow.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 21)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

piercing bolt.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 23)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

onyx arrow.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 22)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

royal spear.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 20)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

hunting spear.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 16)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

assassin star.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

viper star.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 19)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

Pronto, espero que tenham entendido. ;)

 

Caso tenham alguma duvida perguntem.

 

Créditos: Meu (100%)

 

Caso já tenha um tutorial parecido com esse (do mesmo assunto) que tenha sido feito antes do meu no xtibia me falem e eu tiro o meu, flw ;D

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

Cara vc eh demais :smile_positivo: hehe eu tava atras disso!! parabéns meu geral fecho era isso que eu tava procurando vlws continue assim parabens!!! pra mim ta aprovado!!!!

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

CARA MUITO BOM ADOREI APROVADO MUITO FACIL E PRATICO

 

 

MEUS TRABALHOS

FAZER UM GRANDE OT E TER UMA GRANDE EQUIPE

OT SERVER

201.17.221.89

 

 

.org/k385418.html"]MEU OT AI GALERA

 

MEUS PROJETOS

UM MAPA QUE FACILITE A VIDA DE TODOS

 

 

 

orshabaal.gif

ORSHABAAL TEAM ULTRA FORCE

VALEU AI CARA

Link para o comentário
Compartilhar em outros sites

Gostei muito ;D Muito bom o tutorial, Parabéns

 

@mdcj1234

 

Porque você não coloca sua sing no lugar correto? É mais fácil do que ficar copiando no post ;]

 

@tadzio

 

Porque que você não arruma em vez de criticar? Aposto que se fosse seu post você não ia gostar.

 

 

 

 

 

~// Alice.

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
Nesse tutorial vou ensinar aquelas pessoas que querem que as ammunitions novas apareçam quando são atiradas, tipo a sniper arrow, piercing bolt, entre outras.

 

Vá em "Data" e abra o arquivo "global.lua", adicione isso enbaixo de "CONST_ANI_INFERNALBOLT = 15":

 

CONST_ANI_HUNTINGSPEAR = 16
CONST_ANI_ENCHANTEDSPEAR = 17
CONST_ANI_ASSASSINSTAR = 18
CONST_ANI_GREENSTAR = 19
CONST_ANI_ROYALSPEAR = 20
CONST_ANI_SNIPERARROW = 21
CONST_ANI_ONYXARROW = 22
CONST_ANI_PIERCINGBOLT = 23
CONST_ANI_WHIRLWINDSWORD = 24
CONST_ANI_WHIRLWINDAXE = 25
CONST_ANI_WHIRLWINDCLUB = 26
CONST_ANI_ETHEREALSPEAR = 27

 

Salve e agora vá em "Data\weapons" e abra o arquivo "weapons.xml" e coloque isso aonde quiser:

 

<distance id="7367" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="enchanted spear.lua"></distance>
<distance id="7364" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="sniper arrow.lua"></distance>
<distance id="7363" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="piercing bolt.lua"></distance>
<distance id="7365" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="onyx arrow.lua"></distance>
<distance id="7378" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="royal spear.lua"></distance>
<distance id="3965" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="hunting spear.lua"></distance>
<distance id="7368" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="assassin star.lua"></distance>
<distance id="7366" range="6" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="viper star.lua"></distance>

 

Salve e agora vá na pasta "Data\weapons\scripts" e crie os arquivos abaixo:

 

enchanted spear.lua

sniper arrow.lua

piercing bolt.lua

onyx arrow.lua

royal spear.lua

hunting spear.lua

assassin star.lua

viper star.lua

 

Agora dentro de cada um:

 

enchanted spear.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 17)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, -0.5, -3, -1, -6)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

sniper arrow.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 21)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

piercing bolt.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 23)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

onyx arrow.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 22)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

royal spear.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 20)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

hunting spear.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 16)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

assassin star.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

viper star.lua

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 19)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

Pronto, espero que tenham entendido. ;)

 

Caso tenham alguma duvida perguntem.

 

Créditos: Meu (100%)

 

Caso já tenha um tutorial parecido com esse (do mesmo assunto) que tenha sido feito antes do meu no xtibia me falem e eu tiro o meu, flw ;D

 

 

 

 

 

 

 

caraa muito loko parabens meu

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...