How about this?
//
// NOTE: Remove gvg mapflag on guild_vs2 (default on this script) if you want to use this map as pk room
//
- script PK#config -1,{
OnInit:
/* minimum zeny needed to enter */
set $@min_zeny, 10000000;
//-------------------------------
/* special item you mentioned */
set $@spcial_item, 7227; // item id
set $@sitem_amount, 20; // item amount to be exchanged on npc
//-------------------------------
/* item to be exchanged */
set $@ex_item, 501; // item id
set $@exitem_amount, 1; //item amount
//-------------------------------
end;
}
- script PK#Room -1,{
OnNPCKillEvent:
getmapxy(@mapn$,@mapx,@mapy,0);
if (@mapn$ == "guild_vs2"){
if( killedrid == 1002) {
set .@rand, rand (10+30+100);
if (.@rand < 10){
getitem $@spcial_item,1; // 10% of having 7227=tcg card as special item
}
else if (.@rand < 30){
getitem 12103,20; // 30% rate of having bloody branch
}
else if (.@rand < 100){
getitem 969,50; // 100% rate of having gold
}
else {
getitem 969,50; // 100% rate of having gold
}
end;
}
}
else{
end;
}
OnPCDieEvent:
getmapxy(@mapn$,@mapx,@mapy,0);
if (@mapn$ == "guild_vs2"){
sleep2 1000;
warp "prontera",150,150;
end;
}
end;
}
prontera,155,184,4 script rAthena 100,{
set @npc$,"[rAthena]";
mes @npc$;
mes "What do you want to do?";
switch(select("Enter PVP Room","Exchange Items")){
case 1:
if (Zeny >= $@min_zeny){
set Zeny,Zeny-$@min_zeny;
warp "guild_vs2",0,0;
end;
}
else{
dispbottom "Insufficient zeny";
close;
}
break;
case 2:
if (countitem($@spcial_item) >= $@sitem_amount){
dispbottom "Deal is succesful!";
getitem $@ex_item,$@exitem_amount;
delitem $@spcial_item,$@sitem_amount;
close;
}
else {
dispbottom "Insufficient items";
close;
}
}
close;
}
/* mapflags and monster spawn */
guild_vs2,0,0,0, monster Poring 1002,1,180000,0,0
guild_vs2 mapflag nomemo
guild_vs2 mapflag pvp
guild_vs2 mapflag noteleport