Double Warp

Newbie Spellweaver
Joined
Mar 2, 2011
Messages
28
Reaction score
5
Change the map id's to the ones you want.
Code:
status = -1;

function start() {
    if (cm.getPlayer().getMapId() == 910000002)
        cm.sendYesNo("Do you want to go to the #eCave of Pianus???#k");
    else
        cm.sendYesNo("Do you want to go back to FM?");
}

function action(mode, type, selection) {
    status++;
    if (mode != 1) {
        if (mode == 0)
            cm.sendOk("Okay.");
        cm.dispose();
        return;
    }
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
        if (cm.getPlayer().getMapId() == 910000002)
            cm.warp(230040420);
        else
            cm.warp(910000000);
        cm.dispose();
    }
}
 
Really?... -_-
If you're going to release something like this, at least include more maps and make it look better. I just felt like modifying it.
PHP:
var status = -1;

function start() {
	var text = cm.getPlayer().getMapId() == 910000002 ? "Do you want to go to the #eCave of Pianus?#n" : "Do you want to go back to the FM?";
    cm.sendYesNo(text);
}

function action(m,t,s) {
    status++;
    if(m != 1){
		cm.dispose();
		return;
	}
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
		var map = cm.getPlayer().getMapId() == 910000002 ? 230040420 : 910000000;
        cm.warp(map);
        cm.dispose();
    }
}
 
Okay... Just thought it might be useful for people. Like lets say you made a PQ and you can put it in FM to warp to the PQ and you can put it in every stage to warp them back to FM if they give up. It can be used for many things.
 
Why not make a boss warper? Warps you to the boss maps and back again when you're done. But if you do it, you should make it complete, not just a skeleton (imo).
 
Pretty much, this is kind of useless. But yeah, maybe someone would like it. Anyhow, I didn't liked Sharky one because of the useless variables, so I made my own which is also ridiculous.

PHP:
status = -1;

function start() {
    cm.sendYesNo("Do you want to go to the #b#m" + (cm.getMapId() ^ 998989030) + "##k?");
}

function action(mode, type, selection) {
    status++;
    if(mode != 1) {
        cm.dispose();
        return;
    }
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
        cm.warp(cm.getMapId() ^ 998989030);
        cm.dispose();
    }
}
 
To all thinking that this is useless: This could be used for the NPC Roony that warps you to and from Happyville, and some other similar NPCs.

If anything that is useless from you haters is your stupid post.
 
Pretty much, this is kind of useless. But yeah, maybe someone would like it. Anyhow, I didn't liked Sharky one because of the useless variables, so I made my own which is also ridiculous.

PHP:
status = -1;

function start() {
    cm.sendYesNo("Do you want to go to the #b#m" + (cm.getMapId() ^ 998989030) + "##k?");
}

function action(mode, type, selection) {
    status++;
    if(mode != 1) {
        cm.dispose();
        return;
    }
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
        cm.warp(cm.getMapId() ^ 998989030);
        cm.dispose();
    }
}
They were necessary in my case. Not everyone knows bitwise operators =(
 
PHP:
status = -1;

function start() {
    cm.sendYesNo("Do you want to go to the #b#m" + (cm.getMapId() ^ 998989030) + "##k?");
}

function action(mode, type, selection) {
    status++;
    if(mode != 1) {
        cm.dispose();
        return;
    }
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
        cm.warp(cm.getMapId() ^ 998989030);
        cm.dispose();
    }
}
How do you use "cm.getMapId() ^ 998989030", it wasn't in your tutorial, like whats the output of it o.O?? just curious since I only seen a handful of scripts with the ^ operator.
 
How do you use "cm.getMapId() ^ 998989030", it wasn't in your tutorial, like whats the output of it o.O?? just curious since I only seen a handful of scripts with the ^ operator.

^ is the xor operator, and is equivalent to !or operator in bitwise sense.
 
To all thinking that this is useless: This could be used for the NPC Roony that warps you to and from Happyville, and some other similar NPCs.

If anything that is useless from you haters is your stupid post.

As far as I recall, it's not the same Rooney in the HappyVille. Also, it have another name.

They were necessary in my case. Not everyone knows bitwise operators =(

It wasn't necessary.

---------- Post added at 03:42 AM ---------- Previous post was at 03:35 AM ----------

^ is the xor operator, and is equivalent to !or operator in bitwise sense.

That's completely false.

The contrary of OR is actually NOR, but it's not represented in programming by a symbol as OR does. Could be translated as ~| if anything since ~ is NOT.

The contrary of AND is NAND, same thing as OR but with AND.

XOR means Special OR.
 
Last edited:
Really?... -_-
If you're going to release something like this, at least include more maps and make it look better. I just felt like modifying it.
PHP:
var status = -1;

function start() {
	var text = cm.getPlayer().getMapId() == 910000002 ? "Do you want to go to the #eCave of Pianus?#n" : "Do you want to go back to the FM?";
    cm.sendYesNo(text);
}

function action(m,t,s) {
    status++;
    if(m != 1){
		cm.dispose();
		return;
	}
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
		var map = cm.getPlayer().getMapId() == 910000002 ? 230040420 : 910000000;
        cm.warp(map);
        cm.dispose();
    }
}


Screw you and your boolean operators :mad:

(secret thumbs up) :D:
 
That's completely false.

The contrary of OR is actually NOR, but it's not represented in programming by a symbol as OR does. Could be translated as ~| if anything since ~ is NOT.

The contrary of AND is NAND, same thing as OR but with AND.

XOR means Special OR.

Awwww man! I dun goofed!
 
Pretty much, this is kind of useless. But yeah, maybe someone would like it. Anyhow, I didn't liked Sharky one because of the useless variables, so I made my own which is also ridiculous.

PHP:
status = -1;

function start() {
    cm.sendYesNo("Do you want to go to the #b#m" + (cm.getMapId() ^ 998989030) + "##k?");
}

function action(mode, type, selection) {
    status++;
    if(mode != 1) {
        cm.dispose();
        return;
    }
    if (status == 0)
        cm.sendNext("See ya later.");
    else if (status == 1) {
        cm.warp(cm.getMapId() ^ 998989030);
        cm.dispose();
    }
}
Talking about XOR'ing lots of bytes :(
 
Back