diff options
Diffstat (limited to 'npc/craft')
-rw-r--r-- | npc/craft/smith.txt | 14 |
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(); |