invek,144,175,5 script WoE Prize 734,{
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";
close;
}
while(.castlename$[set(.@a,.@a+1)]!="")
if ( getcastledata( .castlename$[.@a],1 ) == getcharid(2) ) {
if ( $castle_claimed[.@a] ) {
mes "your guild already received the reward";
close;
} else if ( getmapguildusers( getcharid(0) ) == getcharid(0) ) {
mes "receiving the reward for "+ .castlename$[.@a];
getitem 12035,1; // some mathematics ...
set $castle_claimed[.@a],1;
close;
} else {
mes "ask your guild master to see me";
close;
}
}
mes "Your guild failed to take reward";
mes "if your guild owned a castle ask your guild master to claim reward from me";
close;
OnAgitEnd:
deletearray $castle_claimed[0], 128; // everytime woe ends the variable resets
end;
OnInit:
setarray .castlename$[1], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05";
waitingroom "WOE Prize Giver",0;
end;
}
how about when i have 2 castles per woe time. i have the "main castle" & "secondary castle". i want to give a price for the owner of main castle and secondary castle. but i want this prizes.
-main castle prize = 30 tcg(7227) + 50 Btix(7199)
-secondary castle prize = 25 tcg(7227) + 50 btix.(7199)
but i want the guild owner to be the one to claim the prizes. thanks in advance.