summaryrefslogtreecommitdiff
path: root/npc/craft
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-07 22:38:33 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-07 22:38:33 -0300
commitf83f19557ca7951ef05ea66990d288020d0bc16d (patch)
treeb941002a6fe83179caf5117b740d2ca58692e961 /npc/craft
parent967a4cf3d9ebf7a037b8110d0269ab77dc4267e6 (diff)
downloadserverdata-f83f19557ca7951ef05ea66990d288020d0bc16d.tar.gz
serverdata-f83f19557ca7951ef05ea66990d288020d0bc16d.tar.bz2
serverdata-f83f19557ca7951ef05ea66990d288020d0bc16d.tar.xz
serverdata-f83f19557ca7951ef05ea66990d288020d0bc16d.zip
Remove entirely Guild Equipment Knowledge Base.
Replace how guild craft works.
Diffstat (limited to 'npc/craft')
-rw-r--r--npc/craft/smith.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt
index 87dc9d55d..fa866f7eb 100644
--- a/npc/craft/smith.txt
+++ b/npc/craft/smith.txt
@@ -17,15 +17,14 @@
// 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
+// CRAFT_NPC - Unlocks all recipes
+// CRAFT_PLAYER - Normal behavior
+// CRAFT_GUILD - Items created will be Guild-bound
// 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)]));
+ copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT));
.success=false;
setskin "craft4";
@@ -49,7 +48,10 @@ function script SmithSystem {
// Mark the crafting in your score book (except dagger)
if (.@it != Dagger)
CRAFTING_SCORE+=1;
- getnameditem(.@it, strcharinfo(0));
+ if (.scope == CRAFT_GUILD)
+ getitembound(.@it, 1, 2); // Create a guild-bound item
+ else
+ getnameditem(.@it, strcharinfo(0));
if (getskilllv(TMW2_CRAFT)) {
delinventorylist(); // Needed, because we'll rely on rfind()
getinventorylist();