gmstrikker
Well-Known Member
- Joined
- Jul 30, 2014
- Messages
- 458
- Solutions
- 1
- Reaction score
- 50
Whats worng with this script?
Code:
w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}
local minimo
local maximo
function onGetFormulaValues(cid, level, skill, attack, factor)
minimo = (attack * spellconfig_wandnrods_min) * -1
maximo = (attack * spellconfig_wandnrods_max) * -1
end
function onUseWeapon(cid, var)
target = getCreatureTarget(cid)
for stor, info in pairs(w) do
if getPlayerStorageValue(cid, stor) == 1 then
if target ~= 0 then
doSendDistanceShoot(getThingPos(cid), getThingPos(target), info.sh)
addEvent(doAreaCombatHealth, 100, cid, info.dmg, getThingPos(target), 0, minimo, maximo, info.ef)
end
end
end
return true
end