From 1bb7efd20540844d55d364306a5c1259745988e6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 15 Apr 2019 13:37:29 -0300 Subject: Rewrite the Guild Alchemy System in a way which works (but is MESSY) --- npc/functions/craft/alchemy.txt | 6 +++++- npc/functions/guild.txt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/craft/alchemy.txt b/npc/functions/craft/alchemy.txt index b76db43fd..e23416596 100644 --- a/npc/functions/craft/alchemy.txt +++ b/npc/functions/craft/alchemy.txt @@ -14,9 +14,13 @@ 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,$RECIPES_ALCHEMY[getcharid(2)],getarraysize($RECIPES_ALCHEMY[getcharid(2)])); + { + copyarray( .knowledge,getd("$RECIPES_ALCHEMY_"+getcharid(2)),getarraysize(getd("$RECIPES_ALCHEMY_"+getcharid(2))) ); + } .success=false; setskin "craft2"; diff --git a/npc/functions/guild.txt b/npc/functions/guild.txt index 09422946d..6b9d95299 100644 --- a/npc/functions/guild.txt +++ b/npc/functions/guild.txt @@ -14,7 +14,7 @@ function script getguildrole { .@pos=-1; getguildmember(.@gid, 2); for (.@i=0; .@i < $@guildmembercount; .@i++) { - debugmes "Found AID %d - Position %d", $@guildmemberaid[.@i], $@guildmemberpos[.@i]; + //debugmes "Found AID %d - Position %d", $@guildmemberaid[.@i], $@guildmemberpos[.@i]; if (.@aid == $@guildmemberaid[.@i]) { .@pos=$@guildmemberpos[.@i]; break; -- cgit v1.2.3-60-g2f50