Jump to content
  • 0
OverLord

Get Guild Level on Script

Question

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

5 answers to this question

Recommended Posts

  • 0

@@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 by Winterfox

Share this post


Link to post
Share on other sites
  • 0

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 by Gerz

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.