summaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-25 23:35:25 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-25 23:35:25 +0200
commitec99e999a918f6680d38704d9408933090d0386a (patch)
tree89e2361ccc9da7d88c10cc0967e9898d9cdab0a6 /example
parentf2368c9887e8b97b76e459a5088ed52bb5ee4512 (diff)
parenta4d0b4d6e0360f09b1f01ec59f548cdb297ebd4c (diff)
downloadmanaserv-ec99e999a918f6680d38704d9408933090d0386a.tar.gz
manaserv-ec99e999a918f6680d38704d9408933090d0386a.tar.xz
manaserv-ec99e999a918f6680d38704d9408933090d0386a.zip
Merge branch 'equipment-fix' of github.com:Bertram25/manaserv
Diffstat (limited to 'example')
-rw-r--r--example/clientdata/equip.xml25
-rw-r--r--example/clientdata/graphics/items/equipment/feet/boots.pngbin0 -> 333 bytes
-rw-r--r--example/clientdata/graphics/items/equipment/legs/pants.pngbin0 -> 855 bytes
-rw-r--r--example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.pngbin0 -> 582 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/feet/boots-female.pngbin0 -> 8734 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/feet/boots-female.xml8
-rw-r--r--example/clientdata/graphics/sprites/equipment/feet/boots-male.pngbin0 -> 8662 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/feet/boots-male.xml104
-rw-r--r--example/clientdata/graphics/sprites/equipment/legs/pants-female.pngbin0 -> 19817 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/legs/pants-female.xml104
-rw-r--r--example/clientdata/graphics/sprites/equipment/legs/pants-male.pngbin0 -> 55222 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/legs/pants-male.xml104
-rw-r--r--example/clientdata/graphics/sprites/weapons/weapon-dagger.xml27
-rw-r--r--example/clientdata/items.xml51
-rw-r--r--example/serverdata/scripts/maps/desert.lua4
15 files changed, 415 insertions, 12 deletions
diff --git a/example/clientdata/equip.xml b/example/clientdata/equip.xml
index 0d1c1d3..be180a0 100644
--- a/example/clientdata/equip.xml
+++ b/example/clientdata/equip.xml
@@ -1,12 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Notes:
+ The id and name parameters must be unique.
+ The count parameter indicates the 'size' of the slot.
+ The visible parameter indicates whether the item is visible
+ on the map character. Hence, whether the server should send appearance
+ updates when making changes on it.
+-->
<equip-slots>
- <slot name="hand" count="2" visible="true" />
- <slot name="torso" count="1" visible="true" />
- <slot name="arms" count="1" />
- <slot name="head" count="1" visible="true" />
- <slot name="legs" count="1" visible="true" />
- <slot name="ring" count="1" />
- <slot name="necklace" count="1" />
- <slot name="feet" count="1" />
- <slot name="ammo" count="1" />
+ <slot id="1" name="Hand" capacity="2" visible="true" weapon="true" />
+ <slot id="2" name="Torso" capacity="1" visible="true" />
+ <slot id="3" name="Arms" capacity="1" />
+ <slot id="4" name="Head" capacity="1" visible="true" />
+ <slot id="5" name="Legs" capacity="1" visible="true" />
+ <slot id="6" name="Ring" capacity="1" />
+ <slot id="7" name="Necklace" capacity="1" />
+ <slot id="8" name="Feet" capacity="1" visible="true" />
+ <slot id="9" name="Ammo" capacity="1" ammo="true" />
</equip-slots>
diff --git a/example/clientdata/graphics/items/equipment/feet/boots.png b/example/clientdata/graphics/items/equipment/feet/boots.png
new file mode 100644
index 0000000..9f9913f
--- /dev/null
+++ b/example/clientdata/graphics/items/equipment/feet/boots.png
Binary files differ
diff --git a/example/clientdata/graphics/items/equipment/legs/pants.png b/example/clientdata/graphics/items/equipment/legs/pants.png
new file mode 100644
index 0000000..c50daf2
--- /dev/null
+++ b/example/clientdata/graphics/items/equipment/legs/pants.png
Binary files differ
diff --git a/example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png b/example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png
new file mode 100644
index 0000000..cdfc370
--- /dev/null
+++ b/example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/feet/boots-female.png b/example/clientdata/graphics/sprites/equipment/feet/boots-female.png
new file mode 100644
index 0000000..ba98432
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/feet/boots-female.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/feet/boots-female.xml b/example/clientdata/graphics/sprites/equipment/feet/boots-female.xml
new file mode 100644
index 0000000..4bb2fff
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/feet/boots-female.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+
+ <imageset name="base" src="graphics/sprites/equipment/feet/boots-female.png|W" width="64" height="64" />
+
+ <include file="equipment/feet/boots-male.xml"/>
+
+</sprite>
diff --git a/example/clientdata/graphics/sprites/equipment/feet/boots-male.png b/example/clientdata/graphics/sprites/equipment/feet/boots-male.png
new file mode 100644
index 0000000..f441c5b
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/feet/boots-male.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/feet/boots-male.xml b/example/clientdata/graphics/sprites/equipment/feet/boots-male.xml
new file mode 100644
index 0000000..7edbcef
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/feet/boots-male.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+
+ <imageset name="base" src="graphics/sprites/equipment/feet/boots-male.png|W" width="64" height="64" />
+
+ <action name="stand" imageset="base">
+ <animation direction="down">
+ <frame index="0" />
+ </animation>
+ <animation direction="left">
+ <frame index="18" />
+ </animation>
+ <animation direction="up">
+ <frame index="36" />
+ </animation>
+ <animation direction="right">
+ <frame index="54" />
+ </animation>
+ </action>
+
+ <action name="walk" imageset="base">
+ <animation direction="down">
+ <sequence start="1" end="6" delay="75" />
+ </animation>
+ <animation direction="left">
+ <sequence start="19" end="24" delay="75" />
+ </animation>
+ <animation direction="up">
+ <sequence start="37" end="42" delay="75" />
+ </animation>
+ <animation direction="right">
+ <sequence start="55" end="60" delay="75" />
+ </animation>
+ </action>
+
+ <action name="sit" imageset="base">
+ <animation direction="down">
+ <frame index="7" />
+ </animation>
+ <animation direction="left">
+ <frame index="25" />
+ </animation>
+ <animation direction="up">
+ <frame index="43" />
+ </animation>
+ <animation direction="right">
+ <frame index="61" />
+ </animation>
+ </action>
+
+ <action name="dead" imageset="base">
+ <animation direction="down">
+ <frame index="8" />
+ </animation>
+ <animation direction="left">
+ <frame index="26" />
+ </animation>
+ <animation direction="up">
+ <frame index="44" />
+ </animation>
+ <animation direction="right">
+ <frame index="62" />
+ </animation>
+ </action>
+
+ <action name="attack" imageset="base">
+ <animation direction="down">
+ <sequence start="9" end="12" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="27" end="30" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="45" end="48" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="63" end="66" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+ <action name="attack_bow" imageset="base">
+ <animation direction="down">
+ <sequence start="13" end="17" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="31" end="35" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="49" end="53" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="67" end="71" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+</sprite>
diff --git a/example/clientdata/graphics/sprites/equipment/legs/pants-female.png b/example/clientdata/graphics/sprites/equipment/legs/pants-female.png
new file mode 100644
index 0000000..ad8c2e0
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/legs/pants-female.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/legs/pants-female.xml b/example/clientdata/graphics/sprites/equipment/legs/pants-female.xml
new file mode 100644
index 0000000..4f5dbcd
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/legs/pants-female.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+
+ <imageset name="base" src="graphics/sprites/equipment/legs/pants-female.png" width="64" height="64" />
+
+ <action name="stand" imageset="base">
+ <animation direction="down">
+ <frame index="0" />
+ </animation>
+ <animation direction="left">
+ <frame index="18" />
+ </animation>
+ <animation direction="up">
+ <frame index="36" />
+ </animation>
+ <animation direction="right">
+ <frame index="54" />
+ </animation>
+ </action>
+
+ <action name="walk" imageset="base">
+ <animation direction="down">
+ <sequence start="1" end="6" delay="75" />
+ </animation>
+ <animation direction="left">
+ <sequence start="19" end="24" delay="75" />
+ </animation>
+ <animation direction="up">
+ <sequence start="37" end="42" delay="75" />
+ </animation>
+ <animation direction="right">
+ <sequence start="55" end="60" delay="75" />
+ </animation>
+ </action>
+
+ <action name="sit" imageset="base">
+ <animation direction="down">
+ <frame index="7" />
+ </animation>
+ <animation direction="left">
+ <frame index="25" />
+ </animation>
+ <animation direction="up">
+ <frame index="43" />
+ </animation>
+ <animation direction="right">
+ <frame index="61" />
+ </animation>
+ </action>
+
+ <action name="dead" imageset="base">
+ <animation direction="down">
+ <frame index="8" />
+ </animation>
+ <animation direction="left">
+ <frame index="26" />
+ </animation>
+ <animation direction="up">
+ <frame index="44" />
+ </animation>
+ <animation direction="right">
+ <frame index="62" />
+ </animation>
+ </action>
+
+ <action name="attack" imageset="base">
+ <animation direction="down">
+ <sequence start="9" end="12" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="27" end="30" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="45" end="48" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="63" end="66" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+ <action name="attack_bow" imageset="base">
+ <animation direction="down">
+ <sequence start="13" end="17" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="31" end="35" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="49" end="53" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="67" end="71" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+</sprite>
diff --git a/example/clientdata/graphics/sprites/equipment/legs/pants-male.png b/example/clientdata/graphics/sprites/equipment/legs/pants-male.png
new file mode 100644
index 0000000..f841575
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/legs/pants-male.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/legs/pants-male.xml b/example/clientdata/graphics/sprites/equipment/legs/pants-male.xml
new file mode 100644
index 0000000..3a90c6a
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/legs/pants-male.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+
+ <imageset name="base" src="graphics/sprites/equipment/legs/pants-male.png" width="64" height="64" />
+
+ <action name="stand" imageset="base">
+ <animation direction="down">
+ <frame index="0" />
+ </animation>
+ <animation direction="left">
+ <frame index="18" />
+ </animation>
+ <animation direction="up">
+ <frame index="36" />
+ </animation>
+ <animation direction="right">
+ <frame index="54" />
+ </animation>
+ </action>
+
+ <action name="walk" imageset="base">
+ <animation direction="down">
+ <sequence start="1" end="6" delay="75" />
+ </animation>
+ <animation direction="left">
+ <sequence start="19" end="24" delay="75" />
+ </animation>
+ <animation direction="up">
+ <sequence start="37" end="42" delay="75" />
+ </animation>
+ <animation direction="right">
+ <sequence start="55" end="60" delay="75" />
+ </animation>
+ </action>
+
+ <action name="sit" imageset="base">
+ <animation direction="down">
+ <frame index="7" />
+ </animation>
+ <animation direction="left">
+ <frame index="25" />
+ </animation>
+ <animation direction="up">
+ <frame index="43" />
+ </animation>
+ <animation direction="right">
+ <frame index="61" />
+ </animation>
+ </action>
+
+ <action name="dead" imageset="base">
+ <animation direction="down">
+ <frame index="8" />
+ </animation>
+ <animation direction="left">
+ <frame index="26" />
+ </animation>
+ <animation direction="up">
+ <frame index="44" />
+ </animation>
+ <animation direction="right">
+ <frame index="62" />
+ </animation>
+ </action>
+
+ <action name="attack" imageset="base">
+ <animation direction="down">
+ <sequence start="9" end="12" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="27" end="30" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="45" end="48" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="63" end="66" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+ <action name="attack_bow" imageset="base">
+ <animation direction="down">
+ <sequence start="13" end="17" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="31" end="35" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="49" end="53" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="67" end="71" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+</sprite>
diff --git a/example/clientdata/graphics/sprites/weapons/weapon-dagger.xml b/example/clientdata/graphics/sprites/weapons/weapon-dagger.xml
new file mode 100644
index 0000000..1909aff
--- /dev/null
+++ b/example/clientdata/graphics/sprites/weapons/weapon-dagger.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+ <imageset name="dagger" src="graphics/sprites/weapons/weapon-sword.png" width="64" height="64" />
+
+ <action name="default" imageset="dagger">
+ </action>
+
+ <action name="attack_stab" imageset="dagger">
+ <animation direction="down">
+ <sequence start="0" end="3" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="4" end="7" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="8" end="11" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="12" end="15" delay="75" />
+ <end />
+ </animation>
+ </action>
+
+</sprite> \ No newline at end of file
diff --git a/example/clientdata/items.xml b/example/clientdata/items.xml
index 6f72185..3078d9d 100644
--- a/example/clientdata/items.xml
+++ b/example/clientdata/items.xml
@@ -142,6 +142,23 @@
</effect>
<sprite>weapons/weapon-bow.xml</sprite>
</item>
+ <item id="10" max-per-slot="3" name="Dagger" attack-action="attack_stab"
+ description="A simple dagger."
+ image="equipment/weapons/weapon-dagger-dagger.png"
+ value="20">
+ <equip>
+ <slot type="hand" required="1" />
+ </equip>
+ <effect trigger="equip">
+ <autoattack basespeed="166" range="1" base="50" skill="100" >
+ <bonus attribute="0" value="1.5" />
+ </autoattack>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-2000" />
+ </effect>
+ </effect>
+ <sprite>weapons/weapon-dagger.xml</sprite>
+ </item>
<!-- Example of equippable items -->
<item id="7" max-per-slot="1" name="Leather shirt"
@@ -160,7 +177,39 @@
<sprite gender="male">equipment/chest/chest-leather-male.xml</sprite>
<sprite gender="female">equipment/chest/chest-leather-female.xml</sprite>
</item>
-
+ <item id="11" max-per-slot="2" name="Pants"
+ description="Simple pants."
+ image="equipment/legs/pants.png"
+ value="50">
+ <equip>
+ <slot type="legs" required="1" />
+ </equip>
+ <effect trigger="equip">
+ <modifier attribute="def1" value="5" />
+ </effect>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-250" />
+ </effect>
+ <sprite gender="male">equipment/legs/pants-male.xml</sprite>
+ <sprite gender="female">equipment/legs/pants-female.xml</sprite>
+ </item>
+ <item id="12" max-per-slot="1" name="Boots"
+ description="Simple boots."
+ image="equipment/feet/boots.png|W:#4f2d29,c89078"
+ value="40">
+ <equip>
+ <slot type="feet" required="1" />
+ </equip>
+ <effect trigger="equip">
+ <modifier attribute="def1" value="5" />
+ </effect>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-250" />
+ </effect>
+ <sprite gender="male">equipment/feet/boots-male.xml|#4f2d29,c89078</sprite>
+ <sprite gender="female">equipment/feet/boots-female.xml|#4f2d29,c89078</sprite>
+ </item>
+
<!-- example crafting ingredients -->
<item id="8" max-per-slot="99" name="Iron"
description="Combine with one wood to create a sword"
diff --git a/example/serverdata/scripts/maps/desert.lua b/example/serverdata/scripts/maps/desert.lua
index d11be2f..728b5f0 100644
--- a/example/serverdata/scripts/maps/desert.lua
+++ b/example/serverdata/scripts/maps/desert.lua
@@ -28,12 +28,12 @@ atinit(function()
create_npc("Banker", 8, 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} }
+ 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)
-- Another Merchant, selling some equipment, and buying everything...
- smith_buy_table = { {"Sword", 10, 50}, {7, 10, 70} }
+ 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)
-- The most simple NPC - Welcoming new ones around.