whitevo
Feeling good, thats what I do.
Im not good with Scripting and i'm trying to make:
onUseWeapon to shuffel trough all the listed damage types and then do 1 attack with each attack type.
(this all also should happen in 1 attack)
EDIT: Fixed code. This script will do 5 different elemental damages in singel hit
onUseWeapon to shuffel trough all the listed damage types and then do 1 attack with each attack type.
(this all also should happen in 1 attack)
EDIT: Fixed code. This script will do 5 different elemental damages in singel hit
LUA:
local combat, types = {}, {COMBAT_FIREDAMAGE, COMBAT_EARTHDAMAGE, COMBAT_ICEDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_DEATHDAMAGE}
for x = 1, #types do
combat[x] = Combat()
combat[x]:setParameter(COMBAT_PARAM_TYPE, types[x])
combat[x]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
combat[x]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
function onGetFormulaValues(cid, level, maglevel)
min = -10
max = -10
return min, max
end
combat[x]:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
end
function onUseWeapon(player, var)
for x = 1, #types do
addEvent(function() combat[x]:execute(player, var) end, x * 100)
end
return true
end
Last edited: