Moj mistrz
Monster Creator
Hello, I have problem with that spell
Basically I want that spell to deal damage at first(obvious) cuz it isn't making any and spell should follow its caster, that spell shouldn't be casted twice in a row(well it can be casted but without spell effect), so message should appear everytime it is casted, but if casted twice or more within 4 seconds it should send beam effect only once(last cast should work here). Hope you get what I mean.
Second problem or question(?).
Is it possible to 'convert' that moveevent to creaturescript or make it like that so it wont affect firefield moveevent?
This is fire field event:
and I tried this:
But by both lines fire field doesn't make any damage(not working at all), but the moveevent works perfectly.
I would appreciate any help. Thanks and I hope I posted in right board.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
arr1 = {
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{3}
}
arr2 = {
{3, 1, 1, 1, 1, 1, 1, 1, 1, 1}
}
arr3 = {
{3},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1}
}
arr4 = {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 3}
}
if getPlayerLookDir(cid) == 0 then
local area1 = createCombatArea(arr1)
setCombatArea(combat, area1)
elseif getPlayerLookDir(cid) == 1 then
local area2 = createCombatArea(arr2)
setCombatArea(combat, area2)
elseif getPlayerLookDir(cid) == 2 then
local area3 = createCombatArea(arr3)
setCombatArea(combat, area3)
elseif getPlayerLookDir(cid) == 3 then
local area4 = createCombatArea(arr4)
setCombatArea(combat, area4)
end
local function delayedCastSpell(cid, var)
if isCreature(cid) == true then
doCombat(cid, combat, numberToVariant(cid))
doCreatureSay(cid, "OMRAFIR BREATHES INFERNAL FIRE", TALKTYPE_ORANGE_2)
end
end
function onCastSpell(cid, var)
doCreatureSay(cid, "OMRAFIR INHALES DEEPLY!", TALKTYPE_ORANGE_2)
addEvent(delayedCastSpell, 4000, cid, var)
return true
end
Second problem or question(?).
Is it possible to 'convert' that moveevent to creaturescript or make it like that so it wont affect firefield moveevent?
Code:
function onStepIn(cid, item, position, fromPosition)
local health = math.random(7500, 9000)
local chance = math.random(1, 100)
local hp = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100
if isMonster(cid) == true and getCreatureName(cid) == "Omrafir" and (chance < 40) and (hp < 99) then
doCreatureAddHealth(cid, health)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doCreatureSay(cid, "Omrafir gains new strength from the fire", TALKTYPE_ORANGE_1)
end
return true
end
Code:
<movevent event="StepIn" itemid="1487" function="onStepInField"/>
Code:
<movevent event="StepIn" itemid="1487" function="onStepInField" script="monster heal.lua"/>
<movevent event="StepIn" itemid="1487" script="monster heal.lua"/>
I would appreciate any help. Thanks and I hope I posted in right board.