Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Add On] Gender NPC

Newbie Spellweaver
Joined
May 4, 2010
Messages
40
Reaction score
12
Meh, nothing too special. It is my newly made gender NPC.

Alien gender is what it says, but the rare equips are like items you can't wear as either gender. Kind of weird, but I guess that is what happens when you have v95 or whatever items in a lower version server.


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

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (status >= 0 && mode == 0) {
            cm.dispose();
            return;
        }
        if (mode == 1)
            status++;
        else
            status--;
        if (status == 0) {
            cm.sendNext("#eHello! I am the #dXStory#k gender man.");
        } else if (status == 1) {
            cm.sendSimple("#eWhat gender would you like to be? It costs 10,000,000 mesos to change! Alien allows you to wear both #rmale#k + #rfemale#k equips, and some special rare equips. If you buy Alien, you will have to pay 5 #i4002000#.\r\n\r\n#b#L0#Male#l\r\n#L1#Female#l\r\n#L2#Alien#l");
        } else if (selection == 0) {
            if (cm.getPlayer().getMeso() >= 10000000) {
                if (cm.getPlayer().getGender() == 0) {
                    cm.sendOk("#eYou are already #rmale#k silly!");
                    cm.dispose();
                } else {
                    cm.getPlayer().setGender(0);
                    cm.gainMeso(-10000000)
                    cm.reloadChar();
                    cm.dispose();
                }
            } else {
                cm.sendOk("#eYou do not have 10,000,000 mesos.");
                cm.dispose();
            }
        } else if (selection == 1) {
            if (cm.getPlayer().getMeso() >= 10000000) {
                if (cm.getPlayer().getGender() == 1) {
                    cm.sendOk("#eYou are already #rfemale#k silly!");
                    cm.dispose();
                } else {
                    cm.getPlayer().setGender(1);
                    cm.gainMeso(-10000000)
                    cm.reloadChar();
                    cm.dispose();
                }
            } else {
                cm.sendOk("#eYou do not have 10,000,000 mesos.");
                cm.dispose();
            }
        } else if (selection == 2) {
            if (cm.itemQuantity(4002000) >= 5) {
                if (cm.getPlayer().getGender() == 2) {
                    cm.sendOk("#eYou are already #rAlien#k silly!");
                    cm.dispose();
                } else {
                    cm.getPlayer().setGender(2);
                    cm.gainItem(4002000, -5);
                    cm.reloadChar();
                    cm.dispose();
                }
            } else {
                cm.sendOk("#eYou do not have 5 #i4002000#.");
                cm.dispose();
            }
        }
    }
}
 
Custom Title Activated
Loyal Member
Joined
Aug 21, 2009
Messages
1,149
Reaction score
598
There is male, female and transsexual in MapleStory, if you set it at a different number than 0 and 1, you can use any cloth as far as I recall. What the heck is alien? You know, aliens does have sex too.
 
Skilled Illusionist
Joined
Dec 16, 2010
Messages
304
Reaction score
164
I got bored, wanted to shorten it a bit.
PHP:
var status = 0;

function start() {
    cm.sendNext("#eHello! I am the #dXStory#k gender man.");
}

function action(m,t,s) {
    status++;
    if(m != 1){
        cm.dispose();
        return;
    }
    if (status == 1)
        cm.sendSimple("#eWhat gender would you like to be? It costs 10,000,000 mesos to change! Alien allows you to wear both #rmale#k + #rfemale#k equips, and some special rare equips. If you buy Alien, you will have to pay 5 #i4002000#.\r\n\r\n#b#L0#Male#l\r\n#L1#Female#l\r\n#L2#Alien#l");
    else if (status == 2){
        if(cm.getPlayer().getGender() != s)
            if(cm.getMeso() >= 10000000){
                if(s == 2)
                    if(cm.itemQuantity(4002000) >= 5)
                        cm.gainItem(4002000, -5);
                    else {
                        cm.sendOk("You don't have 5 #i4002000#.");
                        cm.dispose();
                    }
				else
					cm.gainMeso(-10000000);
                cm.getPlayer().setGender(s);
                cm.reloadChar(); // took out the cm.sendOk here because you can't reload and have the npc say something.
            } else
                cm.sendOk("You don't have 10,000,000 mesos.");
            cm.dispose();
        else {
            cm.sendNext("You are already that Gender! Pick again.");
            status = 0;
        }
    }
}
 
Last edited:
Newbie Spellweaver
Joined
May 4, 2010
Messages
40
Reaction score
12
There is male, female and transsexual in MapleStory, if you set it at a different number than 0 and 1, you can use any cloth as far as I recall. What the heck is alien? You know, aliens does have sex too.

2 = alien

Please read what I said. I call it alien, you call it transsexual.
 
return null;
Loyal Member
Joined
Dec 21, 2008
Messages
805
Reaction score
130
This has already been released for like a billion times.
 
Newbie Spellweaver
Joined
Jun 18, 2010
Messages
53
Reaction score
32
PHP:
status = -1;

function start() {
    cm.sendNext("#eHello! I am the #dXStory#k gender man.");
}

