Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,163,85,3 script WoE Reward 582,{
- .@guild_id = getcharid(2);
- if( agitcheck() ){
- mes "A war is currently in progress";
- mes "If your guild owned a castle ask your guild master to see me to claim the reward";
- }else if( !.@guild_id ){
- mes "You are not inside any guild.";
- }else if( getguildmasterid( .@guild_id ) != getcharid(0) ){
- mes "only guild leader can claim items.";
- }else if( getcastledata( "prtg_cas03",1 ) != .@guild_id ){
- mes "Your guild failed to take this castle";
- mes "If your guild owned a castle ask your guild master to claim reward from me";
- }else if( $castle_claimed ){
- mes "Your guild already received the reward for this castle";
- }else{
- mes "All Online member will be able to gain these rewards..";
- mes "Are you sure everyone is here now ??";
- if( select( "Nope.","Confirm" ) == 1 ){
- $castle_claimed = 1;
- .@size = query_sql( "SELECT `account_id`,`char_id` FROM `guild_member` WHERE `guild_id` = '"+.@guild_id+"'",.@aid,.@cid );
- for( .@i = 0; .@i < .@size; .@i++ )
- if( isloggedin( .@aid[.@i],.@cid[.@i] ) ){
- // all online member get rewards.
- getitem 512,1,.@aid[.@i];
- getitem 512,2,.@aid[.@i];
- getitem 512,3,.@aid[.@i];
- }
- }
- }
- close;
- OnAgitEnd:
- set $castle_claimed[1], 0; // everytime woe ends the variable resets
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment