diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-19 00:56:22 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-19 00:56:22 +0200 |
commit | 67af89b5fe14d2d0431cefb9b714f72873a74e16 (patch) | |
tree | b1a5ff99d3db37809bfeb5804f3469406133a4c7 /example | |
parent | 10fd0338203a46cec913859fd5e38b61fa24a30f (diff) | |
download | manaserv-67af89b5fe14d2d0431cefb9b714f72873a74e16.tar.gz manaserv-67af89b5fe14d2d0431cefb9b714f72873a74e16.tar.xz manaserv-67af89b5fe14d2d0431cefb9b714f72873a74e16.zip |
Used the client base to make a final bugfix on the server code.
Made the server handle only one slot type requirement since
it's irrelevant to have more anyway.
Plus, it simplifies the code for both equipping/unequipping.
I also added a dagger to show how equipping/unequipping
is working.
Diffstat (limited to 'example')
-rw-r--r-- | example/clientdata/equip.xml | 2 | ||||
-rw-r--r-- | example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png | bin | 0 -> 582 bytes | |||
-rw-r--r-- | example/clientdata/graphics/sprites/weapons/weapon-dagger.xml | 27 | ||||
-rw-r--r-- | example/clientdata/items.xml | 17 | ||||
-rw-r--r-- | example/serverdata/scripts/maps/desert.lua | 2 |
5 files changed, 46 insertions, 2 deletions
diff --git a/example/clientdata/equip.xml b/example/clientdata/equip.xml index 097229c..1a17fd2 100644 --- a/example/clientdata/equip.xml +++ b/example/clientdata/equip.xml @@ -14,6 +14,6 @@ <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" /> + <slot id="8" name="feet" capacity="1" visible="true" /> <slot id="9" name="ammo" capacity="1" /> </equip-slots> diff --git a/example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png b/example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png Binary files differnew file mode 100644 index 0000000..cdfc370 --- /dev/null +++ b/example/clientdata/graphics/items/equipment/weapons/weapon-dagger-dagger.png 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..3e204ef 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" diff --git a/example/serverdata/scripts/maps/desert.lua b/example/serverdata/scripts/maps/desert.lua index b2eb9a4..e6a12d1 100644 --- a/example/serverdata/scripts/maps/desert.lua +++ b/example/serverdata/scripts/maps/desert.lua @@ -33,7 +33,7 @@ atinit(function() 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} } + smith_buy_table = { {5, 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. |