zhakastia,112,61,5 script WoE Prize 835,{
if ( agitcheck() ) goto L_woeon;
menu
"Kriemhild [Primary Castle]",L_prtg_cas01;
L_prtg_cas01:
if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) goto L_not_owner;
if ( $claimed1 > 0 || $claimed2 > 0 || $claimed3 > 0 ) goto L_claimed;
if ( $first < 1 ) goto first;
if ( $first > 0 && $second < 1 ) goto second;
if ( $second > 0 && $third < 1 ) goto third;
if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) goto L_not_gm;
first:
mes "receiving the reward for this castle";
getitem 7960,200;
getitem 12103,20;
getitem 7959,20;
set $first, 1;
set $claimed1,1;
close;
second:
getitem 7960,250;
getitem 12103,30;
getitem 7959,30;
set $second,1;
set $claimed2,1;
close;
third:
getitem 7960,300;
getitem 12103,40;
getitem 7959,40;
set $third,1;
set $claimed3,1;
close;
L_woeon:
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";
close;
L_not_owner:
mes "Your guild failed to take this castle";
mes "If your guild owned a castle ask your guild master to claim reward from me";
close;
L_claimed:
mes "Your guild already received the reward for this castle";
close;
L_not_gm:
mes "Ask your Guild Master to see me";
close;
OnAgitEnd:
set $castle_claimed[1],
set $castle_claimed[2],
set $castle_claimed[3], 0; // everytime woe ends the variable resets
end;
OnInit:
waitingroom "Kriemhild Reward",0;
end;
}
Kindly try this one, sorry I'm not that good in scripting . If there is a error kindly post it here. Goodluck ♥.