function action(mode, type, selection) {
    status++;
    if (mode != 1) {
        cm.dispose();
        return;
    } 
    if (status == 0) {
        cm.sendSimple("#eWhat gender would you like to be? It costs 10,000,000 mesos to change! Alien allows you to wear both #rmale#k + #rfemale#k equips, and some special rare equips. If you buy Alien, you will have to pay 5 #i4002000#.\r\n\r\n#b#L0#Male#l\r\n#L1#Female#l\r\n#L2#Alien#l");
    } else {
        msg = ["#eYou are already #r"+selection == 0 ? "male" : selection == 1 ? "female" : "Alien"+"#k silly!", "#eYou do not have 5 #i4002000#.", "#eYou do not have 10,000,000 mesos."];
        if (cm.getPlayer().getGender() == selection || selection == 2 && cm.getItemQuantity(4002000) != 5 || selection != 2 && cm.getPlayer().getMeso() < 10000000) { 
            cm.sendOk(cm.getPlayer().getGender() == selection ? msg[0] : selection == 2 && cm.getItemQuantity(4002000) != 5 ? msg[1] : msg[2]); 
        } else 
            cm.getPlayer().setGender(selection);
            if (selection == 2)
                cm.gainItem(4002000, -5);
            else 
                cm.gainMeso(-10000000)
            cm.reloadChar();
        cm.dispose();       
    }
}
 
Last edited:
Skilled Illusionist
Joined
Dec 16, 2010
Messages
304
Reaction score
164
PHP:
status = -1;

function start() {
    cm.sendNext("#eHello! I am the #dXStory#k gender man.");
}

function action(mode, type, selection) {
    status++;
    if (mode != 1) {
        cm.dispose();
        return;
    } 
    if (status == 0) {
        cm.sendSimple("#eWhat gender would you like to be? It costs 10,000,000 mesos to change! Alien allows you to wear both #rmale#k + #rfemale#k equips, and some special rare equips. If you buy Alien, you will have to pay 5 #i4002000#.\r\n\r\n#b#L0#Male#l\r\n#L1#Female#l\r\n#L2#Alien#l");
    } else {
        msg = ["#eYou are already #r"+selection == 0 ? "male" : selection == 1 ? "female" : "Alien"+"#k silly!", "#eYou do not have 5 #i4002000#.", "#eYou do not have 10,000,000 mesos."];
        if (cm.getPlayer().getGender() == selection || selection == 3 && cm.getItemQuantity(4002000) != 5 || selection != 3 && cm.getPlayer().getMeso() < 10000000) { 
            cm.sendOk(cm.getPlayer().getGender() == selection ? msg[0] : selection == 3 && cm.getItemQuantity(4002000) != 5 ? msg[1] : msg[2]); 
        } else 
            cm.getPlayer().setGender(selection);
            if (selection == 3)
                cm.gainItem(4002000, -5);
            else 
                cm.gainMeso(-10000000)
            cm.reloadChar();
        cm.dispose();       
    }
}
There's no selection 3, which you have used multiple times, and if the player chose an alien, they don't lose mesos ;)

Edit::
My bad, they weren't supposed to lose mesos. I'll fix my script as well.
 
Last edited:
Newbie Spellweaver
Joined
May 4, 2010
Messages
40
Reaction score
12
Reasons this thread is being flamed:

It has been released before
It can be recoded

My response:
I made this one.
I coded this one.

You can remake any NPC anyway you want. I don't care if it has been released before. I am releasing my work, which I thought was the point of this section.

Sorry I did not release something "beneficial" to you guys, that is not my reason for releasing. If you don't like the thread, don't post in it.
 
Custom Title Activated
Loyal Member
Joined
Aug 21, 2009
Messages
1,149
Reaction score
598
Reasons this thread is being flamed:

It has been released before
It can be recoded

My response:
I made this one.
I coded this one.

You can remake any NPC anyway you want. I don't care if it has been released before. I am releasing my work, which I thought was the point of this section.

Sorry I did not release something "beneficial" to you guys, that is not my reason for releasing. If you don't like the thread, don't post in it.

There is only 1 troll post, which was Kevin's post, and there is 0 flames. You're being so sensitive.

Good job if you made this on your own, that means you're learning. You can release what ever you wants, I been seen more useless stuff released and even not working ones. This is is way more decent that what I see when it's matter of scripting releases.
 
Junior Spellweaver
Joined
Jan 30, 2011
Messages
106
Reaction score
21
Reasons this thread is being flamed:

It has been released before
It can be recoded

My response:
I made this one.
I coded this one.

You can remake any NPC anyway you want. I don't care if it has been released before. I am releasing my work, which I thought was the point of this section.

Sorry I did not release something "beneficial" to you guys, that is not my reason for releasing. If you don't like the thread, don't post in it.
You didn't have any flames as XxOshriroxX said you have 0 flames and i think this is a pretty good idea.
 

Ken

Newbie Spellweaver
Joined
Mar 2, 2011
Messages
12
Reaction score
1
This Is Working But The Alien Is Not Working! Removed The Alien This PHP Will Be Great. Good Luck
Keep on this.
 
Legendary Battlemage
Loyal Member
Joined
Dec 13, 2010
Messages
649
Reaction score
140
There is only 1 troll post, which was Kevin's post, and there is 0 flames. You're being so sensitive.

Good job if you made this on your own, that means you're learning. You can release what ever you wants, I been seen more useless stuff released and even not working ones. This is is way more decent that what I see when it's matter of scripting releases.

That was way to direct :jaw:
 
Legendary Battlemage
Loyal Member
Joined
Dec 13, 2010
Messages
649
Reaction score
140
That indeed is doable and would be funny as hell O_O
 
Newbie Spellweaver
Joined
Mar 12, 2011
Messages
11
Reaction score
3
To all you flamers: Atleast he released something. Be glad he actually tried, because if none of these people tried where will you get? NOWHERE. So be glad.

On-Topic: Its okay. But alien sounds kinda weird. xD. Cause then in the server people will be like: I'm an alien. That would be pretty cool too though.

Good job, atleast you released something. Don't listen to these flamers.
 
Back
Top