<instant name="demon summon" words="utevo demon" exhaustion="2000" selftarget="1" enabled="0" needlearn="0" script="monster/demon.lua"/>
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_NONE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)
local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)
local maxsumons = 2
function onCastSpell(cid, var)
local summoncount = getCreatureSummons(cid)
if #summoncount < 2 then
for i = 1, maxsumons - #summoncount do
doSummonMonster(cid, "Demon")
end
end
return doCombat(cid, combat, var)
end
<instant group="1" spellid="141" name="summon demon" words="utevo demon" lvl="1" mana="0" prem="0" exhaustion="1000" needlearn="0" script="summon demon.lua"/>
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
if #player:getSummons() >= 1 then
player:sendCancelMessage("You have too many summons.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
local demon = Game.createMonster("Demon", player:getPosition(), true)
player:getPosition():sendDistanceEffect(demon:getPosition(), CONST_ANI_FIRE)
demon:getPosition():sendMagicEffect(CONST_ME_FIREAREA)
demon:setMaster(player)
return true
end
he uses 1.2 but didnt say
XML:<instant group="1" spellid="141" name="summon demon" words="utevo demon" lvl="1" mana="0" prem="0" exhaustion="1000" needlearn="0" script="summon demon.lua"/>LUA:function onCastSpell(creature, variant) local player = creature:getPlayer() if not player then return false end if #player:getSummons() >= 1 then player:sendCancelMessage("You have too many summons.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end local demon = Game.createMonster("Demon", player:getPosition(), true) player:getPosition():sendDistanceEffect(demon:getPosition(), CONST_ANI_FIRE) demon:getPosition():sendMagicEffect(CONST_ME_FIREAREA) demon:setMaster(player) return true end
it should already be a summon though o.osorry if i not explained myself,
but it summons a monster heheh almost killed me, the demon will be a summon from the player o.o
is that possible?
it should already be a summon though o.o
demon:setMaster(player) <---
function onCastSpell(creature, variant)
local player = creature:getPlayer()
if not player then
return false
end
if #player:getSummons() >= 1 then
player:sendCancelMessage("You have too many summons.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
local demon = Game.createMonster("Demon", player:getPosition(), true)
player:getPosition():sendDistanceEffect(demon:getPosition(), CONST_ANI_FIRE)
demon:getPosition():sendMagicEffect(CONST_ME_FIREAREA)
demon:setMaster(player)
demon:addFriend(player)
return true
end
try this out instead, added demon:addFriend(player)LUA:function onCastSpell(creature, variant) local player = creature:getPlayer() if not player then return false end if #player:getSummons() >= 1 then player:sendCancelMessage("You have too many summons.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end local demon = Game.createMonster("Demon", player:getPosition(), true) player:getPosition():sendDistanceEffect(demon:getPosition(), CONST_ANI_FIRE) demon:getPosition():sendMagicEffect(CONST_ME_FIREAREA) demon:setMaster(player) demon:addFriend(player) return true end
should work
does it actually full on attack you? like target you and everythingstill the same :s
And then everyone can use convince runes on Demons.You have to make the monster convinceable:
forgottenserver/demon.xml at 57e4425b25b656a8422057febac8e1f44324eb03 · otland/forgottenserver · GitHub
or make convince runes not work on demons.And then everyone can use convince runes on Demons.
The right way is editing source, the hacky way is to do another monster that is exactly like Demon but convinceable.
Yea, that means you have to edit the source...or make convince runes not work on demons.