faça um arquivo na pasta weapons/scripts com nome de Wand.lua
e cole isso la dentro
w = {
[1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[2] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[3] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[4] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[5] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[6] = {ef = 31, sh = 35, dmg = COMBAT_PHYSICALDAMAGE},
[7] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}
function onUseWeapon(cid, var)
min, max = 300, 300 -- dano minimo e maximo
target = getCreatureTarget(cid)
if target ~= 0 then
wx = w[math.random(1, #w)]
doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
end
return true
end
quando for escolher o item que sera a wand nao esqueça de colocar isso
<item id="xxx" article="the" name="nome da sua wand"> <attribute key="description" value="a melhor wand." /> <attribute key="weight" value="2300" /> <attribute key="weaponType" value="wand" /> coloque oque ela vai ser,no caso sera Wand,entao deixe <attribute key="shootType" value="holy" /> não tem importançia <attribute key="range" value="8" />
depois cole essa Tag em weapon.xml
<wand id="xxx" level="50" mana="13" min="0" max="0" type="earth" event="script" value="wand.lua"> <!-- Enforced Wand --> <vocation id="1"/> [aqui fica qual vocação vai usar,aqui esta sorcerer 1 e druid 2,escolha qual quizer] <vocation id="2"/>
Explicação
min, max = 300, 300 -- dano minimo e maximo ja diz tudo
"xxx" aqui é a ID do Item que sera a Wand









info
Grupo: Campones
Registrado: 14/01/12
Posts: 22
Reputação: +1
Olá galerinha :3
Quero pedir hoje (novidade) um script de uma weapon (Wand, de preferencia) que solte 3 efeitos diferentes..
Por exemplo:
~ Primeiro solta um ShootEffect de HOLY com o efeito 49 no target.
~~ Depois solta um ShootEffect de SUDDENDEATH com o efeito 17 no target.
~~~ Por ultimo solta um ShootEffect de ENERGY com efeito 41 no target.
obs: não precisa ser desses efeitos, foram só um exemplo.
Agradeço muito, MUITO! A quem me ajudar :3
e dou REP+ claro :]