diff options
13 files changed, 363 insertions, 11 deletions
diff --git a/example/clientdata/equip.xml b/example/clientdata/equip.xml index 1a17fd22..be180a07 100644 --- a/example/clientdata/equip.xml +++ b/example/clientdata/equip.xml @@ -7,13 +7,13 @@ updates when making changes on it. --> <equip-slots> - <slot id="1" name="hand" capacity="2" visible="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" /> + <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 Binary files differnew file mode 100644 index 00000000..9f9913ff --- /dev/null +++ b/example/clientdata/graphics/items/equipment/feet/boots.png diff --git a/example/clientdata/graphics/items/equipment/legs/pants.png b/example/clientdata/graphics/items/equipment/legs/pants.png Binary files differnew file mode 100644 index 00000000..c50daf22 --- /dev/null +++ b/example/clientdata/graphics/items/equipment/legs/pants.png diff --git a/example/clientdata/graphics/sprites/equipment/feet/boots-female.png b/example/clientdata/graphics/sprites/equipment/feet/boots-female.png Binary files differnew file mode 100644 index 00000000..ba984324 --- /dev/null +++ b/example/clientdata/graphics/sprites/equipment/feet/boots-female.png 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 00000000..4bb2fffe --- /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 Binary files differnew file mode 100644 index 00000000..f441c5b0 --- /dev/null +++ b/example/clientdata/graphics/sprites/equipment/feet/boots-male.png 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 00000000..7edbcef6 --- /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 Binary files differnew file mode 100644 index 00000000..ad8c2e0e --- /dev/null +++ b/example/clientdata/graphics/sprites/equipment/legs/pants-female.png 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 00000000..4f5dbcdf --- /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 Binary files differnew file mode 100644 index 00000000..f8415753 --- /dev/null +++ b/example/clientdata/graphics/sprites/equipment/legs/pants-male.png 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 00000000..3a90c6aa --- /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/items.xml b/example/clientdata/items.xml index 3e204ef4..3078d9de 100644 --- a/example/clientdata/items.xml +++ b/example/clientdata/items.xml @@ -177,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 e6a12d11..d4e5487c 100644 --- a/example/serverdata/scripts/maps/desert.lua +++ b/example/serverdata/scripts/maps/desert.lua @@ -28,7 +28,7 @@ atinit(function() 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_buy_table = { {1, 10, 20}, {2, 10, 30}, {3, 10, 50}, {11, 10, 60}, {12, 10, 40} } 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) |