ive changed some codes, the result should be like this
//===== rAthena Script =======================================
//= Gold PC Bonus NPC
//===== Description: =========================================
//= NPC that can be spawned via the Gold PC Timer Button.
//===== Changelog: ===========================================
//= 1.0 Initial release [Lemongrass]
//= 1.1 Replay version [eppc0330]
//= 1.2 Translation of the replay version [Lemongrass]
//= 1.3 Cleanup of NPC logic [Lemongrass]
//= 1.4 Added replay version of buff NPC [eppc0330]
//============================================================
prontera,155,168,3 script Goldpoint Manager::GOLDPCCAFE 4_F_02,{
// ID:AMOUNT:PRICE
setarray .items$[1],
"14003:5:3", // World_Tour_Ticket 1
"13607:1:15", // K_Secret_Key 1
"23919:11:100",// K_Secret_Key 11
"23919:33:300";// K_Secret_Key 33
mes "[Goldpoint Manager]";
mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
mes "What reward do you want?";
next;
.@menu$ = "View current points";
for(.@i = 1; .@i < getarraysize(.items$); .@i++) {
explode(.@array$, .items$[.@i], ":");
.@itemid = atoi(.@array$[0]);
.@cost = atoi(.@array$[2]);
.@menu$ += ":" + getitemname(.@itemid) + " (" + .@cost + " points)";
if( Goldpc_Points < .@cost ){
.@menu$ += " ^ff0000(not enough points)^000000";
}
}
.@s = select(.@menu$)-1;
if(.@s == 0) {
mes "[Goldpoint Manager]";
mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
close;
}
explode(.@array$, .items$[.@s], ":");
.@itemid = atoi(.@array$[0]);
.@amount = atoi(.@array$[1]);
.@cost = atoi(.@array$[2]);
if(Goldpc_Points < .@cost) {
mes "[Goldpoint Manager]";
mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
mes "You cannot get the prize with this amount of points.";
close;
}
mes "[Goldpoint Manager]";
mes "You chose the "+.@cost+" points gift. We will reward you immediately.";
Goldpc_Points -= .@cost;
getitem .@itemid,.@amount;
mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
close;
}