Jump to content
  • 0
Sign in to follow this  
ThyroDree

WoE Reward NPC

Question

i need a WoE Reward npc that all guild members are rewarded. not the Guild Leader Only.  a NPC that gives Reward if the Guild won a Castle 

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I despise giving the reward to all guild members

because they can always @autotrade just outside the castle to gain multiple rewards

 

so ... you want to give the rewards to all online guild members ? or including offline guild members

Share this post


Link to post
Share on other sites
  • 0

Let me try :

 

-	script	Sample	-1,{	OnAgitEnd:		query_sql "SELECT `account_id`, `char_id` FROM `guild_member` WHERE `guild_id` = '" + getcastledata( "prtg_cas01", 1 ) + "'",.@aid,.@cid;		for ( .@i = 0; .@i < getarraysize( .@aid ); .@i++ ) {			if ( isloggedin( .@aid[ .@i ], .@cid[ .@i ] ) ) {				if ( attachrid( .@aid[ .@i ] ) ) {					if ( !checkvending() ) {						for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) 							getitem .Items[ .@x ], .Items[ .@x + 1 ];					}				}			}			if ( .include_offline ) {				for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) {					if ( query_sql( "SELECT `nameid` FROM `inventory` WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'" ) )						query_sql "UPDATE `inventory` SET `amount` = `amount` + " + .Items[ .@x + 1 ] + " WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'";					else 						query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `identify` ) VALUES ( '" +.@cid[ .@i ]+ "' , '" +.Items[ .@x ]+ "', '" +.Items[ .@x + 1 ]+ "', '1')";				}			}		}			end;		OnInit:		.include_offline = 0; // Include offline guild members? ( 1 = Enabled | 0 = Disabled )		setarray .Items[0],501,5,7227,5; // Item Id, Item Amount		end;}

Share this post


Link to post
Share on other sites
  • 0

the 

 

 

Let me try :

 

-	script	Sample	-1,{	OnAgitEnd:		query_sql "SELECT `account_id`, `char_id` FROM `guild_member` WHERE `guild_id` = '" + getcastledata( "prtg_cas01", 1 ) + "'",.@aid,.@cid;		for ( .@i = 0; .@i < getarraysize( .@aid ); .@i++ ) {			if ( isloggedin( .@aid[ .@i ], .@cid[ .@i ] ) ) {				if ( attachrid( .@aid[ .@i ] ) ) {					if ( !checkvending() ) {						for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) 							getitem .Items[ .@x ], .Items[ .@x + 1 ];					}				}			}			if ( .include_offline ) {				for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) {					if ( query_sql( "SELECT `nameid` FROM `inventory` WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'" ) )						query_sql "UPDATE `inventory` SET `amount` = `amount` + " + .Items[ .@x + 1 ] + " WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'";					else 						query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `identify` ) VALUES ( '" +.@cid[ .@i ]+ "' , '" +.Items[ .@x ]+ "', '" +.Items[ .@x + 1 ]+ "', '1')";				}			}		}			end;		OnInit:		.include_offline = 0; // Include offline guild members? ( 1 = Enabled | 0 = Disabled )		setarray .Items[0],501,5,7227,5; // Item Id, Item Amount		end;}

if the player is on autotrade to abuse the award the vendor receive reward in this script?

Share this post


Link to post
Share on other sites
  • 0

^

if ( !checkvending() ) { // check character if its not on vending mode.	    for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 )	    getitem .Items[ .@x ], .Items[ .@x + 1 ]; // get item rewards if not on vend mode.}
Autotraders will not get rewards from this script or test it out.. :) Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

Hmm how about you must be inside WoE Castle by 30minutes and UP to claim the reward? if 29Minutes Below the Play cant get reward.. anyone?

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
Sign in to follow this  

×
×
  • Create New...

Important Information

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