quiz_02,304,263,6 script WOE Reward 714,{
mes "WOE";
mes "You did a great job!";
mes "Here is your reward.";
getitem 13550,20;
getitem 13989,50;
getitem 14004,2;
getitem 675,1; //add your rewards here
set woereward,0;
next;
warp "SavePoint",0,0;
end;
OnInit:
waitingroom "WOE Reward",0;
end;
}
- script woe_reward -1,{
OnInit:
set .map, "quiz_02";
set .x, 304;
set .y, 255;
setarray .castles$[0],
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
end;
OnMapLoadEvent:
if ((agitcheck() && agitcheck2()) && (strcharinfo(3) == .castles$)){
set woereward,1;
end;
}
OnAgitEnd:
sleep 5000; // wait 5 seconds after woe before warping the guild
for (set .@i,0; .@i < getarraysize(.castles$); set .@i, .@i+1){
warpguild .map,.x,.y,getcastledata(.castles$[.@i],1);
dispbottom "[ War of Emperium ] : Congrats! Your guild wins!";
end;
}
if (getcastledata(.castles$[.@i],1) != getcharid(2) && woereward==1){
dispbottom "[ War of Emperium ] : Its okay, you can try harder on next WoE!";
getitem 607,1;
set woereward,0;
end;
}
OnAgitEnd2:
sleep 5000; // wait 5 seconds after woe before warping the guild
for (set .@i,0; .@i < getarraysize(.castles$); set .@i, .@i+1){
warpguild .map,.x,.y,getcastledata(.castles$[.@i],1);
end;
}
if (getcastledata(.castles$[.@i],1) != getcharid(2) && woereward==1){
dispbottom "[ War of Emperium ] : Its okay, you can try harder on next WoE!";
getitem 607,1;
set woereward,0;
end;
}
}
Hello Rathena!
Need help with my script. It wont recall winner nor give reward to participants.
This script should give reward to the winners, and also consolation prize to losers that participate in WoE.
But I'm getting error.
Thanks in advance, Rathena!
woe1.txt