From c1a6e9947231cc511016378bd326a5d64b0aa18c Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Wed, 27 Apr 2011 15:24:36 +0200 Subject: Added a simple crafting system A client can craft something using the @craft command. The command needs a list of item names and amounts. The gameserver checks if the character has these items in the inventory and then passes the list together with the character handle to the lua script function on_craft in the script file scripts/crafting.lua. This function can then be used to evaluate if the list is a valid crafting combination and when this is the case take or give items. Implemented two example crafting scripts there, one which enforces exact item order and amount and one which doesn't. Both are disabled per default and one needs to be enabled by uncommenting a line. Also gave the player group permission to use the @craft command in permissions.xml and added two new items (wood and iron) required for the example crafting combination. Resolves: #333 Reviewed-by: bcs86, Bertram --- .../clientdata/graphics/items/crafting/generic-ingot.png | Bin 0 -> 1615 bytes .../graphics/items/crafting/generic-rawlog.png | Bin 0 -> 1719 bytes example/clientdata/items.xml | 10 ++++++++++ 3 files changed, 10 insertions(+) create mode 100644 example/clientdata/graphics/items/crafting/generic-ingot.png create mode 100644 example/clientdata/graphics/items/crafting/generic-rawlog.png (limited to 'example/clientdata') diff --git a/example/clientdata/graphics/items/crafting/generic-ingot.png b/example/clientdata/graphics/items/crafting/generic-ingot.png new file mode 100644 index 0000000..0dc7b1e Binary files /dev/null and b/example/clientdata/graphics/items/crafting/generic-ingot.png differ diff --git a/example/clientdata/graphics/items/crafting/generic-rawlog.png b/example/clientdata/graphics/items/crafting/generic-rawlog.png new file mode 100644 index 0000000..038d5a5 Binary files /dev/null and b/example/clientdata/graphics/items/crafting/generic-rawlog.png differ diff --git a/example/clientdata/items.xml b/example/clientdata/items.xml index ff0b1c5..6f72185 100644 --- a/example/clientdata/items.xml +++ b/example/clientdata/items.xml @@ -160,4 +160,14 @@ equipment/chest/chest-leather-male.xml equipment/chest/chest-leather-female.xml + + + + -- cgit