- 0
pedido scripts Bug spell addevent help!
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 5 respostas
- 1966 visualizações
-
- 1 resposta
- 1421 visualizações
-
- 1 resposta
- 1517 visualizações
-
- 0 respostas
- 1521 visualizações
-
- 0 respostas
- 1435 visualizações
-
Pergunta
FelipeXT 19
Fala galera do Xtibia Blz?
Estou com um problema no meu spell na parte do addevent, negocio e o seguinte quando eu uso a magia em um target ela aciona o evento belezinha ate ai tudo bem! Problema e quando o target morre o evento continua rodando causando erros no meu executável, eu ate tentei fazer o stopevent mas não obtive sucesso! Procurei alguns tutoriais mais sou leigo nessa parte, queria que algum scripter lua aqui me ajudasse se possível xD. Agradeço desde já a atenção
Version 7.92 OLD TIBIA
Erros no exe
Lua Script Error: [Spell Interface]
in a timer event called from:
data/spells/scripts/exevo gran mas tera.lua:onCastSpell
luaGetThingPos(). Thing not found
Lua Script Error: [Spell Interface]
in a timer event called from:
data/spells/scripts/exevo gran mas tera.lua:onCastSpell
luaGetThingPos(). Thing not found
Lua Script Error: [Spell Interface]
in a timer event called from:
data/spells/scripts/exevo mas flam.lua:onCastSpell
attempt to call a nil value
Script spell
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 53)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -6.25, -22, -8.85, 0)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 53)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -8.95, -26, -10.55, 0)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 53)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -10.55, -33, -12.85, 0)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 53)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -12.25, -35, -14.10, 0)
local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 53)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -15.45, -41, -17.85, 0)
local function combo(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
local function combo2(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end
local function combo3(parameters)
doCombat(parameters.cid, parameters.combat4, parameters.var)
end
local function combo4(parameters)
doCombat(parameters.cid, parameters.combat5, parameters.var)
end
local function CooldownTime(cid)
doPlayerSendTextMessage(cid,18,"CD:Dragăo Espiritual.")
end
function onCastSpell(cid, var)
if isPlayer(cid) == 0 then
doCreatureSay(cid,"Flame!", 16)
return doCombat(cid, combat, var)
end
local parameters = { cid = cid, var = var, combat2 = combat2 }
local parameters2 = { cid = cid, var = var, combat3 = combat3 }
local parameters3 = { cid = cid, var = var, combat4 = combat4 }
local parameters4 = { cid = cid, var = var, combat5 = combat5 }
local exhaustedstorage = 3000004 -- Storage Value do exhausted da magia!
local magialevel = getPlayerStorageValue(cid, 700590)
local magiaup = getPlayerStorageValue(cid, 700591)
local upmagia1 = getPlayerStorageValue(cid, 700591)/100 * 100
local upmagia2 = getPlayerStorageValue(cid, 700591)/100 * 100
local upmagia3 = getPlayerStorageValue(cid, 700591)/100 * 100
local upmagia4 = getPlayerStorageValue(cid, 700591)/100 * 100
local target = getCreatureTarget(cid)
if(target == 0) then
doPlayerSendCancel(cid,'Voce precisa de um alvo.')
doSendMagicEffect(getCreaturePosition(cid), 2)
return TRUE
end
if getPlayerReset(cid) < 1 then
doPlayerSendTextMessage(cid,20,"Voce nao possui reset suficiente para usar esta magia.")
doSendMagicEffect(getCreaturePosition(cid), 2)
return TRUE
end
local target = getCreatureTarget(cid)
if(isPlayer(cid) == 1 and magialevel == 1 and magiaup <= 100 and os.time() < getPlayerStorageValue(cid, exhaustedstorage)) then
doPlayerSendCancel(cid,"Dragăo Espiritual em cooldown por " .. getPlayerStorageValue(cid, exhaustedstorage) - os.time() .. " segundos.")
return TRUE
end
if isPlayer(cid) == 1 and magialevel < 0 and magiaup < 0 then
setPlayerStorageValue(cid, 700590, 1)
setPlayerStorageValue(cid, 700591, 1)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 60)
doPlayerSendTextMessage(cid,24,"Magia: Dragăo Espiritual, Level da Magia: 1 Up: 0%.")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddSoul(cid,-60)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*60000,cid)
local function spell3(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat, numberToVariant(target))
end
if isPlayer(cid) == 1 and magialevel == 1 and magiaup < 100 then
setPlayerStorageValue(cid, 700591, magiaup+1)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 60)
doPlayerSendTextMessage(cid,24,"Magia: Dragăo Espiritual, Level da Magia: "..magialevel.." Up: "..math.ceil(upmagia1).."%.")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*60000,cid)
local function spell2(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat, numberToVariant(target))
end
if isPlayer(cid) == 1 and magialevel == 1 and magiaup == 100 then
setPlayerStorageValue(cid, 700590, magialevel+1)
setPlayerStorageValue(cid, 700591, magiaup-magiaup)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 60)
doPlayerSendTextMessage(cid,22,"Parabéns, agora a magia Dragăo Espiritual está level "..1+magialevel..".")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*60000,cid)
local function spell3(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat, numberToVariant(target))
end
if(isPlayer(cid) == 1 and magialevel == 2 and magiaup <= 100 and os.time() < getPlayerStorageValue(cid, exhaustedstorage)) then
doPlayerSendCancel(cid,"Dragăo Espiritual em cooldown por " .. getPlayerStorageValue(cid, exhaustedstorage) - os.time() .. " segundos.")
return TRUE
end
if isPlayer(cid) == 1 and magialevel == 2 and magiaup < 100 then
setPlayerStorageValue(cid, 700591, magiaup+1)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 58)
doPlayerSendTextMessage(cid,24,"Magia: Dragăo Espiritual, Level da Magia: "..magialevel.." Up: "..math.ceil(upmagia2).."%.")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*58000,cid)
local function spell4(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat2, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat2, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat2, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat, numberToVariant(target))
end
if isPlayer(cid) == 1 and magialevel == 2 and magiaup == 100 then
setPlayerStorageValue(cid, 700590, magialevel+1)
setPlayerStorageValue(cid, 700591, magiaup-magiaup)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 58)
doPlayerSendTextMessage(cid,22,"Parabéns, agora a magia Dragăo Espiritual está level "..1+magialevel..".")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*58000,cid)
local function spell4(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat2, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat2, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(10*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat2, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat2, numberToVariant(target))
end
if(isPlayer(cid) == 1 and magialevel == 3 and magiaup <= 100 and os.time() < getPlayerStorageValue(cid, exhaustedstorage)) then
doPlayerSendCancel(cid,"Dragăo Espiritual em cooldown por " .. getPlayerStorageValue(cid, exhaustedstorage) - os.time() .. " segundos.")
return TRUE
end
if isPlayer(cid) == 1 and magialevel == 3 and magiaup < 100 then
setPlayerStorageValue(cid, 700591, magiaup+1)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 56)
doPlayerSendTextMessage(cid,24,"Magia: Dragăo Espiritual, Level da Magia: "..magialevel.." Up: "..math.ceil(upmagia3).."%.")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*56000,cid)
local function spell5(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
local function spell3(cid)
addEvent(spell4, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat3, numberToVariant(target))
end
if isPlayer(cid) == 1 and magialevel == 3 and magiaup == 100 then
setPlayerStorageValue(cid, 700590, magialevel+1)
setPlayerStorageValue(cid, 700591, magiaup-magiaup)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 56)
doPlayerSendTextMessage(cid,22,"Parabéns, agora a magia Dragăo Espiritual está level "..1+magialevel..".")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*56000,cid)
local function spell5(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
local function spell3(cid)
addEvent(spell4, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(15*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat3, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat3, numberToVariant(target))
end
if(isPlayer(cid) == 1 and magialevel == 4 and magiaup <= 100 and os.time() < getPlayerStorageValue(cid, exhaustedstorage)) then
doPlayerSendCancel(cid,"Dragăo Espiritual em cooldown por " .. getPlayerStorageValue(cid, exhaustedstorage) - os.time() .. " segundos.")
return TRUE
end
if isPlayer(cid) == 1 and magialevel == 4 and magiaup < 100 then
setPlayerStorageValue(cid, 700591, magiaup+1)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 54)
doPlayerSendTextMessage(cid,24,"Magia: Dragăo Espiritual, Level da Magia: "..magialevel.." Up: "..math.ceil(upmagia4).."%.")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*54000,cid)
local function spell6(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell4(cid)
addEvent(spell5, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell3(cid)
addEvent(spell4, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat4, numberToVariant(target))
end
if isPlayer(cid) == 1 and magialevel == 4 and magiaup == 100 then
setPlayerStorageValue(cid, 700590, magialevel+1)
setPlayerStorageValue(cid, 700591, magiaup-magiaup)
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 54)
doPlayerSendTextMessage(cid,24,"Parabéns, agora a magia Dragăo Espiritual está level "..1+magialevel..".")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
addEvent(CooldownTime, 1*54000,cid)
local function spell6(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell4(cid)
addEvent(spell5, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell3(cid)
addEvent(spell4, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(20*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat4, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat4, numberToVariant(target))
end
if(isPlayer(cid) == 1 and magialevel == 5 and os.time() < getPlayerStorageValue(cid, exhaustedstorage)) then
doPlayerSendCancel(cid,"Dragăo Espiritual em cooldown por " .. getPlayerStorageValue(cid, exhaustedstorage) - os.time() .. " segundos.")
return TRUE
end
if isPlayer(cid) == 1 and magialevel == 5 then
setPlayerStorageValue(cid, exhaustedstorage, os.time() + 52)
doPlayerSendTextMessage(cid,24,"Magia: Dragăo Espiritual, Level da Magia: 5.")
doCreatureSay(cid,"Exevo Gran Mas Tera!", 16)
doCreatureSay(target,"Drain!",16)
addEvent(CooldownTime, 1*52000,cid)
doPlayerAddSoul(cid,-52)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
local function spell8(cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
local function spell6(cid)
addEvent(spell7, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
local function spell5(cid)
addEvent(spell6, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
local function spell4(cid)
addEvent(spell5, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
local function spell3(cid)
addEvent(spell4, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
local function spell2(cid)
addEvent(spell3, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
local function spell1(cid)
addEvent(spell2, 1 * 2000, cid)
doSendAnimatedText(getThingPos(target), "Drain!", TEXTCOLOR_WHITE_EXP)
doSendAnimatedText(getPlayerPosition(cid), "Drain!", TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(cid,(25*getCreatureMaxMana(cid)/100))
return doCombat(cid, combat5, numberToVariant(target))
end
addEvent(spell1, 1 * 1000, cid)
return doCombat(cid, combat5, numberToVariant(target))
end
end
Link para o comentário
https://xtibia.com/forum/topic/249080-bug-spell-addevent-help/Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados