hello, i need give reward to winner of BG gold coin , but, i dont know how
// Badge Reward Function
//============================================================
function script F_BG_Badge {
if (getarg(2) == "Tierra") {
set .@badge,7828; //BF_Badge1
set .@amount_win,3;
set .@amount_lose,1;
} else if (getarg(2) == "Flavius") {
set .@badge,7829; //BF_Badge2
set .@amount_win,9;
set .@amount_lose,3;
} else
return;
if (getarg(0) == 1) {
set .@amount, .@amount_win;
if (getarg(1) == "Guillaume") {
mes "[Axl Rose]";
mes "Blessed Guillaume!";
} else if (getarg(1) == "Croix") {
mes "[Swandery]";
mes "Blessed Croix!";
}
mes "Let's enjoy our glorious victory!";
mes strcharinfo(0)+", it's a sign reflecting victory.";
} else {
set .@amount, .@amount_lose;
if (getarg(1) == "Guillaume") {
mes "[Axl Rose]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat as a lesson, and next time you will definitely win.";
} else if (getarg(1) == "Croix") {
mes "[Swandery]";
mes "Oh, "+strcharinfo(0)+" Don't be sad.";
mes "Even though we didn't win, we did our best.";
mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
}
}
close2;
// If the VIP system is enabled, VIP players receive an extra 2 badges.
if (VIP_SCRIPT && vip_status(1))
set .@amount, .@amount+2;
set .@medal_gap, 500 - countitem(.@badge);
if (.@medal_gap >= .@amount)
getitem .@badge,.@amount;
else
getitem .@badge,.@medal_gap;
return;
}
this is the script, i want give gold coin to the winner, with this coin buy items custom, i need you help, the item id is 671, not for npc. after the win, give the gold coin