WoE Reward NPC

ThyroDree

New member
Messages
556
Points
0
Location
Philippines
Github
bosxkate23
Emulator
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 

 
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

 
Let me try :

Code:
-	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;}
 
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?

 
^

Code:
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..
default_smile.png
 
Last edited by a moderator:
Is that working? When i click the npc even without a guild im getting the rewards? Can anone fix it plz??

 
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?

 
Back
Top