ThyroDree 3 Posted February 28, 2014 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 Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 1, 2014 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 Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted March 2, 2014 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;} Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 2, 2014 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? Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 2, 2014 (edited) ^ 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 March 2, 2014 by quesoph Quote Share this post Link to post Share on other sites
0 Broker 0 Posted March 10, 2014 Is that working? When i click the npc even without a guild im getting the rewards? Can anone fix it plz?? Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted July 29, 2014 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? Quote Share this post Link to post Share on other sites
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