diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/items.xml | 2 | ||||
-rw-r--r-- | example/monsters.xml | 2 | ||||
-rw-r--r-- | example/scripts/items/candy.lua | 2 | ||||
-rw-r--r-- | example/scripts/monster/testmonster.lua | 4 | ||||
-rw-r--r-- | example/scripts/status/jump.lua | 2 | ||||
-rw-r--r-- | example/scripts/status/plague.lua | 2 | ||||
-rw-r--r-- | example/status-effects.xml | 2 |
7 files changed, 9 insertions, 7 deletions
diff --git a/example/items.xml b/example/items.xml index 18e3889e..730e5729 100644 --- a/example/items.xml +++ b/example/items.xml @@ -68,7 +68,7 @@ max-per-slot="30" value="15"> <effect trigger="activation"> - <script src="candy.lua" function="use" /> + <script src="candy.lua" function="use_candy" /> <consumes /> </effect> </item> diff --git a/example/monsters.xml b/example/monsters.xml index ba882cc8..f0361915 100644 --- a/example/monsters.xml +++ b/example/monsters.xml @@ -78,7 +78,7 @@ exp<TAG>: Tells how much experience point a monster is giving up damage-factor="1" range="32" animation="attack" - script-function="strike" + script-function="on_maggot_strike" /> <script>testmonster.lua</script> <!-- only Proof of Concept--> </monster> diff --git a/example/scripts/items/candy.lua b/example/scripts/items/candy.lua index a740ce6a..5ab7c9a4 100644 --- a/example/scripts/items/candy.lua +++ b/example/scripts/items/candy.lua @@ -12,6 +12,6 @@ -- under the terms of the GNU General Public License as published by the Free -- -- Software Foundation; either version 2 of the License, or any later version. -- ---------------------------------------------------------------------------------- -function use(user) +function use_candy(user) mana.being_say(user, "*munch*munch*munch*") end diff --git a/example/scripts/monster/testmonster.lua b/example/scripts/monster/testmonster.lua index 9938943b..fa094a8d 100644 --- a/example/scripts/monster/testmonster.lua +++ b/example/scripts/monster/testmonster.lua @@ -8,14 +8,14 @@ -- Software Foundation; either version 2 of the License, or any later version. -- ---------------------------------------------------------------------------------- -function update(mob) +function update_monster(mob) local r = math.random(0, 200); if r == 0 then mana.being_say(mob, "Roar! I am a boss") end end -function strike(mob, victim, hit) +function on_maggot_strike(mob, victim, hit) if hit > 0 then mana.being_say(mob, "Take this! "..hit.." damage!") mana.being_say(victim, "Oh Noez!") diff --git a/example/scripts/status/jump.lua b/example/scripts/status/jump.lua index 3410747a..10ad9288 100644 --- a/example/scripts/status/jump.lua +++ b/example/scripts/status/jump.lua @@ -12,7 +12,7 @@ ---------------------------------------------------------------------------------- -function tick(target, ticknumber) +function tick_jump(target, ticknumber) if (ticknumber % 10 == 0) then mana.being_say(target, "I have the jumping bug!") end diff --git a/example/scripts/status/plague.lua b/example/scripts/status/plague.lua index 5f98268e..5f33eb87 100644 --- a/example/scripts/status/plague.lua +++ b/example/scripts/status/plague.lua @@ -12,7 +12,7 @@ -- Software Foundation; either version 2 of the License, or any later version. -- ---------------------------------------------------------------------------------- -function tick(target, ticknumber) +function tick_plague(target, ticknumber) if (ticknumber % 10 == 0) then mana.being_say(target, "I have the plague! :( = " .. ticknumber) end diff --git a/example/status-effects.xml b/example/status-effects.xml index 7b613c4f..fda90836 100644 --- a/example/status-effects.xml +++ b/example/status-effects.xml @@ -5,11 +5,13 @@ persistent-particle-effect="true" start-particle="graphics/particles/green-bubbles.particle.xml" script="plague.lua" + tick-function="tick_plague" /> <status-effect name="Jumping Status" id="2" icon="icons/icon-feather.xml" persistent-particle-effect="true" start-particle="graphics/particles/magic.white.xml" script="jump.lua" + tick-function="tick_jump" /> </status-effects> |