- Joined
- Nov 15, 2007
- Messages
- 854
- Solutions
- 10
- Reaction score
- 389
- Location
- Santiago, Chile (Australian)
Hey guys,
Has anyone written the summon creature spell in LUA?
I'm hoping to use a custom implementation of summon creature on a little project I'm toying with.
I have not touched Tibia in awhile and I never really looked into spells, but this is what I put together just now (it doesn't work).
Any help would be greatly appreciated
Thanks guys,
Michael
Has anyone written the summon creature spell in LUA?
I'm hoping to use a custom implementation of summon creature on a little project I'm toying with.
I have not touched Tibia in awhile and I never really looked into spells, but this is what I put together just now (it doesn't work).
Code:
function onCastSpell(player, var)
local orig = player:getPosition()
local creatureId = doSummonCreature(var, orig)
if creatureId ~= false then
local monster = Monster(creatureId)
monster:setMaster(player)
orig:sendMagicEffect(CONST_ME_MAGIC_RED)
end
end
Any help would be greatly appreciated
Thanks guys,
Michael