summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/clientdata/effects.xml29
-rw-r--r--example/clientdata/emotes.xml101
-rw-r--r--example/clientdata/graphics/items/equipment/chest/chest-leathershirt.pngbin0 -> 684 bytes
-rw-r--r--example/clientdata/graphics/items/equipment/weapons/weapon-bow-bow.pngbin0 -> 666 bytes
-rw-r--r--example/clientdata/graphics/items/equipment/weapons/weapon-sword-sword.pngbin0 -> 827 bytes
-rw-r--r--example/clientdata/graphics/items/unknown.pngbin0 -> 540 bytes
-rw-r--r--example/clientdata/graphics/items/usable/usable-candy.pngbin0 -> 562 bytes
-rw-r--r--example/clientdata/graphics/items/usable/usable-minor-health-potion.pngbin0 -> 311 bytes
-rw-r--r--example/clientdata/graphics/items/usable/usable-regenerative-trinket.pngbin0 -> 840 bytes
-rw-r--r--example/clientdata/graphics/items/usable/usable-token-of-speed.pngbin0 -> 1103 bytes
-rw-r--r--example/clientdata/graphics/particles/arrow-down.pngbin0 -> 380 bytes
-rw-r--r--example/clientdata/graphics/particles/arrow-hail.xml23
-rw-r--r--example/clientdata/graphics/particles/arrow.particle.xml14
-rw-r--r--example/clientdata/graphics/particles/arrowh.pngbin0 -> 1372 bytes
-rw-r--r--example/clientdata/graphics/particles/attack.particle.xml60
-rw-r--r--example/clientdata/graphics/particles/emotes/angel.pngbin0 -> 1960 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/blah.pngbin0 -> 822 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/blush.pngbin0 -> 2038 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/disgust.pngbin0 -> 1924 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-angel.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-blah.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-blush.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-disgust.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-evil.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-grin.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-happy.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-perturbed.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-sad.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-speech.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-surprise.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-tongue.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-upset.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/emote-wink.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/emotes/evil.pngbin0 -> 1925 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/grin.pngbin0 -> 2047 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/happy.pngbin0 -> 1734 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/perturbed.pngbin0 -> 1763 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/sad.pngbin0 -> 1918 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/speech.pngbin0 -> 796 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/surprise.pngbin0 -> 2086 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/tongue.pngbin0 -> 1753 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/upset.pngbin0 -> 1632 bytes
-rw-r--r--example/clientdata/graphics/particles/emotes/wink.pngbin0 -> 1680 bytes
-rw-r--r--example/clientdata/graphics/particles/fullbubble-16px.pngbin0 -> 659 bytes
-rw-r--r--example/clientdata/graphics/particles/green-bubbles.particle.xml40
-rw-r--r--example/clientdata/graphics/particles/hit.particle.xml59
-rw-r--r--example/clientdata/graphics/particles/levelup.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/magic.white.xml24
-rw-r--r--example/clientdata/graphics/particles/orb-medium.pngbin0 -> 320 bytes
-rw-r--r--example/clientdata/graphics/particles/orb-small.pngbin0 -> 269 bytes
-rw-r--r--example/clientdata/graphics/particles/skillup.particle.xml23
-rw-r--r--example/clientdata/graphics/particles/sparkle.pngbin0 -> 537 bytes
-rw-r--r--example/clientdata/graphics/particles/star-medium.pngbin0 -> 965 bytes
-rw-r--r--example/clientdata/graphics/particles/star-small.pngbin0 -> 387 bytes
-rw-r--r--example/clientdata/graphics/particles/warparea.particle.xml24
-rw-r--r--example/clientdata/graphics/skills/axe.pngbin0 -> 1736 bytes
-rw-r--r--example/clientdata/graphics/skills/bow.pngbin0 -> 1791 bytes
-rw-r--r--example/clientdata/graphics/skills/knife.pngbin0 -> 1386 bytes
-rw-r--r--example/clientdata/graphics/skills/mace.pngbin0 -> 1838 bytes
-rw-r--r--example/clientdata/graphics/skills/magic.pngbin0 -> 540 bytes
-rw-r--r--example/clientdata/graphics/skills/polearm.pngbin0 -> 1823 bytes
-rw-r--r--example/clientdata/graphics/skills/shooting.pngbin0 -> 1853 bytes
-rw-r--r--example/clientdata/graphics/skills/staff.pngbin0 -> 1308 bytes
-rw-r--r--example/clientdata/graphics/skills/sword.pngbin0 -> 1641 bytes
-rw-r--r--example/clientdata/graphics/skills/thrown.pngbin0 -> 1583 bytes
-rw-r--r--example/clientdata/graphics/skills/unarmed.pngbin0 -> 2263 bytes
-rw-r--r--example/clientdata/graphics/skills/unknown.pngbin0 -> 540 bytes
-rw-r--r--example/clientdata/graphics/skills/whip.pngbin0 -> 2700 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.pngbin0 -> 11692 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.xml104
-rw-r--r--example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.pngbin0 -> 19688 bytes
-rw-r--r--example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.xml104
-rw-r--r--example/clientdata/graphics/sprites/error.pngbin0 -> 347 bytes
-rw-r--r--example/clientdata/graphics/sprites/error.xml10
-rw-r--r--example/clientdata/graphics/sprites/icons/icon-feather.pngbin0 -> 513 bytes
-rw-r--r--example/clientdata/graphics/sprites/icons/icon-feather.xml10
-rw-r--r--example/clientdata/graphics/sprites/icons/icon-poison.pngbin0 -> 1832 bytes
-rw-r--r--example/clientdata/graphics/sprites/icons/icon-poison.xml18
-rw-r--r--example/clientdata/graphics/sprites/monsters/monster-maggot.pngbin0 -> 4541 bytes
-rw-r--r--example/clientdata/graphics/sprites/monsters/monster-maggot.xml66
-rw-r--r--example/clientdata/graphics/sprites/monsters/monster-scorpion.pngbin0 -> 7855 bytes
-rw-r--r--example/clientdata/graphics/sprites/monsters/monster-scorpion.xml70
-rw-r--r--example/clientdata/graphics/sprites/monsters/monster-slime.pngbin0 -> 13722 bytes
-rw-r--r--example/clientdata/graphics/sprites/monsters/monster-slime.xml55
-rw-r--r--example/clientdata/graphics/sprites/weapons/weapon-bow.pngbin0 -> 5751 bytes
-rw-r--r--example/clientdata/graphics/sprites/weapons/weapon-bow.xml26
-rw-r--r--example/clientdata/graphics/sprites/weapons/weapon-fist.xml7
-rw-r--r--example/clientdata/graphics/sprites/weapons/weapon-sword.pngbin0 -> 2016 bytes
-rw-r--r--example/clientdata/graphics/sprites/weapons/weapon-sword.xml27
-rw-r--r--example/clientdata/hair.xml15
-rw-r--r--example/clientdata/items.xml86
-rw-r--r--example/clientdata/mana-skills.xml19
-rw-r--r--example/clientdata/mana-status-effect.xml12
-rw-r--r--example/clientdata/monsters.xml221
-rw-r--r--example/clientdata/paths.xml54
-rw-r--r--example/clientdata/sfx/fist-swish.oggbin0 -> 6723 bytes
-rw-r--r--example/clientdata/sfx/monsters/maggot/maggot-dying1.oggbin0 -> 17448 bytes
-rw-r--r--example/clientdata/sfx/monsters/maggot/maggot-hit1.oggbin0 -> 19610 bytes
-rw-r--r--example/clientdata/sfx/monsters/maggot/maggot-hit2.oggbin0 -> 15514 bytes
-rw-r--r--example/clientdata/sfx/monsters/maggot/maggot-miss1.oggbin0 -> 14317 bytes
-rw-r--r--example/clientdata/sfx/monsters/scorpion/scorpion-hit1.oggbin0 -> 6626 bytes
-rw-r--r--example/clientdata/sfx/monsters/scorpion/scorpion-hit2.oggbin0 -> 6486 bytes
-rw-r--r--example/clientdata/sfx/monsters/scorpion/scorpion-hit3.oggbin0 -> 6638 bytes
-rw-r--r--example/clientdata/sfx/monsters/scorpion/scorpion-hit4.oggbin0 -> 7410 bytes
-rw-r--r--example/clientdata/sfx/monsters/scorpion/scorpion-miss1.oggbin0 -> 6692 bytes
-rw-r--r--example/clientdata/sfx/monsters/slime/slime-hit1.oggbin0 -> 12943 bytes
-rw-r--r--example/clientdata/specials.xml8
-rw-r--r--example/clientdata/units.xml7
-rw-r--r--example/serverdata/scripts/global_events.lua41
-rw-r--r--example/serverdata/scripts/items/candy.lua17
-rw-r--r--example/serverdata/scripts/monster/testmonster.lua26
-rw-r--r--example/serverdata/scripts/npcs/banker.lua74
-rw-r--r--example/serverdata/scripts/npcs/barber.lua141
-rw-r--r--example/serverdata/scripts/npcs/debugger.lua101
-rw-r--r--example/serverdata/scripts/npcs/emotemaker.lua46
-rw-r--r--example/serverdata/scripts/npcs/healer.lua23
-rw-r--r--example/serverdata/scripts/npcs/postman.lua31
-rw-r--r--example/serverdata/scripts/npcs/seller.lua73
-rw-r--r--example/serverdata/scripts/status/jump.lua53
-rw-r--r--example/serverdata/scripts/status/plague.lua28
120 files changed, 2304 insertions, 11 deletions
diff --git a/example/clientdata/effects.xml b/example/clientdata/effects.xml
new file mode 100644
index 00000000..e0583f44
--- /dev/null
+++ b/example/clientdata/effects.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<being-effects>
+<!-- System effects -->
+ <effect id="0" audio="sfx/system/levelup.ogg" particle="graphics/particles/levelup.particle.xml" />
+ <effect id="1" audio="sfx/system/levelup.ogg" particle="graphics/particles/skillup.particle.xml" />
+
+<!-- Magic sample -->
+ <effect id="2" particle="graphics/particles/magic.white.xml"/>
+
+<!-- Attacks related -->
+ <effect id="3" particle="graphics/particles/hit.particle.xml" />
+ <effect id="4" particle="graphics/particles/arrow-hail.xml" />
+
+<!-- Emotion effects -->
+ <effect id="10000" particle="graphics/particles/emotes/emote-disgust.particle.xml"/>
+ <effect id="10001" particle="graphics/particles/emotes/emote-surprise.particle.xml"/>
+ <effect id="10002" particle="graphics/particles/emotes/emote-happy.particle.xml"/>
+ <effect id="10003" particle="graphics/particles/emotes/emote-sad.particle.xml"/>
+ <effect id="10004" particle="graphics/particles/emotes/emote-evil.particle.xml"/>
+ <effect id="10005" particle="graphics/particles/emotes/emote-wink.particle.xml"/>
+ <effect id="10006" particle="graphics/particles/emotes/emote-angel.particle.xml"/>
+ <effect id="10007" particle="graphics/particles/emotes/emote-blush.particle.xml"/>
+ <effect id="10008" particle="graphics/particles/emotes/emote-tongue.particle.xml"/>
+ <effect id="10009" particle="graphics/particles/emotes/emote-grin.particle.xml"/>
+ <effect id="10010" particle="graphics/particles/emotes/emote-upset.particle.xml"/>
+ <effect id="10011" particle="graphics/particles/emotes/emote-perturbed.particle.xml"/>
+ <effect id="10012" particle="graphics/particles/emotes/emote-speech.particle.xml"/>
+ <effect id="10013" particle="graphics/particles/emotes/emote-blah.particle.xml"/>
+</being-effects>
diff --git a/example/clientdata/emotes.xml b/example/clientdata/emotes.xml
new file mode 100644
index 00000000..0136b13c
--- /dev/null
+++ b/example/clientdata/emotes.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<emotes>
+ <emote id="0"
+ name="Disgust"
+ effectid="10000"
+ image="graphics/particles/emotes/disgust.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="1"
+ name="Surprise"
+ effectid="10001"
+ image="graphics/particles/emotes/surprise.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="2"
+ name="Happy"
+ effectid="10002"
+ image="graphics/particles/emotes/happy.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="3"
+ name="Sad"
+ effectid="10003"
+ image="graphics/particles/emotes/sad.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="4"
+ name="Evil"
+ effectid="10004"
+ image="graphics/particles/emotes/evil.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="5"
+ name="Wink"
+ effectid="10005"
+ image="graphics/particles/emotes/wink.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="6"
+ name="Angel"
+ effectid="10006"
+ image="graphics/particles/emotes/angel.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="7"
+ name="Blush"
+ effectid="10007"
+ image="graphics/particles/emotes/blush.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="8"
+ name="Tongue"
+ effectid="10008"
+ image="graphics/particles/emotes/tongue.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="9"
+ name="Grin"
+ effectid="10009"
+ image="graphics/particles/emotes/grin.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="10"
+ name="Upset"
+ effectid="10010"
+ image="graphics/particles/emotes/upset.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="11"
+ name="Perturbed"
+ effectid="10011"
+ image="graphics/particles/emotes/perturbed.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="12"
+ name="Speech"
+ effectid="10012"
+ image="graphics/particles/emotes/speech.png"
+ width="30" height="32">
+ </emote>
+
+ <emote id="13"
+ name="Blah"
+ effectid="10013"
+ image="graphics/particles/emotes/blah.png"
+ width="30" height="32">
+ </emote>
+
+</emotes>
diff --git a/example/clientdata/graphics/items/equipment/chest/chest-leathershirt.png b/example/clientdata/graphics/items/equipment/chest/chest-leathershirt.png
new file mode 100644
index 00000000..761b9bf6
--- /dev/null
+++ b/example/clientdata/graphics/items/equipment/chest/chest-leathershirt.png
Binary files differ
diff --git a/example/clientdata/graphics/items/equipment/weapons/weapon-bow-bow.png b/example/clientdata/graphics/items/equipment/weapons/weapon-bow-bow.png
new file mode 100644
index 00000000..2ab672dc
--- /dev/null
+++ b/example/clientdata/graphics/items/equipment/weapons/weapon-bow-bow.png
Binary files differ
diff --git a/example/clientdata/graphics/items/equipment/weapons/weapon-sword-sword.png b/example/clientdata/graphics/items/equipment/weapons/weapon-sword-sword.png
new file mode 100644
index 00000000..571fb40e
--- /dev/null
+++ b/example/clientdata/graphics/items/equipment/weapons/weapon-sword-sword.png
Binary files differ
diff --git a/example/clientdata/graphics/items/unknown.png b/example/clientdata/graphics/items/unknown.png
new file mode 100644
index 00000000..9201d688
--- /dev/null
+++ b/example/clientdata/graphics/items/unknown.png
Binary files differ
diff --git a/example/clientdata/graphics/items/usable/usable-candy.png b/example/clientdata/graphics/items/usable/usable-candy.png
new file mode 100644
index 00000000..e3d75c21
--- /dev/null
+++ b/example/clientdata/graphics/items/usable/usable-candy.png
Binary files differ
diff --git a/example/clientdata/graphics/items/usable/usable-minor-health-potion.png b/example/clientdata/graphics/items/usable/usable-minor-health-potion.png
new file mode 100644
index 00000000..a404d6f6
--- /dev/null
+++ b/example/clientdata/graphics/items/usable/usable-minor-health-potion.png
Binary files differ
diff --git a/example/clientdata/graphics/items/usable/usable-regenerative-trinket.png b/example/clientdata/graphics/items/usable/usable-regenerative-trinket.png
new file mode 100644
index 00000000..ba69b570
--- /dev/null
+++ b/example/clientdata/graphics/items/usable/usable-regenerative-trinket.png
Binary files differ
diff --git a/example/clientdata/graphics/items/usable/usable-token-of-speed.png b/example/clientdata/graphics/items/usable/usable-token-of-speed.png
new file mode 100644
index 00000000..25c712f9
--- /dev/null
+++ b/example/clientdata/graphics/items/usable/usable-token-of-speed.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/arrow-down.png b/example/clientdata/graphics/particles/arrow-down.png
new file mode 100644
index 00000000..da94afcf
--- /dev/null
+++ b/example/clientdata/graphics/particles/arrow-down.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/arrow-hail.xml b/example/clientdata/graphics/particles/arrow-hail.xml
new file mode 100644
index 00000000..5372e9a3
--- /dev/null
+++ b/example/clientdata/graphics/particles/arrow-hail.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "400"
+ lifetime = "100"
+ >
+ <!-- <property name="follow-parent" value="0"/> -->
+ <emitter><!-- <property name="follow-parent" value="0"/> -->
+ <property name="lifetime" min="180" max="180"/>
+ <property name="position-x" min="105" max="145"/>
+ <property name="position-y" min="-20" max="20"/>
+ <property name="vertical-angle" value="255"/>
+ <property name="power" value="14"/>
+ <property name="output" min="0" max="1"/>
+ <property name="output-pause" min="10" max="20"/>
+ <property name="gravity" value="0.09"/>
+ <property name="image" value="graphics/particles/arrow-down.png"/>
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/arrow.particle.xml b/example/clientdata/graphics/particles/arrow.particle.xml
new file mode 100644
index 00000000..e19e2205
--- /dev/null
+++ b/example/clientdata/graphics/particles/arrow.particle.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "32"
+ lifetime = "128"
+ >
+ <rotation imageset="graphics/particles/arrowh.png" width="16" height="16">
+ <sequence start="0" end="7" />
+ </rotation>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/arrowh.png b/example/clientdata/graphics/particles/arrowh.png
new file mode 100644
index 00000000..11826070
--- /dev/null
+++ b/example/clientdata/graphics/particles/arrowh.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/attack.particle.xml b/example/clientdata/graphics/particles/attack.particle.xml
new file mode 100644
index 00000000..c8dc5f3e
--- /dev/null
+++ b/example/clientdata/graphics/particles/attack.particle.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<!--
+A burst of red particles emitted in a narrow, horizontal cone. Could be
+used to visualize some kind of special attack.
+-->
+
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "16"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="0" max="45"/>
+ <property name="horizontal-angle" min="45" max="135"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="100"/>
+ <property name="image" value="graphics/particles/orb-small.png|W:#ff0000"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="6" max="12"/>
+ </emitter>
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="0" max="45"/>
+ <property name="horizontal-angle" min="45" max="135"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/star-small.png|W:#ff0000,ffffff"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="6" max="12"/>
+ </emitter>
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="0" max="45"/>
+ <property name="horizontal-angle" min="45" max="135"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/orb-medium.png|W:#ff0000"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="6" max="12"/>
+ </emitter>
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="0" max="45"/>
+ <property name="horizontal-angle" min="45" max="135"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/star-medium.png|W:#ff0000,ffffff"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="3" max="6"/>
+ </emitter>
+ </particle>
+</effect> \ No newline at end of file
diff --git a/example/clientdata/graphics/particles/emotes/angel.png b/example/clientdata/graphics/particles/emotes/angel.png
new file mode 100644
index 00000000..043d0755
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/angel.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/blah.png b/example/clientdata/graphics/particles/emotes/blah.png
new file mode 100644
index 00000000..3eae88a2
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/blah.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/blush.png b/example/clientdata/graphics/particles/emotes/blush.png
new file mode 100644
index 00000000..22172ae0
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/blush.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/disgust.png b/example/clientdata/graphics/particles/emotes/disgust.png
new file mode 100644
index 00000000..9965f89d
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/disgust.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/emote-angel.particle.xml b/example/clientdata/graphics/particles/emotes/emote-angel.particle.xml
new file mode 100644
index 00000000..a4bb1b53
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-angel.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/angel.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-blah.particle.xml b/example/clientdata/graphics/particles/emotes/emote-blah.particle.xml
new file mode 100644
index 00000000..38cb327a
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-blah.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/blah.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-blush.particle.xml b/example/clientdata/graphics/particles/emotes/emote-blush.particle.xml
new file mode 100644
index 00000000..11d2689d
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-blush.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/blush.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-disgust.particle.xml b/example/clientdata/graphics/particles/emotes/emote-disgust.particle.xml
new file mode 100644
index 00000000..b04d18dd
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-disgust.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/disgust.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-evil.particle.xml b/example/clientdata/graphics/particles/emotes/emote-evil.particle.xml
new file mode 100644
index 00000000..433aef30
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-evil.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/evil.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-grin.particle.xml b/example/clientdata/graphics/particles/emotes/emote-grin.particle.xml
new file mode 100644
index 00000000..5c50aa98
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-grin.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/grin.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-happy.particle.xml b/example/clientdata/graphics/particles/emotes/emote-happy.particle.xml
new file mode 100644
index 00000000..fa43997f
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-happy.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/happy.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-perturbed.particle.xml b/example/clientdata/graphics/particles/emotes/emote-perturbed.particle.xml
new file mode 100644
index 00000000..47f92e30
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-perturbed.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/perturbed.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-sad.particle.xml b/example/clientdata/graphics/particles/emotes/emote-sad.particle.xml
new file mode 100644
index 00000000..0e0b7dc8
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-sad.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/sad.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-speech.particle.xml b/example/clientdata/graphics/particles/emotes/emote-speech.particle.xml
new file mode 100644
index 00000000..7d6350b0
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-speech.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/speech.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-surprise.particle.xml b/example/clientdata/graphics/particles/emotes/emote-surprise.particle.xml
new file mode 100644
index 00000000..29498c8f
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-surprise.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/surprise.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-tongue.particle.xml b/example/clientdata/graphics/particles/emotes/emote-tongue.particle.xml
new file mode 100644
index 00000000..2796ac6c
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-tongue.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/tongue.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-upset.particle.xml b/example/clientdata/graphics/particles/emotes/emote-upset.particle.xml
new file mode 100644
index 00000000..4b10d9f2
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-upset.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/upset.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/emote-wink.particle.xml b/example/clientdata/graphics/particles/emotes/emote-wink.particle.xml
new file mode 100644
index 00000000..b217a649
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/emote-wink.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "96"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" value="0"/>
+ <property name="position-y" value="0"/>
+ <property name="position-z" value="-32"/>
+ <property name="lifetime" value="80"/>
+ <property name="fade-out" value="50" />
+ <property name="gravity" value="-0.02" />
+
+ <animation imageset="graphics/particles/emotes/wink.png" width="30" height="32">
+ <frame index="0" />
+ </animation>
+ <property name="follow-parent" />
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/emotes/evil.png b/example/clientdata/graphics/particles/emotes/evil.png
new file mode 100644
index 00000000..7c417ec6
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/evil.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/grin.png b/example/clientdata/graphics/particles/emotes/grin.png
new file mode 100644
index 00000000..0c21cfe8
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/grin.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/happy.png b/example/clientdata/graphics/particles/emotes/happy.png
new file mode 100644
index 00000000..8ca2930e
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/happy.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/perturbed.png b/example/clientdata/graphics/particles/emotes/perturbed.png
new file mode 100644
index 00000000..0a33e0ad
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/perturbed.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/sad.png b/example/clientdata/graphics/particles/emotes/sad.png
new file mode 100644
index 00000000..3ceb3caf
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/sad.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/speech.png b/example/clientdata/graphics/particles/emotes/speech.png
new file mode 100644
index 00000000..72044719
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/speech.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/surprise.png b/example/clientdata/graphics/particles/emotes/surprise.png
new file mode 100644
index 00000000..e1649a63
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/surprise.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/tongue.png b/example/clientdata/graphics/particles/emotes/tongue.png
new file mode 100644
index 00000000..0d5bc959
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/tongue.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/upset.png b/example/clientdata/graphics/particles/emotes/upset.png
new file mode 100644
index 00000000..b2f0ce2b
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/upset.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/emotes/wink.png b/example/clientdata/graphics/particles/emotes/wink.png
new file mode 100644
index 00000000..13488bb8
--- /dev/null
+++ b/example/clientdata/graphics/particles/emotes/wink.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/fullbubble-16px.png b/example/clientdata/graphics/particles/fullbubble-16px.png
new file mode 100644
index 00000000..93e3b57f
--- /dev/null
+++ b/example/clientdata/graphics/particles/fullbubble-16px.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/green-bubbles.particle.xml b/example/clientdata/graphics/particles/green-bubbles.particle.xml
new file mode 100644
index 00000000..e272d85c
--- /dev/null
+++ b/example/clientdata/graphics/particles/green-bubbles.particle.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+Green poison bubbles
+-->
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "0"
+ >
+ <emitter>
+ <property name="position-z" value="90" />
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="0" max="90"/>
+ <property name="horizontal-angle" min="0" max="360"/>
+ <property name="power" min="4" max="15"/>
+ <property name="lifetime" value="1"/>
+ <property name="output" value="1"/>
+ <emitter>
+ <property name="gravity" value="-0.1"/>
+ <property name="momentum" value="0.9"/>
+ <animation imageset="graphics/particles/fullbubble-16px.png|W:#80ff80,40a020" width="16" height="16">
+ <frame index="0" delay="80" />
+ <frame index="1" delay="80" />
+ <frame index="2" delay="80" />
+ <frame index="3" delay="80" />
+ <frame index="4" delay="80" />
+ <frame index="5" delay="30" />
+ <frame index="6" delay="20" />
+ <frame index="7" delay="-1" />
+ </animation>
+ <property name="lifetime" value="45"/>
+ <property name="fade-in" value="0"/>
+ <property name="fade-out" value="10"/>
+ <property name="output" min="0" max="1"/>
+ <property name="output-pause" min="30" max="80"/>
+ </emitter>
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/hit.particle.xml b/example/clientdata/graphics/particles/hit.particle.xml
new file mode 100644
index 00000000..c5c295fc
--- /dev/null
+++ b/example/clientdata/graphics/particles/hit.particle.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+
+<!--
+An explosion of white particles.
+-->
+
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "16"
+ lifetime = "1"
+ >
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="45" max="90"/>
+ <property name="horizontal-angle" min="0" max="360"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/orb-small.png"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="6" max="12"/>
+ </emitter>
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="45" max="90"/>
+ <property name="horizontal-angle" min="0" max="360"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/star-small.png|W:#ffffff,ffffff"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="6" max="12"/>
+ </emitter>
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="45" max="90"/>
+ <property name="horizontal-angle" min="0" max="360"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/orb-medium.png"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="6" max="12"/>
+ </emitter>
+ <emitter>
+ <property name="position-x" min="-8" max="8"/>
+ <property name="position-y" min="-8" max="8"/>
+ <property name="vertical-angle" min="45" max="90"/>
+ <property name="horizontal-angle" min="0" max="360"/>
+ <property name="power" min="0" max="6"/>
+ <property name="gravity" value="0.1"/>
+ <property name="image" value="graphics/particles/star-medium.png|W:#ffffff,ffffff"/>
+ <property name="lifetime" min="0" max="80"/>
+ <property name="output" min="3" max="6"/>
+ </emitter>
+ </particle>
+</effect> \ No newline at end of file
diff --git a/example/clientdata/graphics/particles/levelup.particle.xml b/example/clientdata/graphics/particles/levelup.particle.xml
new file mode 100644
index 00000000..0c80626b
--- /dev/null
+++ b/example/clientdata/graphics/particles/levelup.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+Red stars which are supposed to engulf a character
+-->
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "0"
+ lifetime = "128"
+ >
+ <emitter>
+ <property name="image" value="graphics/particles/star-medium.png|W:#ff0000,ffffff"/>
+ <property name="vertical-angle" value="90"/>
+ <property name="power" value="2"/>
+ <property name="lifetime" value="36"/>
+ <property name="output" min="-5" max="1"/>
+ <property name="position-x" min="-16" max="16"/>
+ <property name="position-y" min="-16" max="16"/>
+ <property name="position-z" min="0" max="32"/>
+ </emitter>
+ </particle>
+</effect> \ No newline at end of file
diff --git a/example/clientdata/graphics/particles/magic.white.xml b/example/clientdata/graphics/particles/magic.white.xml
new file mode 100644
index 00000000..5304b77f
--- /dev/null
+++ b/example/clientdata/graphics/particles/magic.white.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "0"
+ lifetime = "128"
+ >
+ <emitter>
+ <animation imageset="graphics/particles/sparkle.png|W:#e0e0e0,ffffff" width="15" height="15">
+ <sequence start="0" end="3" delay="50" />
+ <frame index="0" delay="100" />
+ </animation>
+ <property name="vertical-angle" value="90"/>
+ <property name="power" min="1" max="1"/>
+ <property name="lifetime" min="15" max="25"/>
+ <property name="output" min="1" max="1"/>
+ <property name="position-x" min="-16" max="16"/>
+ <property name="position-y" min="-16" max="16"/>
+ <property name="position-z" min="29" max="40"/>
+ </emitter>
+ </particle>
+</effect>
diff --git a/example/clientdata/graphics/particles/orb-medium.png b/example/clientdata/graphics/particles/orb-medium.png
new file mode 100644
index 00000000..eb896c85
--- /dev/null
+++ b/example/clientdata/graphics/particles/orb-medium.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/orb-small.png b/example/clientdata/graphics/particles/orb-small.png
new file mode 100644
index 00000000..47cf957f
--- /dev/null
+++ b/example/clientdata/graphics/particles/orb-small.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/skillup.particle.xml b/example/clientdata/graphics/particles/skillup.particle.xml
new file mode 100644
index 00000000..91d79e7a
--- /dev/null
+++ b/example/clientdata/graphics/particles/skillup.particle.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+Green stars which are supposed to engulf a character
+-->
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "0"
+ lifetime = "128"
+ >
+ <emitter>
+ <property name="image" value="graphics/particles/star-medium.png|W:#00ff00,ffffff"/>
+ <property name="vertical-angle" value="90"/>
+ <property name="power" value="2"/>
+ <property name="lifetime" value="36"/>
+ <property name="output" min="-5" max="1"/>
+ <property name="position-x" min="-16" max="16"/>
+ <property name="position-y" min="-16" max="16"/>
+ <property name="position-z" min="0" max="32"/>
+ </emitter>
+ </particle>
+</effect> \ No newline at end of file
diff --git a/example/clientdata/graphics/particles/sparkle.png b/example/clientdata/graphics/particles/sparkle.png
new file mode 100644
index 00000000..7cfbbb26
--- /dev/null
+++ b/example/clientdata/graphics/particles/sparkle.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/star-medium.png b/example/clientdata/graphics/particles/star-medium.png
new file mode 100644
index 00000000..667d2334
--- /dev/null
+++ b/example/clientdata/graphics/particles/star-medium.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/star-small.png b/example/clientdata/graphics/particles/star-small.png
new file mode 100644
index 00000000..4c3bf365
--- /dev/null
+++ b/example/clientdata/graphics/particles/star-small.png
Binary files differ
diff --git a/example/clientdata/graphics/particles/warparea.particle.xml b/example/clientdata/graphics/particles/warparea.particle.xml
new file mode 100644
index 00000000..f4984232
--- /dev/null
+++ b/example/clientdata/graphics/particles/warparea.particle.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+Fancy fireworks effect which fills the whole screen.
+-->
+<effect>
+ <particle
+ position-x = "0"
+ position-y = "0"
+ position-z = "1"
+ size-adjustable = "true"
+ >
+ <emitter>
+ <property name="position-x" min="0" max="32"/>
+ <property name="position-y" min="0" max="48"/>
+ <property name="image" value="graphics/particles/star-small.png"/>
+ <property name="gravity" value="-0.003"/>
+ <property name="lifetime" value="90"/>
+ <property name="output" min="0" max="1"/>
+ <property name="output-pause" min="0" max="10"/>
+ <property name="fade-in" value="30"/>
+ <property name="fade-out" value="30"/>
+ </emitter>
+ </particle>
+</effect> \ No newline at end of file
diff --git a/example/clientdata/graphics/skills/axe.png b/example/clientdata/graphics/skills/axe.png
new file mode 100644
index 00000000..b2af0347
--- /dev/null
+++ b/example/clientdata/graphics/skills/axe.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/bow.png b/example/clientdata/graphics/skills/bow.png
new file mode 100644
index 00000000..78c4319a
--- /dev/null
+++ b/example/clientdata/graphics/skills/bow.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/knife.png b/example/clientdata/graphics/skills/knife.png
new file mode 100644
index 00000000..61f834c6
--- /dev/null
+++ b/example/clientdata/graphics/skills/knife.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/mace.png b/example/clientdata/graphics/skills/mace.png
new file mode 100644
index 00000000..7958d32f
--- /dev/null
+++ b/example/clientdata/graphics/skills/mace.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/magic.png b/example/clientdata/graphics/skills/magic.png
new file mode 100644
index 00000000..9201d688
--- /dev/null
+++ b/example/clientdata/graphics/skills/magic.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/polearm.png b/example/clientdata/graphics/skills/polearm.png
new file mode 100644
index 00000000..52c8449d
--- /dev/null
+++ b/example/clientdata/graphics/skills/polearm.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/shooting.png b/example/clientdata/graphics/skills/shooting.png
new file mode 100644
index 00000000..e7b0806c
--- /dev/null
+++ b/example/clientdata/graphics/skills/shooting.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/staff.png b/example/clientdata/graphics/skills/staff.png
new file mode 100644
index 00000000..e5c071e0
--- /dev/null
+++ b/example/clientdata/graphics/skills/staff.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/sword.png b/example/clientdata/graphics/skills/sword.png
new file mode 100644
index 00000000..9b6db914
--- /dev/null
+++ b/example/clientdata/graphics/skills/sword.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/thrown.png b/example/clientdata/graphics/skills/thrown.png
new file mode 100644
index 00000000..3fc35de7
--- /dev/null
+++ b/example/clientdata/graphics/skills/thrown.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/unarmed.png b/example/clientdata/graphics/skills/unarmed.png
new file mode 100644
index 00000000..adb139ed
--- /dev/null
+++ b/example/clientdata/graphics/skills/unarmed.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/unknown.png b/example/clientdata/graphics/skills/unknown.png
new file mode 100644
index 00000000..9201d688
--- /dev/null
+++ b/example/clientdata/graphics/skills/unknown.png
Binary files differ
diff --git a/example/clientdata/graphics/skills/whip.png b/example/clientdata/graphics/skills/whip.png
new file mode 100644
index 00000000..e5734e5d
--- /dev/null
+++ b/example/clientdata/graphics/skills/whip.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.png b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.png
new file mode 100644
index 00000000..a6efbf9b
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.xml b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.xml
new file mode 100644
index 00000000..b44be8ab
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-female.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+
+ <imageset name="base" src="graphics/sprites/equipment/chest/chest-leather-female.png|W;R" 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> \ No newline at end of file
diff --git a/example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.png b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.png
new file mode 100644
index 00000000..bc5a3c65
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.xml b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.xml
new file mode 100644
index 00000000..fd46be28
--- /dev/null
+++ b/example/clientdata/graphics/sprites/equipment/chest/chest-leather-male.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+
+ <imageset name="base" src="graphics/sprites/equipment/chest/chest-leather-male.png|W;R" 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> \ No newline at end of file
diff --git a/example/clientdata/graphics/sprites/error.png b/example/clientdata/graphics/sprites/error.png
new file mode 100644
index 00000000..108ad0e4
--- /dev/null
+++ b/example/clientdata/graphics/sprites/error.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/error.xml b/example/clientdata/graphics/sprites/error.xml
new file mode 100644
index 00000000..3504bd01
--- /dev/null
+++ b/example/clientdata/graphics/sprites/error.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<sprite>
+ <imageset name="base" src="graphics/sprites/error.png" width="29" height="9" />
+
+ <action name="default" imageset="base">
+ <animation direction="default">
+ <frame index="0" />
+ </animation>
+ </action>
+</sprite> \ No newline at end of file
diff --git a/example/clientdata/graphics/sprites/icons/icon-feather.png b/example/clientdata/graphics/sprites/icons/icon-feather.png
new file mode 100644
index 00000000..425fb286
--- /dev/null
+++ b/example/clientdata/graphics/sprites/icons/icon-feather.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/icons/icon-feather.xml b/example/clientdata/graphics/sprites/icons/icon-feather.xml
new file mode 100644
index 00000000..715a2f82
--- /dev/null
+++ b/example/clientdata/graphics/sprites/icons/icon-feather.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<sprite>
+ <imageset name="base" src="graphics/sprites/icons/icon-feather.png" width="13" height="20" />
+
+ <action name="default" imageset="base">
+ <animation direction="default">
+ <frame index="0" offsetY="-12" delay="100"/>
+ </animation>
+ </action>
+</sprite>
diff --git a/example/clientdata/graphics/sprites/icons/icon-poison.png b/example/clientdata/graphics/sprites/icons/icon-poison.png
new file mode 100644
index 00000000..b7803cd9
--- /dev/null
+++ b/example/clientdata/graphics/sprites/icons/icon-poison.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/icons/icon-poison.xml b/example/clientdata/graphics/sprites/icons/icon-poison.xml
new file mode 100644
index 00000000..0a8f751a
--- /dev/null
+++ b/example/clientdata/graphics/sprites/icons/icon-poison.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<sprite>
+ <imageset name="base" src="graphics/sprites/icons/icon-poison.png" width="12" height="20" />
+
+ <action name="default" imageset="base">
+ <animation direction="default">
+ <frame index="0" offsetY="-12" delay="80"/>
+ <frame index="1" offsetY="-12" delay="80"/>
+ <frame index="2" offsetY="-12" delay="80"/>
+ <frame index="3" offsetY="-12" delay="80"/>
+ <frame index="4" offsetY="-12" delay="80"/>
+ <frame index="5" offsetY="-12" delay="80"/>
+ <frame index="6" offsetY="-12" delay="80"/>
+ <frame index="7" offsetY="-12" delay="80"/>
+ <frame index="8" offsetY="-12" delay="80"/>
+ </animation>
+ </action>
+</sprite>
diff --git a/example/clientdata/graphics/sprites/monsters/monster-maggot.png b/example/clientdata/graphics/sprites/monsters/monster-maggot.png
new file mode 100644
index 00000000..64474f94
--- /dev/null
+++ b/example/clientdata/graphics/sprites/monsters/monster-maggot.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/monsters/monster-maggot.xml b/example/clientdata/graphics/sprites/monsters/monster-maggot.xml
new file mode 100644
index 00000000..f603b8db
--- /dev/null
+++ b/example/clientdata/graphics/sprites/monsters/monster-maggot.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<sprite>
+
+ <imageset name="base" src="graphics/sprites/monsters/monster-maggot.png" width="20" height="15" />
+
+ <action name="stand" imageset="base">
+ <animation direction="down">
+ <frame index="0" offsetY ="-8" />
+ </animation>
+ <animation direction="left">
+ <frame index="10" offsetY ="-11" />
+ </animation>
+ <animation direction="up">
+ <frame index="20" offsetY ="-10" />
+ </animation>
+ <animation direction="right">
+ <frame index="30" offsetY ="-11" />
+ </animation>
+ </action>
+
+ <action name="walk" imageset="base">
+ <animation direction="down">
+ <sequence start="1" end="4" delay="150" offsetY ="-8" />
+ </animation>
+ <animation direction="left">
+ <sequence start="11" end="14" delay="150" offsetY ="-11" />
+ </animation>
+ <animation direction="up">
+ <sequence start="21" end="24" delay="150" offsetY ="-10" />
+ </animation>
+ <animation direction="right">
+ <sequence start="31" end="34" delay="150" offsetY ="-11" />
+ </animation>
+ </action>
+
+ <action name="dead" imageset="base">
+ <animation direction="down">
+ <frame index="9" offsetY ="-8" />
+ </animation>
+ <animation direction="left" >
+ <frame index="19" offsetY ="-11" />
+ </animation>
+ <animation direction="up">
+ <frame index="29" offsetY ="-10" />
+ </animation>
+ <animation direction="right">
+ <frame index="39" offsetY ="-11" />
+ </animation>
+ </action>
+
+ <action name="attack" imageset="base">
+ <animation direction="down">
+ <sequence start="5" end="8" delay="150" offsetY ="-8" />
+ </animation>
+ <animation direction="left">
+ <sequence start="15" end="18" delay="150" offsetY ="-11" />
+ </animation>
+ <animation direction="up">
+ <sequence start="25" end="28" delay="150" offsetY ="-10" />
+ </animation>
+ <animation direction="right">
+ <sequence start="35" end="38" delay="150" offsetY ="-11" />
+ </animation>
+ </action>
+
+</sprite> \ No newline at end of file
diff --git a/example/clientdata/graphics/sprites/monsters/monster-scorpion.png b/example/clientdata/graphics/sprites/monsters/monster-scorpion.png
new file mode 100644
index 00000000..0bd693fd
--- /dev/null
+++ b/example/clientdata/graphics/sprites/monsters/monster-scorpion.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/monsters/monster-scorpion.xml b/example/clientdata/graphics/sprites/monsters/monster-scorpion.xml
new file mode 100644
index 00000000..ab1986a3
--- /dev/null
+++ b/example/clientdata/graphics/sprites/monsters/monster-scorpion.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<sprite>
+
+ <imageset name="base" src="graphics/sprites/monsters/monster-scorpion.png|W" width="48" height="45" />
+
+ <action name="stand" imageset="base">
+ <animation direction="down">
+ <frame index="0" offsetY ="2" />
+ </animation>
+ <animation direction="left">
+ <frame index="10" offsetY ="2" />
+ </animation>
+ <animation direction="up">
+ <frame index="20" offsetX ="-1" offsetY ="3" />
+ </animation>
+ <animation direction="right">
+ <frame index="30" offsetY ="2" />
+ </animation>
+ </action>
+
+ <action name="walk" imageset="base">
+ <animation direction="down">
+ <sequence start="1" end="4" delay="75" offsetY ="2" />
+ </animation>
+ <animation direction="left">
+ <sequence start="11" end="14" delay="75" offsetY ="2" />
+ </animation>
+ <animation direction="up">
+ <sequence start="21" end="24" delay="75" offsetX ="-1" offsetY ="3" />
+ </animation>
+ <animation direction="right">
+ <sequence start="31" end="34" delay="75" offsetY ="2" />
+ </animation>
+ </action>
+
+ <action name="dead" imageset="base">
+ <animation direction="down">
+ <frame index="9" offsetY ="2" />
+ </animation>
+ <animation direction="left">
+ <frame index="19" offsetY ="2" />
+ </animation>
+ <animation direction="up">
+ <frame index="29" offsetX ="-1" offsetY ="3" />
+ </animation>
+ <animation direction="right">
+ <frame index="39" offsetY ="2" />
+ </animation>
+ </action>
+
+ <action name="attack" imageset="base">
+ <animation direction="down">
+ <sequence start="5" end="8" delay="75" offsetY ="2" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="15" end="18" delay="75" offsetY ="2" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="25" end="28" delay="75" offsetX ="-1" offsetY ="3" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="35" end="38" delay="75" offsetY ="2" />
+ <end />
+ </animation>
+ </action>
+
+</sprite>
diff --git a/example/clientdata/graphics/sprites/monsters/monster-slime.png b/example/clientdata/graphics/sprites/monsters/monster-slime.png
new file mode 100644
index 00000000..ab14bbb5
--- /dev/null
+++ b/example/clientdata/graphics/sprites/monsters/monster-slime.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/monsters/monster-slime.xml b/example/clientdata/graphics/sprites/monsters/monster-slime.xml
new file mode 100644
index 00000000..220a8e25
--- /dev/null
+++ b/example/clientdata/graphics/sprites/monsters/monster-slime.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<sprite>
+
+ <imageset name="base" src="graphics/sprites/monsters/monster-slime.png|W" width="52" height="24" />
+
+ <action name="stand" imageset="base">
+ <animation>
+ <frame index="0" offsetY="-4" />
+ </animation>
+ </action>
+
+ <action name="walk" imageset="base">
+ <animation direction="down">
+ <sequence start="0" end="3" delay="200" offsetY="-4" />
+ </animation>
+ <animation direction="left">
+ <frame index="0" delay="200" offsetY="-4" />
+ <sequence start="10" end="12" delay="200" offsetY="-4" />
+ </animation>
+ <animation direction="up">
+ <frame index="0" delay="200" offsetY="-4" />
+ <sequence start="19" end="21" delay="200" offsetY="-4" />
+ </animation>
+ <animation direction="right">
+ <frame index="0" delay="200" offsetY="-4" />
+ <sequence start="28" end="30" delay="200" offsetY="-4" />
+ </animation>
+ </action>
+
+ <action name="dead" imageset="base">
+ <animation>
+ <frame index="8" offsetY="-4" />
+ </animation>
+ </action>
+
+ <action name="attack" imageset="base">
+ <animation direction="down">
+ <sequence start="4" end="7" delay="100" offsetY="-4" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="4" end="7" delay="100" offsetY="-4" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="22" end="25" delay="100" offsetY="-4" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="22" end="25" delay="100" offsetY="-4" />
+ <end />
+ </animation>
+ </action>
+
+</sprite>
diff --git a/example/clientdata/graphics/sprites/weapons/weapon-bow.png b/example/clientdata/graphics/sprites/weapons/weapon-bow.png
new file mode 100644
index 00000000..b5f8a68e
--- /dev/null
+++ b/example/clientdata/graphics/sprites/weapons/weapon-bow.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/weapons/weapon-bow.xml b/example/clientdata/graphics/sprites/weapons/weapon-bow.xml
new file mode 100644
index 00000000..7580776c
--- /dev/null
+++ b/example/clientdata/graphics/sprites/weapons/weapon-bow.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+ <imageset name="bow" src="graphics/sprites/weapons/weapon-bow.png" width="64" height="64" />
+
+ <action name="default" imageset="bow">
+ </action>
+
+ <action name="attack_bow" imageset="bow">
+ <animation direction="down">
+ <sequence start="0" end="4" delay="75" />
+ <end />
+ </animation>
+ <animation direction="left">
+ <sequence start="5" end="9" delay="75" />
+ <end />
+ </animation>
+ <animation direction="up">
+ <sequence start="10" end="14" delay="75" />
+ <end />
+ </animation>
+ <animation direction="right">
+ <sequence start="15" end="19" delay="75" />
+ <end />
+ </animation>
+ </action>
+</sprite> \ No newline at end of file
diff --git a/example/clientdata/graphics/sprites/weapons/weapon-fist.xml b/example/clientdata/graphics/sprites/weapons/weapon-fist.xml
new file mode 100644
index 00000000..324dfd5b
--- /dev/null
+++ b/example/clientdata/graphics/sprites/weapons/weapon-fist.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<sprite name="player" action="stand">
+ <imageset name="dagger" src="graphics/sprites/weapon-sword.png" width="64" height="64" />
+
+ <action name="default" imageset="dagger">
+ </action>
+</sprite> \ No newline at end of file
diff --git a/example/clientdata/graphics/sprites/weapons/weapon-sword.png b/example/clientdata/graphics/sprites/weapons/weapon-sword.png
new file mode 100644
index 00000000..f691ef3f
--- /dev/null
+++ b/example/clientdata/graphics/sprites/weapons/weapon-sword.png
Binary files differ
diff --git a/example/clientdata/graphics/sprites/weapons/weapon-sword.xml b/example/clientdata/graphics/sprites/weapons/weapon-sword.xml
new file mode 100644
index 00000000..1909aff6
--- /dev/null
+++ b/example/clientdata/graphics/sprites/weapons/weapon-sword.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/hair.xml b/example/clientdata/hair.xml
new file mode 100644
index 00000000..b24d9adb
--- /dev/null
+++ b/example/clientdata/hair.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<colors>
+ <color id="0" value="#8c4b41,da9041,ffffff" name="light brown"/>
+ <color id="1" value="#06372b,489e25,fdedcc" name="green"/>
+ <color id="2" value="#5f0b33,91191c,f9ad81" name="red"/>
+ <color id="3" value="#602486,934cc3,fdc689" name="purple"/>
+ <color id="4" value="#805e74,c6b09b,ffffff" name="gray"/>
+ <color id="5" value="#8c6625,dab425,ffffff" name="yellow"/>
+ <color id="6" value="#1d2d6d,1594a3,fdedcc" name="blue"/>
+ <color id="7" value="#831f2d,be4f2d,f8cc8b" name="brown"/>
+ <color id="8" value="#432482,584bbc,dae8e5" name="light blue"/>
+ <color id="9" value="#460850,611967,e7b4ae" name="dark purple"/>
+ <color id="10" value="#000000,202020,404040,dddddd" name="black"/>
+ <color id="127" value="#5E7480,F1FFFF,FFFFFF" name="shock white"/>
+</colors>
diff --git a/example/clientdata/items.xml b/example/clientdata/items.xml
index fbf899ac..9fd64a24 100644
--- a/example/clientdata/items.xml
+++ b/example/clientdata/items.xml
@@ -1,12 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<items>
+ <!-- Example of an usable items -->
<item id="1"
- image="use-food-candy.png"
+ image="usable/usable-candy.png"
name="Candy"
description="A sugar-free candy."
type="usable"
hp="5"
+ script="candy.lua"
weight="1"
max-per-slot="30"
/>
+ <item id="2" max-per-slot="1" name="Regenerative trinket"
+ description="A trinket with refreshing powers."
+ image="usable/usable-regenerative-trinket.png">
+ <effect trigger="existence">
+ <modifier attribute="hpr2" value="1.05" />
+ <modifier attribute="cap1" value="-50" />
+ </effect>
+ </item>
+ <item id="3" max-per-slot="99" name="Minor health potion"
+ description="A small bottle containing a lightly tinted red fluid. A faint sparkle can be seen occasionally, and the very smell of the contents make you feel more alive, vibrant, and healthy."
+ image="usable/usable-minor-health-potion.png">
+ <effect trigger="activation">
+ <modifier attribute="hpr3" value="2.5" duration="30" />
+ <modifier attribute="hpr4" value="2.0" duration="30" />
+ <consumes />
+ </effect>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-110" />
+ </effect>
+ </item>
+ <item id="4" max-per-slot="1" name="Token of speed"
+ description="An old, cracked, rectangular slab. It has a faint blue glow, and a strangle symbol set into one of the sides. A circular pattern in the centre is just big enough for someone to put their hand on."
+ image="usable/usable-token-of-speed.png">
+ <effect trigger="activation">
+ <modifier attribute="mspd" value="1.3" duration="50" />
+ <cooldown value="150" />
+ </effect>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-400" />
+ </effect>
+ </item>
+
+ <!-- Example of weapons -->
+ <item id="5" max-per-slot="1" name="Sword" attack-action="attack_stab"
+ description="A simple sword."
+ image="equipment/weapons/weapon-sword-sword.png">
+ <equip>
+ <slot type="hand" required="2" />
+ </equip>
+ <effect trigger="equip">
+ <autoattack basespeed="166" range="2" base="50" skill="102" >
+ <bonus attribute="0" value="1.0" />
+ </autoattack>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-2000" />
+ </effect>
+ </effect>
+ <sprite>weapons/weapon-sword.xml</sprite>
+ </item>
+ <item id="6" max-per-slot="1" name="Bow" attack-action="attack_bow"
+ description="A simple bow made of fine oak wood."
+ image="equipment/weapons/weapon-bow-bow.png">
+ <equip>
+ <slot type="hand" required="2" />
+ </equip>
+ <effect trigger="equip">
+ <autoattack basespeed="166" range="5" base="50" skill="106" >
+ <bonus attribute="0" value="1.5" />
+ </autoattack>
+ <effect trigger="existence">
+ <modifier attribute="cap1" value="-2000" />
+ </effect>
+ </effect>
+ <sprite>weapons/weapon-bow.xml</sprite>
+ </item>
+
+ <!-- Example of equippable items -->
+ <item id="7" max-per-slot="1" name="Leather shirt"
+ description="A simple shirt made of leather."
+ image="equipment/chest/chest-leathershirt.png">
+ <equip>
+ <slot type="torso" 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/chest/chest-leather-male.xml</sprite>
+ <sprite gender="female">equipment/chest/chest-leather-female.xml</sprite>
+ </item>
</items>
diff --git a/example/clientdata/mana-skills.xml b/example/clientdata/mana-skills.xml
index 118450c6..ace8b444 100644
--- a/example/clientdata/mana-skills.xml
+++ b/example/clientdata/mana-skills.xml
@@ -1,3 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<skills>
+ <set name="Weapons">
+ <skill id="100" name="Unarmed" icon="graphics/skills/unarmed.png" />
+ <skill id="101" name="Knife" icon="graphics/skills/knife.png" />
+ <skill id="102" name="Sword" icon="graphics/skills/sword.png" />
+ <skill id="103" name="Polearm" icon="graphics/skills/polearm.png" />
+ <skill id="104" name="Staff" icon="graphics/skills/staff.png" />
+ <skill id="105" name="Whip" icon="graphics/skills/whip.png" />
+ <skill id="106" name="Bow" icon="graphics/skills/bow.png" />
+ <skill id="107" name="Shooting" icon="graphics/skills/shooting.png" />
+ <skill id="108" name="Mace" icon="graphics/skills/mace.png" />
+ <skill id="109" name="Axe" icon="graphics/skills/axe.png" />
+ <skill id="110" name="Thrown" icon="graphics/skills/thrown.png" />
+ </set>
+ <set name="Magic">
+ <skill id="200" name="Magic Example" />
+ </set>
+ <set name="Crafts">
+ <skill id="300" name="Craft Example" />
+ </set>
</skills>
diff --git a/example/clientdata/mana-status-effect.xml b/example/clientdata/mana-status-effect.xml
index 650d50ff..7b613c4f 100644
--- a/example/clientdata/mana-status-effect.xml
+++ b/example/clientdata/mana-status-effect.xml
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<status-effects>
+ <status-effect name="Plague" id="1"
+ icon="icons/icon-poison.xml"
+ persistent-particle-effect="true"
+ start-particle="graphics/particles/green-bubbles.particle.xml"
+ script="plague.lua"
+ />
+ <status-effect name="Jumping Status" id="2"
+ icon="icons/icon-feather.xml"
+ persistent-particle-effect="true"
+ start-particle="graphics/particles/magic.white.xml"
+ script="jump.lua"
+ />
</status-effects>
diff --git a/example/clientdata/monsters.xml b/example/clientdata/monsters.xml
index 21ddc80a..70d4009f 100644
--- a/example/clientdata/monsters.xml
+++ b/example/clientdata/monsters.xml
@@ -1,3 +1,224 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2009 The Mana World Development Team
+monsters.xml parameters explanation:
+This file is used to describe the monsters the players will see all around the world.
+It can be used by both client and server, but some parameters are specific.
+
+id [integer]: It is the id of the monster. This parameter has to be unique for each monster.
+ The system will use the monster id to refer on it in many ways.
+name [string]: Tells the monster name. (Used to ease configuration ease on server.)
+ but displayed to players on the client side.
+sprite [xml file]: Tells the xml file used to display the monster sprites. (Client only).
+sound <TAG>: This tag is used by the client to know which sound to play at what event.
+ event [string]: Tells the event at which the corresponding sound should be played. ('die', 'miss', 'hit', 'strike' are some examples.)
+ <INNER>[string]: The ogg file to be played
+drop <TAG>: Tells what kind of item the monster can drop. See items.xml to get the id correspondence.
+ item [integer]: Tells the drop item Id.
+ percent[float]: Tells the chance (8.0 = 8%) to see the drop after monster's death.
+attributes <TAG>: Tells all the monsters attribute. These attribute, as for items, should not be left
+ in players hands.
+ hp [integer]: The monster hit points.
+ size[integer]: The monster maximal amplitude in pixels. Used to compute player's hit area.
+ speed[float]: The monster's speed in tiles per second.
+ (A tile is the smallest square map unit: by default, a tile is 32 pixel long.)
+ attack-min[integer]: The minimal attack strength of the monster. If your hasn't got any armor,
+ there are the minimal hit points he will lose when hit by the monster.
+ attack-delta[integer]: The amplitude between minimal and maximal damages the monster can do.
+ attack-magic[integer]: The magical attacks are removing hp when hit but are computed against magical defense instead.
+ mutation[integer]: The mutation indicates the amplitude in percent where attributes get modified with.
+ For instance, with a mutation of 50, each attribute can be altered to become 100% to 149% of what they are.
+vulnerability<TAG>: Tells the monster specific vulnerability to an element.
+ element[string]: Tells to which element the weakness is. ('fire', 'earth', 'ice', 'metal' are some examples.)
+ factor[float]: Tells the defense against an element is reduced in percent. (A value of 0.7 indicates that the defense is lowered by 30%).
+exp<TAG>: Tells how much experience point a monster is giving upon victory.
+-->
+
<monsters>
+
+ <monster id="0" name="Maggot" targetCursor="small">
+ <sprite>monsters/monster-maggot.xml</sprite>
+ <sound event="hit">monsters/maggot/maggot-hit1.ogg</sound>
+ <sound event="hit">monsters/maggot/maggot-hit2.ogg</sound>
+ <sound event="miss">monsters/maggot/maggot-miss1.ogg</sound>
+ <sound event="die">monsters/maggot/maggot-dying1.ogg</sound>
+ <drop item="505" percent="8"/>
+ <drop item="518" percent="4"/>
+ <drop item="501" percent="1.5"/>
+ <drop item="533" percent="1.5"/>
+ <drop item="502" percent="0.7"/>
+ <drop item="522" percent="0.1"/>
+ <attributes
+ hp="20"
+ size="4"
+ speed="2.0"
+ attack-min="10"
+ attack-delta="2"
+ attack-magic="0"
+ hit="10"
+ evade="5"
+ physical-defence="5"
+ magical-defence="0"
+ mutation="50"
+ />
+ <vulnerability element="fire" factor="1.5"/>
+ <vulnerability element="earth" factor="0.7"/>
+ <exp>10</exp>
+ <!-- average stroll- and track range-->
+ <behavior
+ aggressive="false"
+ cowardly="false"
+ track-range="5"
+ stroll-range="2"
+ attack-distance="32"
+ />
+ <attack id="1"
+ priority="1"
+ type="physical"
+ pre-delay="10"
+ aft-delay="5"
+ damage-factor="1"
+ range="32"
+ animation="attack"
+ script-function="strike"
+ />
+ <script>testmonster.lua</script> <!-- only Proof of Concept-->
+ </monster>
+
+ <monster id="1" name="Scorpion">
+ <sprite>monsters/monster-scorpion.xml|#4d422d,826242,d8c282,ffffff</sprite>
+ <sound event="hit">monsters/scorpion/scorpion-hit1.ogg</sound>
+ <sound event="hit">monsters/scorpion/scorpion-hit2.ogg</sound>
+ <sound event="hit">monsters/scorpion/scorpion-hit3.ogg</sound>
+ <sound event="hit">monsters/scorpion/scorpion-hit4.ogg</sound>
+ <sound event="miss">monsters/scorpion/scorpion-miss1.ogg</sound>
+ <drop item="507" percent="7"/>
+ <drop item="510" percent="1"/>
+ <drop item="509" percent="0.5"/>
+ <drop item="518" percent="7"/>
+ <exp>20</exp>
+ <attributes
+ hp="20"
+ size="8"
+ speed="6.0"
+ attack-min="10"
+ attack-delta="2"
+ attack-magic="0"
+ hit="10"
+ evade="10"
+ physical-defence="5"
+ magical-defence="0"
+ />
+ <!-- doesn't move much, but attacks when you are comming too close. -->
+ <behavior
+ aggressive="true"
+ cowardly="false"
+ track-range="2"
+ stroll-range="1"
+ attack-distance="64"
+ />
+ <!-- slow, strong, long-range tail attack-->
+ <attack id="1"
+ priority="1"
+ type="physical"
+ pre-delay="5"
+ aft-delay="15"
+ damage-factor="3"
+ range="64"
+ particle-effect="graphics/particles/attack.particle.xml"
+ action="special1"
+ />
+ <!-- fast, weak, short-range scissor attack -->
+ <attack id="2"
+ priority="4"
+ type="physical"
+ pre-delay="3"
+ aft-delay="3"
+ damage-factor="1"
+ range="32"
+ />
+ </monster>
+
+ <monster id="2" name="Red Scorpion">
+ <sprite>monsters/monster-scorpion.xml|#791d0a,cd5d27,f28d54,ffffff</sprite>
+ <sound event="hit">monsters/scorpion/scorpion-hit1.ogg</sound>
+ <sound event="hit">monsters/scorpion/scorpion-hit2.ogg</sound>
+ <sound event="hit">monsters/scorpion/scorpion-hit3.ogg</sound>
+ <sound event="hit">monsters/scorpion/scorpion-hit4.ogg</sound>
+ <sound event="miss">monsters/scorpion/scorpion-miss1.ogg</sound>
+ <drop item="517" percent="20"/>
+ <drop item="509" percent="1"/>
+ <drop item="518" percent="5"/>
+ <drop item="1200" percent="0.1"/>
+ <drop item="1199" percent="7.6"/>
+ <drop item="1201" percent="5.4"/>
+ <drop item="524" percent="0.1"/>
+ <exp>50</exp>
+ <attributes
+ hp="20"
+ size="8"
+ speed="6.0"
+ attack-min="20"
+ attack-delta="10"
+ attack-magic="0"
+ hit="30"
+ evade="30"
+ physical-defence="5"
+ magical-defence="0"
+ />
+ <!-- also quite lazy when unprovoked but much more territorial
+ than the normal one-->
+ <behavior
+ aggressive="true"
+ cowardly="false"
+ track-range="6"
+ stroll-range="1"
+ attack-distance="64"
+ />
+ <attack id="1"
+ priority="1"
+ type="physical"
+ element="fire"
+ pre-delay="5"
+ aft-delay="10"
+ damage-factor="1"
+ range="64"
+ />
+ </monster>
+
+ <monster id="3" name="Green Slime">
+ <sprite>monsters/monster-slime.xml|#72982c,ffffff</sprite>
+ <sound event="hit">monsters/slime/slime-hit1.ogg</sound>
+ <drop item="502" percent="2"/>
+ <drop item="513" percent="1"/>
+ <drop item="501" percent="1"/>
+ <drop item="521" percent="1"/>
+ <drop item="522" percent="1.9"/>
+ <drop item="526" percent="0.1"/>
+ <drop item="503" percent="5"/>
+ <drop item="535" percent="7.5"/>
+ <exp>60</exp>
+ <attributes
+ hp="200"
+ size="4"
+ speed="1.0"
+ attack-min="2"
+ attack-delta="10"
+ attack-magic="0"
+ hit="100"
+ evade="10"
+ physical-defence="0"
+ magical-defence="0"
+ />
+ <!-- Is fulfilling some unknown purpose that requires it to move around
+ a lot and leaves no time for pursing attackers -->
+ <behavior
+ aggressive="false"
+ cowardly="false"
+ track-range="4"
+ stroll-range="24"
+ attack-distance="32"
+ />
+ </monster>
+
</monsters>
+
diff --git a/example/clientdata/paths.xml b/example/clientdata/paths.xml
new file mode 100644
index 00000000..21d1fc23
--- /dev/null
+++ b/example/clientdata/paths.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!-- Use this file to override default data paths used by the system
+If this file is not used, the hard-coded defaults are the following:
+
+Files: Default paths:
+============= ===============
+(All folders listed below are relative to the data/ directory.)
+
+Default wallpaper: graphics/images/
+Default error path: graphics/images/
+
+Default items path: graphics/items/
+Default minimaps path: graphics/minimaps/
+Default particles path: graphics/particles/
+Default sprite path: graphics/sprites/
+Default maps path: maps/
+Default sfx path: sfx/
+
+Hard-coded reference files (Some could be handled differently later):
+
+Files: Default paths:
+============= ===============
+Error handling for missing sprites files: graphics/sprites/error.xml
+Level Up particle XML file: graphics/particles/levelup.particle.xml
+Warp/Portal effect XML file: graphics/particles/warparea.particle.xml
+Player unarmed attack sound effect: sfx/fist-swish.ogg
+
+You can also have a look the client data handling reference page, here:
+http://doc.manasource.org/client_data_handling
+
+Also, don't forget to add the '/' path separator at the end of folder values.
+-->
+
+<configuration>
+ <!-- Required data paths -->
+ <option name="itemIcons" value="graphics/items/" />
+ <option name="unknownItemFile" value="unknown.png" />
+ <option name="sprites" value="graphics/sprites/" />
+ <option name="spriteErrorFile" value="error.xml" />
+
+ <option name="particles" value="graphics/particles/" />
+ <option name="levelUpEffectFile" value="levelup.particle.xml" />
+ <option name="portalEffectFile" value="warparea.particle.xml" />
+
+ <option name="minimaps" value="graphics/minimaps/" />
+ <option name="maps" value="maps/" />
+
+ <option name="sfx" value="sfx/" />
+ <option name="attackSfxFile" value="fist-swish.ogg" />
+ <option name="music" value="music/" />
+
+ <option name="wallpapers" value="graphics/images/" />
+ <option name="wallpaperFile" value="login_wallpaper.png" />
+</configuration> \ No newline at end of file
diff --git a/example/clientdata/sfx/fist-swish.ogg b/example/clientdata/sfx/fist-swish.ogg
new file mode 100644
index 00000000..757d0f77
--- /dev/null
+++ b/example/clientdata/sfx/fist-swish.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/maggot/maggot-dying1.ogg b/example/clientdata/sfx/monsters/maggot/maggot-dying1.ogg
new file mode 100644
index 00000000..e05a5235
--- /dev/null
+++ b/example/clientdata/sfx/monsters/maggot/maggot-dying1.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/maggot/maggot-hit1.ogg b/example/clientdata/sfx/monsters/maggot/maggot-hit1.ogg
new file mode 100644
index 00000000..695cb483
--- /dev/null
+++ b/example/clientdata/sfx/monsters/maggot/maggot-hit1.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/maggot/maggot-hit2.ogg b/example/clientdata/sfx/monsters/maggot/maggot-hit2.ogg
new file mode 100644
index 00000000..12d92bb9
--- /dev/null
+++ b/example/clientdata/sfx/monsters/maggot/maggot-hit2.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/maggot/maggot-miss1.ogg b/example/clientdata/sfx/monsters/maggot/maggot-miss1.ogg
new file mode 100644
index 00000000..a251bf97
--- /dev/null
+++ b/example/clientdata/sfx/monsters/maggot/maggot-miss1.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/scorpion/scorpion-hit1.ogg b/example/clientdata/sfx/monsters/scorpion/scorpion-hit1.ogg
new file mode 100644
index 00000000..d0cf8d03
--- /dev/null
+++ b/example/clientdata/sfx/monsters/scorpion/scorpion-hit1.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/scorpion/scorpion-hit2.ogg b/example/clientdata/sfx/monsters/scorpion/scorpion-hit2.ogg
new file mode 100644
index 00000000..04521d63
--- /dev/null
+++ b/example/clientdata/sfx/monsters/scorpion/scorpion-hit2.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/scorpion/scorpion-hit3.ogg b/example/clientdata/sfx/monsters/scorpion/scorpion-hit3.ogg
new file mode 100644
index 00000000..283efff2
--- /dev/null
+++ b/example/clientdata/sfx/monsters/scorpion/scorpion-hit3.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/scorpion/scorpion-hit4.ogg b/example/clientdata/sfx/monsters/scorpion/scorpion-hit4.ogg
new file mode 100644
index 00000000..bef67872
--- /dev/null
+++ b/example/clientdata/sfx/monsters/scorpion/scorpion-hit4.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/scorpion/scorpion-miss1.ogg b/example/clientdata/sfx/monsters/scorpion/scorpion-miss1.ogg
new file mode 100644
index 00000000..264fe44e
--- /dev/null
+++ b/example/clientdata/sfx/monsters/scorpion/scorpion-miss1.ogg
Binary files differ
diff --git a/example/clientdata/sfx/monsters/slime/slime-hit1.ogg b/example/clientdata/sfx/monsters/slime/slime-hit1.ogg
new file mode 100644
index 00000000..decf40ae
--- /dev/null
+++ b/example/clientdata/sfx/monsters/slime/slime-hit1.ogg
Binary files differ
diff --git a/example/clientdata/specials.xml b/example/clientdata/specials.xml
new file mode 100644
index 00000000..d49f12b3
--- /dev/null
+++ b/example/clientdata/specials.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<specials>
+ <set name="Magic">
+ <special id="1" name="Test Spell 1" />
+ <special id="2" name="Test Spell 2" />
+ <special id="3" name="Test Spell 3" />
+ </set>
+</specials>
diff --git a/example/clientdata/units.xml b/example/clientdata/units.xml
new file mode 100644
index 00000000..265318f2
--- /dev/null
+++ b/example/clientdata/units.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<units>
+ <unit type="currency" base="GP" round="0"/>
+ <unit type="weight" base="g" round="0">
+ <level symbol="kg" count="1000" round="2"/>
+ </unit>
+</units>
diff --git a/example/serverdata/scripts/global_events.lua b/example/serverdata/scripts/global_events.lua
index 51047e90..90b096cd 100644
--- a/example/serverdata/scripts/global_events.lua
+++ b/example/serverdata/scripts/global_events.lua
@@ -18,40 +18,61 @@
----------------------------------------------------------------------------------
-
--- This function is called when the hit points of a character reach zero.
+-- This function is called when the hit points of a character reach zero.
function on_chr_death(ch)
+ mana.being_say(ch, "Noooooo!!!")
end
--- This function is called when the player clicks on the “OK” button after
--- the death message appeared. It should be used to implement the respawn
--- mechanic (for example: warp the character to the respawn location and
--- bring HP above zero in some way)
+-- This function is called when the player clicks on the �OK� button after
+-- the death message appeared. It should be used to implement the respawn
+-- mechanic (for example: warp the character to the respawn location and
+-- bring HP above zero in some way)
function on_chr_death_accept(ch)
+ mana.being_heal(ch) -- restores to full hp
+ -- mana.being_heal(ch, 1) --restores 1 hp (in case you want to be less nice)
+ -- mana.chr_warp(ch, 1, 2000, 2000) --warp the character to the respawn location
end
-- This function is called after chr_death_accept. The difference is that
-- it is called in the context of the map the character is spawned on after
--- the respawn logic has happened.
+-- the respawn logic has happened.
function on_chr_respawn(ch)
- mana.being_heal()
+ -- calls the local_respawn_function of the map the character respawned
+ -- on when the script of the map has one
+ if local_respawn_function ~= nil then
+ local_respawn_function(ch)
+ end
end
-- This function is called when a new character enters the world for the
-- first time. This can, for example, be used to give starting equipment
--- to the character and/or initialize a tutorial quest.
+-- to the character and/or initialize a tutorial quest.
function on_chr_birth(ch)
+ -- this message is shown on first login.
+ mana.chatmessage(0, ch, "And so your adventure begins...")
end
-- This function is called when a character logs into the game. This can,
-- for example, be utilized for a message-of-the-day or for various
--- handlings of offline processing mechanics.
+-- handlings of offline processing mechanics.
function on_chr_login(ch)
+ mana.chatmessage(0, ch, "Welcome to Manasource")
end
-- This function is called when a character is disconnected. This could
-- be useful for various handling of offline processing mechanics.
function on_chr_logout(ch)
+ -- notifies nearby players of logout
+ local around = mana.get_beings_in_circle(
+ posX(ch),
+ posY(ch),
+ 1000)
+ local msg = mana.being_get_name(ch).." left the game."
+ for b in pairs(around) do
+ if mana.being_type(b) == TYPE_CHARACTER then
+ mana.chatmessage(0, b, msg)
+ end
+ end
end
diff --git a/example/serverdata/scripts/items/candy.lua b/example/serverdata/scripts/items/candy.lua
new file mode 100644
index 00000000..a740ce6a
--- /dev/null
+++ b/example/serverdata/scripts/items/candy.lua
@@ -0,0 +1,17 @@
+-------------------------------------------------------------
+-- Example use script. Makes the player character say --
+-- "*munch*munch*munch*" when using this item. --
+-- The HP regeneration effect is handled separately based --
+-- on the heal value in items.xml --
+----------------------------------------------------------------------------------
+-- Copyright 2009 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. --
+----------------------------------------------------------------------------------
+function use(user)
+ mana.being_say(user, "*munch*munch*munch*")
+end
diff --git a/example/serverdata/scripts/monster/testmonster.lua b/example/serverdata/scripts/monster/testmonster.lua
new file mode 100644
index 00000000..9938943b
--- /dev/null
+++ b/example/serverdata/scripts/monster/testmonster.lua
@@ -0,0 +1,26 @@
+----------------------------------------------------------------------------------
+-- Copyright 2009 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. --
+----------------------------------------------------------------------------------
+
+function update(mob)
+ local r = math.random(0, 200);
+ if r == 0 then
+ mana.being_say(mob, "Roar! I am a boss")
+ end
+end
+
+function strike(mob, victim, hit)
+ if hit > 0 then
+ mana.being_say(mob, "Take this! "..hit.." damage!")
+ mana.being_say(victim, "Oh Noez!")
+ else
+ mana.being_say(mob, "Oh no, my attack missed!")
+ mana.being_say(victim, "Whew...")
+ end
+end
diff --git a/example/serverdata/scripts/npcs/banker.lua b/example/serverdata/scripts/npcs/banker.lua
new file mode 100644
index 00000000..79d6af6d
--- /dev/null
+++ b/example/serverdata/scripts/npcs/banker.lua
@@ -0,0 +1,74 @@
+----------------------------------------------------------
+-- Banker Function --
+----------------------------------------------------------------------------------
+-- 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. --
+----------------------------------------------------------------------------------
+
+function Banker(npc, ch)
+ do_message(npc, ch, "Welcome to the bank!")
+ local account = tonumber(get_quest_var(ch, "BankAccount"))
+ local result = -1
+ do_wait()
+
+ if (account == nil) then --Initial account creation, if needed
+ do_message(npc, ch, "Hello! Would you like to setup a bank account? There is a sign-on bonus right now!")
+ result = do_choice(npc, ch, "Yes", "No")
+ if (result == 1) then
+ mana.chr_set_quest(ch, "BankAccount", 5)
+ do_message(npc, ch, "Your account has been made. Your sign-on bonus is 5GP.")
+ account = 5
+ end
+ end
+
+ if (account ~= nil) then --If the player has an account
+ local money = 0
+ local input = 0
+ result = 1
+ while (result < 3) do --While they've choosen a valid option that isn't "Never mind"
+ account = tonumber(get_quest_var(ch, "BankAccount")) --Why do I need to convert this?
+ do_message(npc, ch, "Your balance: " .. account .. ".\nYour money: " .. mana.chr_money(ch) .. ".")
+ result = do_choice(npc, ch, "Deposit", "Withdraw", "Never mind")
+ if (result == 1) then --Deposit
+ money = mana.chr_money(ch);
+ if (money > 0) then --Make sure they have money to deposit
+ do_message(npc, ch, "How much would you like to deposit? (0 will cancel)")
+ input = do_ask_integer(npc, ch, 0, money, 1)
+ do_wait()
+ money = mana.chr_money(ch)
+ if (input > 0 and input <= money) then --Make sure something weird doesn't happen and they try to deposit more than they have
+ mana.chr_money_change(ch, -input)
+ mana.chr_set_quest(ch, "BankAccount", account + input)
+ do_message(npc, ch, input .. " GP deposited.")
+ elseif (input > money) then --Chosen more than they have
+ do_message(npc, ch, "You don't have that much money. But you just did....")
+ end
+ else
+ do_message(npc, ch, "You don't have any money to deposit!")
+ end
+ elseif (result == 2) then --Withdraw
+ if (account > 0) then --Make sure they have money to withdraw
+ do_message(npc, ch, "How much would you like to withdraw? (0 will cancel)")
+ input = do_ask_integer(npc, ch, 0, account, 1)
+ if (input > 0 and input <= account) then --Make sure something weird doesn't happen and they try to withdraw more than they have
+ mana.chr_money_change(ch, input)
+ mana.chr_set_quest(ch, "BankAccount", account - input)
+ do_message(npc, ch, input .. " GP withdrawn.")
+ elseif (input > account) then --Chosen more than they have
+ do_message(npc, ch, "You don't have that much in your account. But you just did....")
+ end
+ else
+ do_message(npc, ch, "Your account is empty!")
+ end
+ end
+ end --This ends the while loop
+ end
+
+ do_message(npc, ch, "Thank you. Come again!")
+ do_npc_close(npc, ch)
+end
diff --git a/example/serverdata/scripts/npcs/barber.lua b/example/serverdata/scripts/npcs/barber.lua
new file mode 100644
index 00000000..24ad8c9b
--- /dev/null
+++ b/example/serverdata/scripts/npcs/barber.lua
@@ -0,0 +1,141 @@
+----------------------------------------------------------
+-- Barber Function --
+----------------------------------------------------------------------------------
+-- Copyright 2009 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. --
+----------------------------------------------------------------------------------
+
+local barber_styles = {"Flat ponytail", "Bowl cut","Combed back", "Emo", "Mohawk",
+ "Pompadour", "Center parting/Short and slick", "Long and slick", "Short and curly",
+ "Pigtails", "Long and curly", "Parted", "Perky ponytail", "Wave", "Mane", "Bun"}
+
+local barber_colors = {"Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde",
+ "Teal", "Light red", "Blue", "Dark purple", "Black"}
+
+function Barber(npc, ch, data)
+ local style_ids = nil
+ local color_ids = nil
+
+ -- If extra data was passed, let's have a look at it
+ if data ~= nil then
+ style_ids = data[1]
+ if #data > 1 then
+ color_ids = data[2]
+ end
+ end
+
+ -- Setup up default styles (if needed)
+ if style_ids == nil then
+ style_ids = {}
+ for i = 1, 13 do
+ style_ids[i] = i
+ end
+ end
+
+ -- Setup up default colors (if needed)
+ if color_ids == nil then
+ color_ids = {}
+ for i = 1, 11 do
+ color_ids[i] = i
+ end
+ end
+
+ -- Nothing to show? Then we can return
+ if #color_ids == 0 and #style_ids == 0 then
+ return -- Since we haven't shown any windows, we can safely
+ -- return without a do_npc_close
+ end
+
+ local result = 0
+
+ local styles = {}
+
+ -- If we have style IDs, lets get their names
+ if #style_ids > 0 then
+ for i = 1, #style_ids do
+ styles[i] = barber_styles[style_ids[i]]
+ end
+ result = 1
+ end
+
+ local colors = {}
+
+ -- If we have color style IDs, lets get their names
+ if #color_ids > 0 then
+ for i = 1, #color_ids do
+ colors[i] = barber_colors[color_ids[i]]
+ end
+
+ if result == 0 then
+ result = 2
+ else
+ result = 3
+ end
+ end
+
+ -- Choose an appropriate message
+ if result == 1 then
+ do_message(npc, ch, "Hello! What style would you like today?")
+ elseif result == 2 then
+ do_message(npc, ch, "Hello! What color would you like today?")
+ else
+ do_message(npc, ch, "Hello! What can I do for you today?")
+ end
+
+ print("#styles ==", #styles)
+
+ -- 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 = result -1
+
+ --Random
+ if (result == #styles + 1) then
+ result = math.random(#styles + 1) - 1
+ print("Random")
+ end
+
+ print("Style ==", result)
+
+ if (result == 0) then
+ mana.chr_set_hair_style(ch, 0)
+ result = 1
+ elseif (result <= #styles) then
+ mana.chr_set_hair_style(ch, style_ids[result])
+ result = 1
+ else --"Never mind"
+ result = 3
+ end
+ elseif (result == 2) then -- Do colors
+ result = do_choice(npc, ch, colors, "Supprise me", "Never mind")
+
+ --Random
+ if (result == #colors + 1) then
+ result = math.random(#colors)
+ end
+
+ if (result <= #colors) then
+ mana.chr_set_hair_color(ch, color_ids[result - 1])
+ result = 2
+ else --"Never mind"
+ result = 3
+ end
+ end
+
+ -- If we have both styles and colors, show the main menu
+ if #styles > 0 and #colors > 0 then
+ result = do_choice(npc, ch, "Change my style", "Change my color", "Never mind")
+ end
+ until result >= 3 --While they've choosen a valid option that isn't "Never mind"
+
+ -- Let's close up
+ do_message(npc, ch, "Thank you. Come again!")
+ do_npc_close(npc, ch)
+end
diff --git a/example/serverdata/scripts/npcs/debugger.lua b/example/serverdata/scripts/npcs/debugger.lua
new file mode 100644
index 00000000..6bb86d0a
--- /dev/null
+++ b/example/serverdata/scripts/npcs/debugger.lua
@@ -0,0 +1,101 @@
+----------------------------------------------------------
+-- Seller Function Sample --
+----------------------------------------------------------------------------------
+-- Copyright 2009-2010 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. --
+----------------------------------------------------------------------------------
+
+function npc1_talk(npc, ch)
+ on_remove(ch, function() print "Player has left the map." end);
+ do_message(npc, ch, "Hello! I am the testing NPC.")
+ local rights = mana.chr_get_rights(ch);
+
+ if (rights >= 128) then
+ do_message(npc, ch, "Oh mighty server administrator, how can I avoid your wrath?")
+ elseif (rights >= 8) then
+ do_message(npc, ch, "How can I be of assistance, sir gamemaster?")
+ elseif (rights >= 4) then
+ do_message(npc, ch, "What feature would you like to debug, developer?")
+ elseif (rights >= 2) then
+ do_message(npc, ch, "How can I assist you in your testing duties?")
+ elseif (rights >= 1) then
+ do_message(npc, ch, "What do you want, lowly player?")
+ else
+ do_message(npc, ch, "...aren't you supposed to be banned??")
+ end
+
+ local v = do_choice(npc, ch, "Guns! Lots of guns!",
+ "A Christmas party!",
+ "To make a donation.",
+ "Slowly count from one to ten.",
+ "Tablepush Test")
+ if v == 1 then
+ do_message(npc, ch, "Sorry, this is a heroic-fantasy game, I do not have any gun.")
+
+ elseif v == 2 then
+ local n1, n2 = mana.chr_inv_count(ch, 524, 511)
+ if n1 == 0 or n2 ~= 0 then
+ do_message(npc, ch, "Yeah right...")
+ else
+ do_message(npc, ch, "I can't help you with the party. But I see you have a fancy hat. I could change it into Santa's hat. Not much of a party, but it would get you going.")
+ v = do_choice(npc, ch, "Please do.", "No way! Fancy hats are classier.")
+ if v == 1 then
+ mana.chr_inv_change(ch, 524, -1, 511, 1)
+ end
+ end
+
+ elseif v == 3 then
+ if mana.chr_money_change(ch, -100) then
+ do_message(npc, ch, string.format("Thank you for you patronage! You are left with %d GP.", mana.chr_money(ch)))
+ local g = tonumber(get_quest_var(ch, "001_donation"))
+ if not g then g = 0 end
+ g = g + 100
+ mana.chr_set_quest(ch, "001_donation", g)
+ do_message(npc, ch, string.format("As of today, you have donated %d GP.", g))
+ else
+ do_message(npc, ch, "I would feel bad taking money from someone that poor.")
+ end
+
+ elseif v == 4 then
+ mana.being_say(npc, "As you wish...")
+ schedule_in(2, function() mana.being_say(npc, "One") end)
+ schedule_in(4, function() mana.being_say(npc, "Two") end)
+ schedule_in(6, function() mana.being_say(npc, "Three") end)
+ schedule_in(8, function() mana.being_say(npc, "Four") end)
+ schedule_in(10, function() mana.being_say(npc, "Five") end)
+ schedule_in(12, function() mana.being_say(npc, "Six") end)
+ schedule_in(14, function() mana.being_say(npc, "Seven") end)
+ schedule_in(16, function() mana.being_say(npc, "Eight") end)
+ schedule_in(18, function() mana.being_say(npc, "Nine") end)
+ schedule_in(20, function() mana.being_say(npc, "Ten") end)
+
+ elseif v == 5 then
+ function printTable (t)
+ for k,v in pairs(t) do
+ print (k, ":", v)
+ end
+ end
+ local t1, t2, t3, t4, t5 = mana.test_tableget();
+ print("---------------");
+ print ("Table 1:");
+ printTable (t1)
+ print ("Table 2:");
+ printTable (t2)
+ print ("Table 3:");
+ printTable (t3)
+ print ("Table 4:");
+ printTable (t4)
+ print ("Table 5:");
+ printTable (t5)
+ print("---------------");
+ end
+
+ do_message(npc, ch, "See you later!")
+ do_npc_close(npc, ch)
+end
+
diff --git a/example/serverdata/scripts/npcs/emotemaker.lua b/example/serverdata/scripts/npcs/emotemaker.lua
new file mode 100644
index 00000000..2e68aa2c
--- /dev/null
+++ b/example/serverdata/scripts/npcs/emotemaker.lua
@@ -0,0 +1,46 @@
+----------------------------------------------------------
+-- Emote use Function Sample --
+----------------------------------------------------------------------------------
+-- Copyright 2009-2010 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. --
+----------------------------------------------------------------------------------
+
+emo_count = 0
+emo_state = EMOTE_SURPRISE
+
+function emote_talk(npc, ch)
+ if emo_state == EMOTE_SURPRISE then
+ state = "confused"
+ elseif emo_state == EMOTE_SAD then
+ state = "sad"
+ elseif emo_state == EMOTE_HAPPY then
+ state = "happy"
+ end
+ do_message(npc, ch, string.format("The emotional palm seems %s.", state))
+ v = do_choice(npc, ch,
+ "Stupid palm, you are ugly and everyone hates you!",
+ "You are such a nice palm, let me give you a hug.",
+ "Are you a cocos nucifera or a syagrus romanzoffiana?")
+
+ if (v == 1) then
+ emo_state = EMOTE_SAD
+ elseif (v == 2) then
+ emo_state = EMOTE_HAPPY
+ elseif (v == 3) then
+ emo_state = EMOTE_SURPRISE
+ end
+ do_npc_close(npc, ch)
+end
+
+function emote_update(npc)
+ emo_count = emo_count + 1
+ if emo_count > 50 then
+ emo_count = 0
+ mana.effect_create(emo_state, npc)
+ end
+end
diff --git a/example/serverdata/scripts/npcs/healer.lua b/example/serverdata/scripts/npcs/healer.lua
new file mode 100644
index 00000000..96d29111
--- /dev/null
+++ b/example/serverdata/scripts/npcs/healer.lua
@@ -0,0 +1,23 @@
+----------------------------------------------------------
+-- Healer Function Sample --
+----------------------------------------------------------------------------------
+-- Copyright 2009-2010 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. --
+----------------------------------------------------------------------------------
+
+function Healer(npc, ch)
+ do_message(npc, ch, "Do you need healing?")
+ local c = do_choice(npc, ch, "Heal me fully", "Heal 100 HP", "Don't heal me")
+ if c == 1 then
+ mana.being_heal(ch)
+ elseif c == 2 then
+ mana.being_heal(ch, 100)
+ end
+
+ do_npc_close(npc, ch)
+end
diff --git a/example/serverdata/scripts/npcs/postman.lua b/example/serverdata/scripts/npcs/postman.lua
new file mode 100644
index 00000000..68546bf8
--- /dev/null
+++ b/example/serverdata/scripts/npcs/postman.lua
@@ -0,0 +1,31 @@
+----------------------------------------------------------
+-- Postman Function Sample --
+----------------------------------------------------------------------------------
+-- Copyright 2009-2010 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. --
+----------------------------------------------------------------------------------
+
+function post_talk(npc, ch)
+ do_message(npc, ch, "Hello " .. mana.being_get_name(ch))
+ local strength = mana.being_get_attribute(ch, ATTR_STRENGTH)
+ do_message(npc, ch, "You have " .. tostring(strength) .. " strength")
+ do_message(npc, ch, "What would you like to do?")
+ local answer = do_choice(npc, ch, "View Mail", "Send Mail", "Nothing")
+ if answer == 1 then
+ local sender, post = getpost(ch)
+ if sender == "" then
+ do_message(npc, ch, "No Post right now, sorry")
+ else
+ do_message(npc, ch, tostring(sender) .. " sent you " .. tostring(post))
+ end
+ end
+ if answer == 2 then
+ do_post(npc, ch)
+ end
+ do_npc_close(npc, ch)
+end
diff --git a/example/serverdata/scripts/npcs/seller.lua b/example/serverdata/scripts/npcs/seller.lua
new file mode 100644
index 00000000..c809f3e2
--- /dev/null
+++ b/example/serverdata/scripts/npcs/seller.lua
@@ -0,0 +1,73 @@
+----------------------------------------------------------
+-- Seller Function Sample --
+----------------------------------------------------------------------------------
+-- Copyright 2009-2010 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. --
+----------------------------------------------------------------------------------
+
+function Seller(npc, ch)
+ do_message(npc, ch, "Hello! What can I provide you today?")
+ local rights = mana.chr_get_rights(ch);
+
+ if (rights >= 128) then
+ do_message(npc, ch, "Oh mighty server administrator, how can I avoid your wrath?")
+ elseif (rights >= 8) then
+ do_message(npc, ch, "How can I be of assistance, sir gamemaster?")
+ elseif (rights >= 4) then
+ do_message(npc, ch, "What feature would you like to debug, developer?")
+ elseif (rights >= 2) then
+ do_message(npc, ch, "How can I assist you in your testing duties?")
+ elseif (rights >= 1) then
+ do_message(npc, ch, "What do you want, lowly player?")
+ else
+ do_message(npc, ch, "...Aren't you supposed to be banned??")
+ end
+
+ local v = do_choice(npc, ch, "To buy...",
+ "To sell stuff...",
+ "Can you make me a price for what I have?")
+ if v == 1 then
+ -- "To buy."
+ local buycase = mana.npc_trade(npc, ch, false, { {1, 10, 20}, {2, 10, 30}, {3, 10, 50} })
+ if buycase == 0 then
+ do_message(npc, ch, "What do you want to buy?")
+ elseif buycase == 1 then
+ do_message(npc, ch, "I've got no items to sell.")
+ else
+ do_message(npc, ch, "Hmm, something went wrong... Ask a scripter to fix the buying mode!")
+ end
+
+ elseif v == 2 then
+
+ -- "To sell stuff..."
+ local sellcase = mana.npc_trade(npc, ch, true)
+ if sellcase == 0 then
+ do_message(npc, ch, "Ok, what do you want to sell?")
+ elseif sellcase == 1 then
+ do_message(npc, ch, "I'm not interested by any of your items.")
+ else
+ do_message(npc, ch, "Hmm, something went wrong... Ask a scripter to fix this!")
+ end
+
+ elseif v == 3 then
+
+ -- "Can you make me a price for what I have?"
+ local sellcase = mana.npc_trade(npc, ch, true, { {4, 10, 20}, {5, 10, 30}, {6, 10, 200}, {7, 10, 300} })
+ if sellcase == 0 then
+ do_message(npc, ch, "Here we go:")
+ elseif sellcase == 1 then
+ do_message(npc, ch, "I'm not that interested in any of your items.")
+ else
+ do_message(npc, ch, "Hmm, something went wrong... Ask a scripter to fix me!")
+ end
+
+ end
+ do_message(npc, ch, "See you later!")
+ do_npc_close(npc, ch)
+end
+
diff --git a/example/serverdata/scripts/status/jump.lua b/example/serverdata/scripts/status/jump.lua
new file mode 100644
index 00000000..3410747a
--- /dev/null
+++ b/example/serverdata/scripts/status/jump.lua
@@ -0,0 +1,53 @@
+-------------------------------------------------------------
+-- This status jumps from being to being --
+-- Thats all it does. --
+----------------------------------------------------------------------------------
+-- Copyright 2009 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. --
+----------------------------------------------------------------------------------
+
+
+function tick(target, ticknumber)
+ if (ticknumber % 10 == 0) then
+ mana.being_say(target, "I have the jumping bug!")
+ end
+
+ if (mana.being_get_status_time(target, 2) < 2000) then
+ mana.being_set_status_time(target, 2, 6000)
+ end
+
+ if (ticknumber % 50 ~= 0) then return end
+
+ local victims = mana.get_beings_in_circle(mana.posX(target), mana.posY(target), 64)
+ local count = #victims
+
+ if i == 0 then return end
+
+ local i
+ local remaining = 1000
+ local victim = nil
+
+ repeat
+ remaining = remaining - 1
+ i = math.random(count)
+ victim = victims[i]
+ if (victim == target) then
+ victim = nil
+ i = -1
+ else
+ i = mana.being_type(victim)
+ end
+ until (i == TYPE_MONSTER or i == TYPE_CHARACTER or remaining == 0)
+
+ if (victim == nil) then return end
+
+ mana.being_remove_status(target, 2)
+
+ mana.being_apply_status(victim, 2, 6000)
+ mana.being_say(victim, "Now I have the jumping bug")
+end
diff --git a/example/serverdata/scripts/status/plague.lua b/example/serverdata/scripts/status/plague.lua
new file mode 100644
index 00000000..5f98268e
--- /dev/null
+++ b/example/serverdata/scripts/status/plague.lua
@@ -0,0 +1,28 @@
+-------------------------------------------------------------
+-- This when applied to a being will spread from one being --
+-- to another --
+-- Thats all it does. --
+----------------------------------------------------------------------------------
+-- Copyright 2009 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. --
+----------------------------------------------------------------------------------
+
+function tick(target, ticknumber)
+ if (ticknumber % 10 == 0) then
+ mana.being_say(target, "I have the plague! :( = " .. ticknumber)
+ end
+ local victims = mana.get_beings_in_circle(mana.posX(target), mana.posY(target), 64)
+ local i = 1
+ while (victims[i]) do
+ if (mana.being_has_status(victims[i], 1) == false) then
+ mana.being_apply_status(victims[i], 1, 6000)
+ mana.being_say(victims[i], "I don't feel so good")
+ end
+ i = i + 1
+ end
+end