diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2011-12-27 05:59:55 +0800 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-01-02 19:59:31 +0800 |
commit | e4a7536e7ca14dcc257d60f8562a9dab61c4fd34 (patch) | |
tree | f4f1e8630b1fc15cf2bc9bfd13f25a69bb4c99cc /example/serverdata | |
parent | 646fb10397e440ab67fb5a678bf034c53b050109 (diff) | |
download | manaserv-e4a7536e7ca14dcc257d60f8562a9dab61c4fd34.tar.gz manaserv-e4a7536e7ca14dcc257d60f8562a9dab61c4fd34.tar.bz2 manaserv-e4a7536e7ca14dcc257d60f8562a9dab61c4fd34.tar.xz manaserv-e4a7536e7ca14dcc257d60f8562a9dab61c4fd34.zip |
Made all beings capable of having a gender
Reviewed-by: o11c, bjorn, Bertram.
Diffstat (limited to 'example/serverdata')
-rw-r--r-- | example/serverdata/scripts/maps/desert.lua | 14 | ||||
-rw-r--r-- | example/serverdata/scripts/npcs/banker.lua | 4 | ||||
-rw-r--r-- | example/serverdata/scripts/npcs/merchant.lua | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/example/serverdata/scripts/maps/desert.lua b/example/serverdata/scripts/maps/desert.lua index 753375ba..8b7da1f8 100644 --- a/example/serverdata/scripts/maps/desert.lua +++ b/example/serverdata/scripts/maps/desert.lua @@ -21,26 +21,26 @@ require "scripts/npcs/shaker" atinit(function() -- Barber examples - create_npc("Barber Twin", 1, 14 * TILESIZE + TILESIZE / 2, 9 * TILESIZE + TILESIZE / 2, Barber, nil) - create_npc("Barber Twin", 1, 20 * TILESIZE + TILESIZE / 2, 11 * TILESIZE + TILESIZE / 2, npclib.talk(Barber, {14, 15, 16}, {}), nil) + create_npc("Barber Twin", 1, GENDER_MALE, 14 * TILESIZE + TILESIZE / 2, 9 * TILESIZE + TILESIZE / 2, Barber, nil) + create_npc("Barber Twin", 1, GENDER_MALE, 20 * TILESIZE + TILESIZE / 2, 11 * TILESIZE + TILESIZE / 2, npclib.talk(Barber, {14, 15, 16}, {}), nil) -- A simple banker - create_npc("Banker", 8, 35 * TILESIZE + TILESIZE / 2, 24 * TILESIZE + TILESIZE / 2, Banker, nil) + create_npc("Banker", 8, GENDER_MALE, 35 * TILESIZE + TILESIZE / 2, 24 * TILESIZE + TILESIZE / 2, Banker, nil) -- A simple merchant. merchant_buy_table = { {"Candy", 10, 20}, {"Regenerative trinket", 10, 30}, {"Minor health potion", 10, 50}, {11, 10, 60}, {12, 10, 40} } merchant_sell_table = { {"Candy", 10, 19}, {"Sword", 10, 30}, {"Bow", 10, 200}, {"Leather shirt", 10, 300} } - create_npc("Merchant", 3, 4 * TILESIZE + TILESIZE / 2, 16 * TILESIZE + TILESIZE / 2, npclib.talk(Merchant, merchant_buy_table, merchant_sell_table), nil) + create_npc("Merchant", 3, GENDER_MALE, 4 * TILESIZE + TILESIZE / 2, 16 * TILESIZE + TILESIZE / 2, npclib.talk(Merchant, merchant_buy_table, merchant_sell_table), nil) -- Another Merchant, selling some equipment, and buying everything... smith_buy_table = { {"Sword", 10, 50}, {7, 10, 70}, {10, 10, 20} } - create_npc("Smith", 5, 15 * TILESIZE + TILESIZE / 2, 16 * TILESIZE + TILESIZE / 2, npclib.talk(Merchant, smith_buy_table), nil) + create_npc("Smith", 5, GENDER_MALE, 15 * TILESIZE + TILESIZE / 2, 16 * TILESIZE + TILESIZE / 2, npclib.talk(Merchant, smith_buy_table), nil) -- The most simple NPC - Welcoming new ones around. - create_npc("Harmony", 11, 4 * TILESIZE + TILESIZE / 2, 25 * TILESIZE + TILESIZE / 2, npclib.talk(Harmony, "Welcome in the template world!\nI hope you'll find here whatever you were searching for.", "Do look around to find some interesting things coming along!"), Harmony_update) + create_npc("Harmony", 11, GENDER_FEMALE, 4 * TILESIZE + TILESIZE / 2, 25 * TILESIZE + TILESIZE / 2, npclib.talk(Harmony, "Welcome in the template world!\nI hope you'll find here whatever you were searching for.", "Do look around to find some interesting things coming along!"), Harmony_update) -- Creates a Monster an let it talk for testing purpose. - create_npc("Tamer", 9, 28 * TILESIZE + TILESIZE / 2, 21 * TILESIZE + TILESIZE / 2, Tamer, nil) + create_npc("Tamer", 9, GENDER_UNSPECIFIED, 28 * TILESIZE + TILESIZE / 2, 21 * TILESIZE + TILESIZE / 2, Tamer, nil) end) -- Global variable used to know whether Harmony talked to someone. diff --git a/example/serverdata/scripts/npcs/banker.lua b/example/serverdata/scripts/npcs/banker.lua index 7a6e6b40..4e048653 100644 --- a/example/serverdata/scripts/npcs/banker.lua +++ b/example/serverdata/scripts/npcs/banker.lua @@ -11,9 +11,9 @@ ---------------------------------------------------------------------------------- function Banker(npc, ch) - if mana.chr_get_gender(ch) == GENDER_MALE then + if mana.being_get_gender(ch) == GENDER_MALE then do_message(npc, ch, "Welcome to the bank, sir!") - elseif mana.chr_get_gender(ch) == GENDER_FEMALE then + elseif mana.being_get_gender(ch) == GENDER_FEMALE then do_message(npc, ch, "Welcome to the bank, madam!") else do_message(npc, ch, "Welcome to the bank... uhm... person of unspecified gender!") diff --git a/example/serverdata/scripts/npcs/merchant.lua b/example/serverdata/scripts/npcs/merchant.lua index 3b80298b..34f309ec 100644 --- a/example/serverdata/scripts/npcs/merchant.lua +++ b/example/serverdata/scripts/npcs/merchant.lua @@ -29,7 +29,7 @@ function Merchant(npc, ch, buy_sell_table) elseif (rights >= 2) then do_message(npc, ch, "How can I assist you in your testing duties?") elseif (rights >= 1) then - if mana.chr_get_gender(ch) == GENDER_FEMALE then + if mana.being_get_gender(ch) == GENDER_FEMALE then do_message(npc, ch, "What do you want, Madam?") else do_message(npc, ch, "Wat do you want, Sir?") |