lukatxd
Well-Known Member
- Joined
- Dec 9, 2010
- Messages
- 139
- Solutions
- 1
- Reaction score
- 63
Is there a way -preferably without source edit- that I can cast an spell X and call the spell Y script? Almost like the pokemon servers and stuff, but using my own character.
I'm building my server around the idea of piloting robots, and each robot has a specific set of spells, but I would like that I could just "cast a spell" by calling a command like "command1" and then look through a table of spells available for that robot and use it.
That way players dont need to keep adjusting their hotkeys all the time, because weapons will also make players learn spells
I'm building my server around the idea of piloting robots, and each robot has a specific set of spells, but I would like that I could just "cast a spell" by calling a command like "command1" and then look through a table of spells available for that robot and use it.
That way players dont need to keep adjusting their hotkeys all the time, because weapons will also make players learn spells
LUA:
function onCastSpell(creature, variant)
local player = Player(creature:getId())
local vocationId = player:getVocation()
-- instead of this
local spellCombat = VOCATION_COMMANDS_TABLE[vocationId][1]
return spellCombat:execute(creature,variant)
-- instead of the above use something like this
return -cast exori_frigo.lua
end
Last edited: