diff options
| author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-02-15 23:53:07 +0100 |
|---|---|---|
| committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-02-15 23:53:07 +0100 |
| commit | e9992c6c5fe44dd440a0bbe2d86a1f2909338efe (patch) | |
| tree | a2be7dc81c9d14fd45505c25480370f9ee9d1e94 /example/serverdata/scripts/maps | |
| parent | f8ad53ea03253d3c792a7c0df9384d63aee12e85 (diff) | |
| download | manaserv-e9992c6c5fe44dd440a0bbe2d86a1f2909338efe.tar.gz manaserv-e9992c6c5fe44dd440a0bbe2d86a1f2909338efe.tar.xz manaserv-e9992c6c5fe44dd440a0bbe2d86a1f2909338efe.zip | |
Added a merchant and a blacksmith on the template map.
They're both using a fully working merchant lua function.
Resolves: Mana-mantis #295.
Diffstat (limited to 'example/serverdata/scripts/maps')
| -rw-r--r-- | example/serverdata/scripts/maps/desert.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/example/serverdata/scripts/maps/desert.lua b/example/serverdata/scripts/maps/desert.lua index 710f552..812bfa6 100644 --- a/example/serverdata/scripts/maps/desert.lua +++ b/example/serverdata/scripts/maps/desert.lua @@ -15,13 +15,27 @@ require "scripts/lua/npclib" -- From example/serverdata/scripts require "scripts/npcs/banker" require "scripts/npcs/barber" +require "scripts/npcs/merchant" 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) + -- A simple banker create_npc("Banker", 8, 35 * TILESIZE + TILESIZE / 2, 24 * TILESIZE + TILESIZE / 2, Banker, nil) + + -- A simple merchant. + merchant_buy_table = { {1, 10, 20}, {2, 10, 30}, {3, 10, 50} } + merchant_sell_table = { {1, 10, 19}, {5, 10, 30}, {6, 10, 200}, {7, 10, 300} } + create_npc("Merchant", 3, 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 = { {5, 10, 50}, {7, 10, 70} } + create_npc("Smith", 5, 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) end) |
