Kouki
Member
- Joined
- Feb 5, 2016
- Messages
- 67
- Solutions
- 4
- Reaction score
- 13
Hello, i try to do "Summon Emberwing Spell"
I find code here: Lua - Summon floorchange (https://otland.net/threads/summon-floorchange.250838/)
but when i use this spell on normal char i got client crash, on god char i can use it.
Someone know why i got this?
I find code here: Lua - Summon floorchange (https://otland.net/threads/summon-floorchange.250838/)
but when i use this spell on normal char i got client crash, on god char i can use it.
Someone know why i got this?
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 maxsumons = 1
function onCastSpell(creature, variant)
local summoncount = #creature:getSummons()
if summoncount < 1 then
for i = 1, maxsumons - summoncount do
local summon = Game.createMonster("Emberwing", creature:getPosition())
if summon ~= nil then
summon:setMaster(creature)
end
end
end
return combat:execute(creature, variant)
end
Last edited: