// NPC tha call the Entrance Function with the name of the PvP Room to allow multiple PvP Rooms using the same function
prt_are_in,20,141,4 script Classic PVP 767,{
callfunc "PvPEntranceControll","pvp_y_1-2",0,0;
}
// Entrance Function
function script PvPEntranceControll {
set .@Menu$, ":^ff0000Enter PVP Zone^000000:Exit";
if (curspx) set .@Menu$, "^0000ffReturn to " + curspmap$ + "^000000" + .@Menu$;
switch(prompt(.@Menu$)) {
case 1: // Restore the original SavePoint and warp you to that place
savepoint curspmap$, curspx, curspy;
warp curspmap$,curspx, curspy;
set curspmap$, "";
set curspx, 0;
set curspy, 0;
end;
case 2: // Save your current savepoint and warp you to the PvP Map
if (!curspx) {
set curspmap$, getsavepoint(0);
set curspx, getsavepoint(1);
set curspy, getsavepoint(2);
}
getmapxy .@mapname$, .@x, .@y,0;
savepoint .@mapname$, @x, @y;
warp getarg(0),getarg(1),getarg(2);
end;
}
close;
}