OverLord 4 Posted August 27, 2015 I would like to make a weapon system and NPC that vary according to the level of the guild. How can I do to get this information? I looked in the manual but I did not command that returns to the guild level. Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted August 27, 2015 (edited) @@OverLord There is no actual function to do this but you could create one on your own like this: function script getGuildLvl { .@res = query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '" + getarg( 0 ) + "'", .@guild_lv; if( .@res ) return .@guild_lv; return 0;} Edited August 27, 2015 by Winterfox 1 OverLord reacted to this Quote Share this post Link to post Share on other sites
0 OverLord 4 Posted August 27, 2015 (edited) @@Winterfox Very thx!!! You thinking this funcion add guild level in ATK bonus its a problem ? or ok? Edited August 27, 2015 by OverLord Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted August 27, 2015 @@OverLord Since you can call functions in any kind of scripts globally it should also work in such cases. Quote Share this post Link to post Share on other sites
0 Gerz 7 Posted August 27, 2015 (edited) or you can use my scriptcommand :v BUILDIN(getguildlvl){ int guild_id; struct guild* g; guild_id = script_getnum(st,2); if( ( g = guild->search(guild_id) ) != NULL ) script_pushint(st,g->guild_lv); else script_pushint(st,0); return true;} BUILDIN_DEF(getguildlvl, "i"), Usage: getguildlvl(guild_id) Edited August 27, 2015 by Gerz Quote Share this post Link to post Share on other sites
0 OverLord 4 Posted August 28, 2015 Very thx Dears! Quote Share this post Link to post Share on other sites
I would like to make a weapon system and NPC that vary according to the level of the guild. How can I do to get this information? I looked in the manual but I did not command that returns to the guild level.
Share this post
Link to post
Share on other sites