viewing paste PvP Entrance / Exit | C

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
// 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;
}
 
// NPC for the Entrance
prontera,156,191,4  script  PVP Entrance    767,{
    callfunc "PvPEntranceControll","pvp_y_1-2",0,0;
}
 
// NPC for the Exit
pvp_y_1-2,20,141,4  script  Exit    45,2,2,{
    atcommand "@return";
}
Viewed 842 times, submitted by Myzter.