Hmm...
- shop custom_seller2 -1,501:500
prontera.gat,95,99,5 script PK Points Dealer 100,{
mes "[PK Points Dealer]";
mes "I will sell you items for PK points.";
mes "Each time you kill a player on "+.map$+" you'll get 1 PK point to spend here!";
next;
mes "[PK Points Dealer]";
mes "You currently have [^0000ff"+pk_points+"^000000] PK points to spend.";
callshop "custom_seller2",1;
npcshopattach "custom_seller2";
end;
OnBuyItem:
for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) {
for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) {
if(@bought_nameid[.@d]==.customs[.@i]) {
if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) {
if(pk_points >= .Price[.@i]*@bought_quantity[.@d]) {
set pk_points, pk_points - .Price[.@i]*@bought_quantity[.@d];
getitem @bought_nameid[.@d],@bought_quantity[.@d];
} else dispbottom "You don't have enough PK points to purchase that item.";
} else dispbottom "Purchasing these items will put you over the weight limit!";
}
}
}
deletearray @bought_quantity, getarraysize(@bought_quantity);
deletearray @bought_nameid, getarraysize(@bought_nameid);
close;
OnPCKillEvent:
if( strcharinfo(3) != .map$ ) end;
copyarray( @killed$[1], @killed$[0], .saved_l-1 );
@killed$ = ""+killedrid;
if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) {
pk_points++;
dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";
}
end;
OnInit:
set .map$, "guild_vs3";
set .saved_l, 3; //Length of saved ids can be up to 127.
set .rstrk_l, 2; //Level of restriction.
setarray .customs[0], 12103, 607, 678; // Enter the ID of customs here...
setarray .Price[0], 20 , 40 , 300; // Price for each custom here...
npcshopitem "custom_seller2", 0 , 0; // Don't touch any coding beyond here..
for( set .i,0; .customs[.i]; set .i,.i+1 )
npcshopadditem "custom_seller2",.customs[.i],.Price[.i];
end;
}