summaryrefslogtreecommitdiff
path: root/example/serverdata
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-01-27 01:31:17 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-01-27 01:31:17 +0100
commit0b10fd63ad74a5c1fad4e1cc59e2b623e7049e44 (patch)
tree98e1839741f977d0fbcf1ec558359c0427728a01 /example/serverdata
parentf8cde72ad21ea16f129203a5740db02da7a24f0a (diff)
downloadmanaserv-0b10fd63ad74a5c1fad4e1cc59e2b623e7049e44.tar.gz
manaserv-0b10fd63ad74a5c1fad4e1cc59e2b623e7049e44.tar.bz2
manaserv-0b10fd63ad74a5c1fad4e1cc59e2b623e7049e44.tar.xz
manaserv-0b10fd63ad74a5c1fad4e1cc59e2b623e7049e44.zip
Updates to the example data.
- Fixed monsters Id. - Added collision layer to the desert map. - Added a few simple NPCs on the map (They still need a sprite.) - Added player and hairstyles sprites files and definition in items.xml.
Diffstat (limited to 'example/serverdata')
-rw-r--r--example/serverdata/scripts/maps/desert.lua32
-rw-r--r--example/serverdata/scripts/npcs/barber.lua4
2 files changed, 34 insertions, 2 deletions
diff --git a/example/serverdata/scripts/maps/desert.lua b/example/serverdata/scripts/maps/desert.lua
new file mode 100644
index 00000000..6491b8ca
--- /dev/null
+++ b/example/serverdata/scripts/maps/desert.lua
@@ -0,0 +1,32 @@
+----------------------------------------------------------
+-- Tulimshar Bazaar --
+----------------------------------------------------------------------------------
+-- Copyright 2008 The Mana World Development Team --
+-- --
+-- This file is part of The Mana World. --
+-- --
+-- The Mana World is free software; you can redistribute it and/or modify it --
+-- 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. --
+----------------------------------------------------------------------------------
+
+-- From scripts/
+require "scripts/lua/npclib"
+-- From example/serverdata/scripts
+require "scripts/npcs/banker"
+require "scripts/npcs/barber"
+
+atinit(function()
+ create_npc("Barber", 100, 14 * TILESIZE + TILESIZE / 2, 9 * TILESIZE + TILESIZE / 2, Barber, nil)
+ create_npc("Barber 2", 100, 20 * TILESIZE + TILESIZE / 2, 11 * TILESIZE + TILESIZE / 2, npclib.talk(Barber, {14, 15, 16}, {}), nil)
+ create_npc("Banker", 149, 35 * TILESIZE + TILESIZE / 2, 24 * TILESIZE + TILESIZE / 2, Banker, nil)
+
+ create_npc("Test", 102, 4 * TILESIZE + TILESIZE / 2, 25 * TILESIZE + TILESIZE / 2, npclib.talk(Test, "String1", "String2", "String3", "Etc"), nil)
+end)
+
+function Test(npc, ch, list)
+ for i = 1, #list do
+ do_message(npc, ch, list[i])
+ end
+ do_npc_close(npc, ch)
+end
diff --git a/example/serverdata/scripts/npcs/barber.lua b/example/serverdata/scripts/npcs/barber.lua
index 24ad8c9b..bf872a0c 100644
--- a/example/serverdata/scripts/npcs/barber.lua
+++ b/example/serverdata/scripts/npcs/barber.lua
@@ -92,7 +92,7 @@ function Barber(npc, ch, data)
-- Repeat until the user selects nothing
repeat
if (result == 1) then -- Do styles
- result = do_choice(npc, ch, "Bald", styles, "Supprise me", "Never mind")
+ result = do_choice(npc, ch, "Bald", styles, "Surprise me", "Never mind")
result = result -1
@@ -114,7 +114,7 @@ function Barber(npc, ch, data)
result = 3
end
elseif (result == 2) then -- Do colors
- result = do_choice(npc, ch, colors, "Supprise me", "Never mind")
+ result = do_choice(npc, ch, colors, "Surprise me", "Never mind")
--Random
if (result == #colors + 1) then