diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-13 12:32:22 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-05-08 14:02:50 +0200 |
commit | 708896008ad8ea391d542ce37b9871318a84fb97 (patch) | |
tree | 30c862cb18d354f879ffb0b426d5ff133d2bde3b /example/scripts/abilities.lua | |
parent | e2b6a4efe72333ab0e0761f4e9e8ce9eb29a5335 (diff) | |
download | manaserv-708896008ad8ea391d542ce37b9871318a84fb97.tar.gz manaserv-708896008ad8ea391d542ce37b9871318a84fb97.tar.xz manaserv-708896008ad8ea391d542ce37b9871318a84fb97.zip |
[Abilities] Renamed specials to abilities
Diffstat (limited to 'example/scripts/abilities.lua')
-rw-r--r-- | example/scripts/abilities.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/example/scripts/abilities.lua b/example/scripts/abilities.lua new file mode 100644 index 0000000..35cc1d2 --- /dev/null +++ b/example/scripts/abilities.lua @@ -0,0 +1,22 @@ +--[[ + + Abilities script file + + This file allows you to implement your ability action system. The system can + for example implement magic, physical attack or also such mundane things as + showing emoticons over the characters heads. + +--]] + +local spell1 = get_ability_info("Magic_Test Spell 1") +spell1:on_use(function(user, x, y, abilityId) + target = target or user + target:say("Kaaame...Haaame... HAAAAAA!") + user:set_ability_mana(abilityId, 0) +end) +spell1:on_recharged(function(ch) ch:say("Hoooooooo...") end) + +local spell2 = get_ability_info(2) +spell2:on_use(function(user) user:say("HAA-DOKEN!") end) + +get_ability_info(3):on_use(function(user) user:say("Sonic BOOM") end) |