From eee8b9997ad63cc136adc6d158086304c6293dd2 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Fri, 24 May 2019 22:16:50 -0300
Subject: Move craft/ to toplevel

---
 npc/craft/alchemy.txt           | 45 +++++++++++++++++++++++++++++++++++++++++
 npc/craft/smith.txt             | 41 +++++++++++++++++++++++++++++++++++++
 npc/functions/craft/alchemy.txt | 45 -----------------------------------------
 npc/functions/craft/smith.txt   | 41 -------------------------------------
 npc/scripts.conf                |  4 ++--
 5 files changed, 88 insertions(+), 88 deletions(-)
 create mode 100644 npc/craft/alchemy.txt
 create mode 100644 npc/craft/smith.txt
 delete mode 100644 npc/functions/craft/alchemy.txt
 delete mode 100644 npc/functions/craft/smith.txt

diff --git a/npc/craft/alchemy.txt b/npc/craft/alchemy.txt
new file mode 100644
index 000000000..e23416596
--- /dev/null
+++ b/npc/craft/alchemy.txt
@@ -0,0 +1,45 @@
+// TMW2 Script
+// Author:
+//  Jesusalva
+// Description:
+//  Alchemy System (Player, Guild, NPC)
+// Notes:
+//  Base for Evol MR
+
+// Usage: AlchemySystem ({scope})
+// Scopes: CRAFT_NPC, CRAFT_PLAYER, CRAFT_GUILD
+// If an invalid scope is passed, .knowledge won't be set but will be required
+// Returns true on success, false on failure
+function	script	AlchemySystem	{
+    // Set .scope, .knowledge and .success
+    .scope=getarg(0, CRAFT_PLAYER);
+    if (.scope == CRAFT_PLAYER)
+    {
+        copyarray(.knowledge,RECIPES_ALCHEMY,getarraysize(RECIPES_ALCHEMY));
+    }
+    else if (.scope == CRAFT_GUILD)
+    {
+       copyarray( .knowledge,getd("$RECIPES_ALCHEMY_"+getcharid(2)),getarraysize(getd("$RECIPES_ALCHEMY_"+getcharid(2))) );
+    }
+    .success=false;
+
+    setskin "craft2";
+    .@var$ = requestcraft(2);
+    .@craft = initcraft(.@var$);
+    .@entry = findcraftentry(.@craft, CRAFT_ALCHEMY);
+    if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
+    if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry];
+    if (.@entry < 0) {
+            .success=false;
+    } else {
+        if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
+            usecraft .@craft;
+            .success=true;
+        } else {
+            .success=false;
+        }
+    }
+    deletecraft .@craft;
+    setskin "";
+    return .success;
+}
diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt
new file mode 100644
index 000000000..d75f30d92
--- /dev/null
+++ b/npc/craft/smith.txt
@@ -0,0 +1,41 @@
+// TMW2 Script
+// Author:
+//  Jesusalva
+// Description:
+//  Smith System (Player, Guild, NPC)
+// Notes:
+//  Base for Evol MR
+
+// Usage: SmithSystem ({scope})
+// Scopes: CRAFT_NPC, CRAFT_PLAYER, CRAFT_GUILD
+// If an invalid scope is passed, .knowledge won't be set but will be required
+// Returns true on success, false on failure
+function	script	SmithSystem	{
+    // Set .scope, .knowledge and .success
+    .scope=getarg(0, CRAFT_PLAYER);
+    if (.scope == CRAFT_PLAYER)
+        copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT));
+    else if (.scope == CRAFT_GUILD)
+        copyarray(.knowledge,$@RECIPES_EQUIPMENT[getcharid(2)],getarraysize($@RECIPES_EQUIPMENT[getcharid(2)]));
+    .success=false;
+
+    setskin "craft4";
+    .@var$ = requestcraft(4);
+    .@craft = initcraft(.@var$);
+    .@entry = findcraftentry(.@craft, CRAFT_EQUIPMENT);
+    if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
+    if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry];
+    if (.@entry < 0) {
+            .success=false;
+    } else {
+        if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
+            usecraft .@craft;
+            .success=true;
+        } else {
+            .success=false;
+        }
+    }
+    deletecraft .@craft;
+    setskin "";
+    return .success;
+}
diff --git a/npc/functions/craft/alchemy.txt b/npc/functions/craft/alchemy.txt
deleted file mode 100644
index e23416596..000000000
--- a/npc/functions/craft/alchemy.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-// TMW2 Script
-// Author:
-//  Jesusalva
-// Description:
-//  Alchemy System (Player, Guild, NPC)
-// Notes:
-//  Base for Evol MR
-
-// Usage: AlchemySystem ({scope})
-// Scopes: CRAFT_NPC, CRAFT_PLAYER, CRAFT_GUILD
-// If an invalid scope is passed, .knowledge won't be set but will be required
-// Returns true on success, false on failure
-function	script	AlchemySystem	{
-    // Set .scope, .knowledge and .success
-    .scope=getarg(0, CRAFT_PLAYER);
-    if (.scope == CRAFT_PLAYER)
-    {
-        copyarray(.knowledge,RECIPES_ALCHEMY,getarraysize(RECIPES_ALCHEMY));
-    }
-    else if (.scope == CRAFT_GUILD)
-    {
-       copyarray( .knowledge,getd("$RECIPES_ALCHEMY_"+getcharid(2)),getarraysize(getd("$RECIPES_ALCHEMY_"+getcharid(2))) );
-    }
-    .success=false;
-
-    setskin "craft2";
-    .@var$ = requestcraft(2);
-    .@craft = initcraft(.@var$);
-    .@entry = findcraftentry(.@craft, CRAFT_ALCHEMY);
-    if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
-    if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry];
-    if (.@entry < 0) {
-            .success=false;
-    } else {
-        if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
-            usecraft .@craft;
-            .success=true;
-        } else {
-            .success=false;
-        }
-    }
-    deletecraft .@craft;
-    setskin "";
-    return .success;
-}
diff --git a/npc/functions/craft/smith.txt b/npc/functions/craft/smith.txt
deleted file mode 100644
index d75f30d92..000000000
--- a/npc/functions/craft/smith.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-// TMW2 Script
-// Author:
-//  Jesusalva
-// Description:
-//  Smith System (Player, Guild, NPC)
-// Notes:
-//  Base for Evol MR
-
-// Usage: SmithSystem ({scope})
-// Scopes: CRAFT_NPC, CRAFT_PLAYER, CRAFT_GUILD
-// If an invalid scope is passed, .knowledge won't be set but will be required
-// Returns true on success, false on failure
-function	script	SmithSystem	{
-    // Set .scope, .knowledge and .success
-    .scope=getarg(0, CRAFT_PLAYER);
-    if (.scope == CRAFT_PLAYER)
-        copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT));
-    else if (.scope == CRAFT_GUILD)
-        copyarray(.knowledge,$@RECIPES_EQUIPMENT[getcharid(2)],getarraysize($@RECIPES_EQUIPMENT[getcharid(2)]));
-    .success=false;
-
-    setskin "craft4";
-    .@var$ = requestcraft(4);
-    .@craft = initcraft(.@var$);
-    .@entry = findcraftentry(.@craft, CRAFT_EQUIPMENT);
-    if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
-    if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry];
-    if (.@entry < 0) {
-            .success=false;
-    } else {
-        if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
-            usecraft .@craft;
-            .success=true;
-        } else {
-            .success=false;
-        }
-    }
-    deletecraft .@craft;
-    setskin "";
-    return .success;
-}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index ef41340c9..6eae66be8 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -76,8 +76,8 @@
 "npc/items/teleporter.txt",
 
 // Crafting System
-"npc/functions/craft/alchemy.txt",
-"npc/functions/craft/smith.txt",
+"npc/craft/alchemy.txt",
+"npc/craft/smith.txt",
 
 // custom atcommands
 "npc/commands/music.txt",
-- 
cgit v1.2.3-70-g09d2