summaryrefslogtreecommitdiffstats
path: root/example/scripts/npcs/healer.lua
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-14 15:10:06 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-14 15:10:06 +0200
commit080ddbe822b03416934a875b2d949e3afc84fb96 (patch)
tree8915d1c92fdd0e609952afc492cbc3ea1152d1ae /example/scripts/npcs/healer.lua
parent3a132996f798dbf552ac858b06fa656b6790a501 (diff)
downloadmanaserv-080ddbe822b03416934a875b2d949e3afc84fb96.tar.gz
manaserv-080ddbe822b03416934a875b2d949e3afc84fb96.tar.xz
manaserv-080ddbe822b03416934a875b2d949e3afc84fb96.zip
Removed NPC and character parameters from NPC functions
These functions can only be used in the context of a character talking to an NPC, so these parameters can be deduced from that context rather than passing them explicitly all the time. Simplifies NPC scripting.
Diffstat (limited to 'example/scripts/npcs/healer.lua')
-rw-r--r--example/scripts/npcs/healer.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/scripts/npcs/healer.lua b/example/scripts/npcs/healer.lua
index 3569673..910e221 100644
--- a/example/scripts/npcs/healer.lua
+++ b/example/scripts/npcs/healer.lua
@@ -5,8 +5,8 @@
--]]
function Healer(npc, ch)
- npc_message(npc, ch, "Do you need healing?")
- local c = npc_choice(npc, ch, "Heal me fully", "Heal 100 HP", "Don't heal me")
+ npc_message("Do you need healing?")
+ local c = npc_choice("Heal me fully", "Heal 100 HP", "Don't heal me")
if c == 1 then
being_heal(ch)
elseif c == 2 then