Jump to content
  • 0

last warp problem


Question

Posted

how do i modify the LASTWARP when u clicked it, the npc will still send u to same map but random coordinate?


function Go {
    warp getarg(0),getarg(1,0),getarg(2,0);
    getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
    end; }
function Disp {
    set @menu$,"";
    if(getarg(0)=="") {
        set @menu$,getarg(1);
        return; }
    for(set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1)
        set @menu$, @menu$+getarg(0)+" "+.@i+":";
    return; }
function Pick {
    if(getarg(0)=="") {
        set .@i, select(@menu$);
        warp getarg(.@i),@c[.@i*2],@c[.@i*2+1]; }
    else {
        set .@i, select(@menu$)-getarg(1,0);
        warp getarg(0)+((.@i<10)?"0":"")+.@i,@c[.@i*2],@c[.@i*2+1]; }
    getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
    end; }
 

 

1 answer to this question

Recommended Posts

Posted

Try changing :

menu    "Last Warp ^777777["+lastwarp$+"]^000000",-,
    " ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons,
    " ~ Guild Castles",Castles, " ~ Guild Dungeons",Guild_Dungeons,
    " ~ Instances",Instances, " ~ Special Areas",Special;

    if (lastwarp$ == "")
        message strcharinfo(0),"You haven't warped anywhere yet.";
    else
        warp lastwarp$,lastwarpx,lastwarpy;
    end;

to : 

menu    "Last Warp ^777777["+lastwarp$+"]^000000",-,
    " ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons,
    " ~ Guild Castles",Castles, " ~ Guild Dungeons",Guild_Dungeons,
    " ~ Instances",Instances, " ~ Special Areas",Special;

    if (lastwarp$ == "")
        message strcharinfo(0),"You haven't warped anywhere yet.";
    else
        warp lastwarp$,0,0;
    end;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...