diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-05-03 12:56:16 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-05-03 12:56:29 +0200 |
commit | eb9fdd6852fced4ca9125b93585b95eb319dce18 (patch) | |
tree | 840aab10aedcdb1f67064310995d1f767e0b6a5e /example/scripts/maps | |
parent | 0261eb73e5588f5732aef5df753311d488c45d06 (diff) | |
download | manaserv-eb9fdd6852fced4ca9125b93585b95eb319dce18.tar.gz manaserv-eb9fdd6852fced4ca9125b93585b95eb319dce18.tar.bz2 manaserv-eb9fdd6852fced4ca9125b93585b95eb319dce18.tar.xz manaserv-eb9fdd6852fced4ca9125b93585b95eb319dce18.zip |
Made member function tables available as a globals
This way the scripts can add or replace existing member functions, which
can be useful. As demonstration chr_money and chr_money_change are now
added as Entity.money and Entity.change_money.
Also fixed the banker to use ask_number instead of ask_integer (I had
decided to rename this and apparently forgot the banker).
Mantis-issue: 503
Reviewed-by: Ablu
Diffstat (limited to 'example/scripts/maps')
-rw-r--r-- | example/scripts/maps/desert.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/scripts/maps/desert.lua b/example/scripts/maps/desert.lua index 759dbb51..5f7f2d28 100644 --- a/example/scripts/maps/desert.lua +++ b/example/scripts/maps/desert.lua @@ -79,8 +79,8 @@ function Harmony(npc, ch, list) --- Give the player 100 units of money the first time. if harmony_have_talked_to_someone == false then say("Here is some money for you to find some toys to play with.\nEh Eh!") - chr_money_change(ch, 100) - say(string.format("You now have %d shiny coins!", chr_money(ch))) + ch:change_money(100) + say(string.format("You now have %d shiny coins!", ch:money())) harmony_have_talked_to_someone = true say(string.format("Try to come back with a better level than %i.", ch:level())) else |