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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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