Witajcie prosilbym o pomoc zeby przerobic go pod 8.1 za pomoc daje reput i podziekowanie, ten skrypt na spella:
[lua]-- skrypt wali na target w all potworki te co widzimy
local combat = createCombatObject()
-- Oczywiœcie te parametry mo¿emy zmieniaæ
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 5.1, -200000, 6.5, 23)
local obszar = {
poziomo = 5, -- Na ile kratek w poziomie szuka celow
pionowo = 5 -- Na ile kratek w pionie szuka celow
}
local manaPerTarget = 20 -- Ile many ma zabieraæ przy kazdym strzale
function onCastSpell(cid, var)
local specs = getSpectators(getCreaturePosition(cid), obszar.poziomo, obszar.pionowo, FALSE)
for i=1, #specs do
-- if((getCreatureMana(cid) > manaPerTarget or isPlayer(cid) == FALSE) and isNpc(specs) == FALSE and getTilePzInfo(getCreaturePosition(specs)) == FALSE) then
if((getCreatureMana(cid) > manaPerTarget) and isNpc(specs) == FALSE and getTilePzInfo(getCreaturePosition(specs)) == FALSE) then
-- if((getCreatureMana(cid) > manaPerTarget) and isNpc(specs) == FALSE) then
local target = specs
if(target ~= cid) then
local targetPos = getCreaturePosition(target)
if(isSightClear == nil or isSightClear(getCreaturePosition(cid), targetPos, FALSE) == TRUE) then
doCombat(cid, combat, numberToVariant(target))
if(isPlayer(cid) == TRUE) then
doCreatureAddMana(cid, -manaPerTarget)
doPlayerAddSpentMana(cid, manaPerTarget)
end
end
end
--else
-- break
end
end
if(#specs == 1) then
doPlayerSendCancel(cid,"You do not have any target.")
end
return TRUE
end[/lua]
[lua]-- skrypt wali na target w all potworki te co widzimy
local combat = createCombatObject()
-- Oczywiœcie te parametry mo¿emy zmieniaæ
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 5.1, -200000, 6.5, 23)
local obszar = {
poziomo = 5, -- Na ile kratek w poziomie szuka celow
pionowo = 5 -- Na ile kratek w pionie szuka celow
}
local manaPerTarget = 20 -- Ile many ma zabieraæ przy kazdym strzale
function onCastSpell(cid, var)
local specs = getSpectators(getCreaturePosition(cid), obszar.poziomo, obszar.pionowo, FALSE)
for i=1, #specs do
-- if((getCreatureMana(cid) > manaPerTarget or isPlayer(cid) == FALSE) and isNpc(specs) == FALSE and getTilePzInfo(getCreaturePosition(specs)) == FALSE) then
if((getCreatureMana(cid) > manaPerTarget) and isNpc(specs) == FALSE and getTilePzInfo(getCreaturePosition(specs)) == FALSE) then
-- if((getCreatureMana(cid) > manaPerTarget) and isNpc(specs) == FALSE) then
local target = specs
if(target ~= cid) then
local targetPos = getCreaturePosition(target)
if(isSightClear == nil or isSightClear(getCreaturePosition(cid), targetPos, FALSE) == TRUE) then
doCombat(cid, combat, numberToVariant(target))
if(isPlayer(cid) == TRUE) then
doCreatureAddMana(cid, -manaPerTarget)
doPlayerAddSpentMana(cid, manaPerTarget)
end
end
end
--else
-- break
end
end
if(#specs == 1) then
doPlayerSendCancel(cid,"You do not have any target.")
end
return TRUE
end[/lua]