Jump to content
  • 0

Reward in BG


fhmagno

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  06/01/15
  • Last Seen:  

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
Edited by Emistry
Use [codebox]
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   17
  • Joined:  12/31/11
  • Last Seen:  

you can put the NPC to get the coin below getitem in the script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...