[Release]Gender Changer

Status
Not open for further replies.
Junior Spellweaver
Joined
Sep 2, 2008
Messages
130
Reaction score
0
Sorry if this is released before or isn't good. It's my first release o.o
A gender changer script .

PHP:
/**************************************************
	Created by bendanx3 .
	Gender changer . 
	2/9/2008 .
             Updated: 3/9/2008 .
***************************************************/

var status = 0;


function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendYesNo(" Hello #b#h ##k, do you wan to change your gender ? It takes you only 50mill to change . ");
		} else if (status == 1) {
				if (cm.getChar().getGender() == 0) {
					if (cm.getMeso() > 50000000) {
						cm.getChar().setGender(1);
						cm.gainMeso(-50000000);
						cm.sendOk(" You have changed your gender . Come back again to change back . HappyMapling .\r\n#d Note: You have to change channels for it to take effect. ");
						cm.dispose();
						cm.reloadChar();
					} else {
						cm.sendOk("Sorry you do not have 50mill mesos. Train harder..");
						cm.dipose();
					}

				} else if (cm.getChar().getGender() == 1) {
					if (cm.getMeso() > 50000000) {
						cm.getChar().setGender(0);
						cm.gainMeso(-50000000);
						cm.sendOk(" You have changed your gender . Come back again to change back . HappyMapling . \r\n#d Note: You have to change channels for it to take effect. ");
						cm.dispose();
						cm.reloadChar();
					} else {
						cm.sendOk("Sorry you do not have 50mill mesos. Train harder..");
						cm.dispose();
						}
					}
					
				}
			}
		}

Again, sorry if it's not good or useless ... (:

Edit: sorry my fault, didnt check the script.. It works and checks for mesos now (:
 
Last edited:
This has been released somewhere.. But good try on ure first release :)
Edit : Eh not sure if this will work from looking at it. Did u test it?
 
This doesn't check the mesos, if it's under 50mil. It'll just change sex. Here's the correct script, I think...
Code:
/**************************************************
    Created by bendanx3 .
    Gender changer . 
    2/9/2008 .

   Fixed Version by Bassie <3
***************************************************/

var status = 0;


function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0 && status == 0) {
            cm.dispose();
            return;
        }
        if (mode == 1)
            status++;
        else
            status--;
        if (status == 0) {
            cm.sendYesNo(" Hello #b#h ##k, do you wan to change your gender ? It takes you only 50mill to change . ");
        } else if (status == 1) {
                if (cm.getChar().getGender() == 0) {
                    cm.getChar().setGender(1);
                    cm.gainMeso(-50000000);
                    cm.sendOk(" You have changed your gender . Come back again to change back . HappyMapling .\r\n#d Note: You have to change channels for it to take effect. ");
                    cm.dispose();
                    cm.reloadChar();

                } else if (cm.getChar().getGender() == 1) {
                    cm.getChar().setGender(0);
                    cm.gainMeso(-50000000);
                    cm.sendOk(" You have changed your gender . Come back again to change back . HappyMapling . \r\n#d Note: You have to change channels for it to take effect. ");
                    cm.dispose();
                    cm.reloadChar();
        }  else if (cm.getMeso() >= 500000000) {
                cm.sendOk("Sorry #b #h ##k, you don't have enough mesos.");
                } else {
                    cm.sendOk(" Sorry #b#h ##k, you need to have at least 50million mesos to have your gender changed. Come back to me again once you have the mesos. ");
                    }
                    
                }
            }
    cm.dispose();
        }
 
It's actually:
PHP:
/************************************************** 
    Created by bendanx3 . 
    Gender changer .  
    2/9/2008 . 
***************************************************/ 

var status = 0; 


function start() { 
    status = -1; 
    action(1, 0, 0); 
} 

function action(mode, type, selection) { 
    if (mode == -1) { 
        cm.dispose(); 
    } else { 
        if (mode == 0 && status == 0) { 
            cm.dispose(); 
            return; 
        } 
        if (mode == 1) 
            status++; 
        else 
            status--; 
        if (status == 0) { 
            cm.sendYesNo(" Hello #b#h ##k, do you wan to change your gender ? It takes you only 50mill to change . "); 
        } else if (status == 1) { 
                if (cm.getChar().getGender() == 0) { 
                                   if (cm.getMeso()=>50000000){
                    cm.getChar().setGender(1); 
                    cm.gainMeso(-50000000); 
                    cm.sendOk(" You have changed your gender . Come back again to change back . HappyMapling . \r\n#d Note: You have to change channels for it to take effect. "); 
}else{
cm.sendOk(" Sorry #b#h ##k, you need to have at least 50million mesos to have your gender changed. Come back to me again once you have the mesos. "); 
}                    cm.dispose(); 
                    cm.reloadChar(); 

                } else if (cm.getChar().getGender() == 1) { 
                if (cm.getMeso()=>50000000){
                    cm.getChar().setGender(0); 
                    cm.gainMeso(-50000000); 
                    cm.sendOk(" You have changed your gender . Come back again to change back . HappyMapling . \r\n#d Note: You have to change channels for it to take effect. "); 
}else{
cm.sendOk(" Sorry #b#h ##k, you need to have at least 50million mesos to have your gender changed. Come back to me again once you have the mesos. "); 
}
                    cm.dispose(); 
                    cm.reloadChar(); 

                } else { 
                    cm.dispose();
                    } 
                     
                } 
            } 
    cm.dispose(); 
        }
 
Code:
else if (cm.getMeso() >= 500000000) {
                cm.sendOk("Sorry #b #h ##k, you don't have enough mesos.");
                }
What? Neither does this check mesos, nor will it work the way you want it to. This is if the meso count is > 50M, send message.
 
Code:
else if (cm.getMeso() >= 500000000) {
                cm.sendOk("Sorry #b #h ##k, you don't have enough mesos.");
                }
What? Neither does this check mesos, nor will it work the way you want it to. This is if the meso count is > 50M, send message.

It does check a person's mesos; it doesn't check it the way that is desired but it still checks.
 
wow nice for a dude that just joined

Haha hilarious tags xD
 
Status
Not open for further replies.
Back