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!

[Release] Pet name changer

Status
Not open for further replies.
Junior Spellweaver
Joined
Sep 2, 2008
Messages
130
Reaction score
0
2nd release..its kindda useless i know.
Btw, the price for changing is 10mill and doesnt require any compiling. Not sure whether it works for v59 source, if anyone tries with v59, pls tell me whether it works :)

PHP:
/**************************************** 
    Done by bendanx3 
    pet name changer 
    6/9/2008 
*****************************************/ 

var status = 0;
var price = 10000000;

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;
    } else if (mode == 1) {
            status++;
        } else {
            status--;
        } if (status == 0) {
		cm.sendYesNo(" Hello #b#h ##k, do you want to change your pet's name? ");
	} else if (status == 1) {
		cm.sendGetText(" Please enter your desired pet name in the blank below. ");
	} else if (status == 2) {
		name = cm.getText();
			if (name.length() < 2 || name.length() > 12) {
				cm.sendOk("Either the name you entered is too long or too short or you didnt enter any name.");
				cm.dispose();
			} else {
				cm.sendYesNo("Are you sure that you want to change your pet's name to #d " + name + "#k? Please double check if its the one that you wanted.");
			}
	} else if (status == 3) {
			if (cm.getPlayer().getPet() == null) {
				cm.sendOk(" Please make sure your pet is equipped or you have one. ");
				cm.dispose();
			} else if (cm.getMeso() < price) {
				cm.sendOk("You do not have enough mesos to change. Come back to me again after you have collected 10mill.");
				cm.dispose();
			} else {
				cm.getPlayer().getPet().setName(name);
				cm.gainMeso(-price);
				cm.sendOk(" Your pet's name have been change. Happy Mapling. ");
				cm.dispose();
				cm.reloadChar();
			}
		}
    }
}

Screnshots:
bendanx3 - [Release] Pet name changer - RaGEZONE Forums

bendanx3 - [Release] Pet name changer - RaGEZONE Forums

bendanx3 - [Release] Pet name changer - RaGEZONE Forums

bendanx3 - [Release] Pet name changer - RaGEZONE Forums


If anyone has feedbacks, questions or found any bugs pls tell me ^^

Edit: It only works for v55 .
Edit: changed name length & no need to cc / relog after pressing no. (Thanks to chuayaowei :D)
 
Last edited:
Mythic Archon
Loyal Member
Joined
Jul 14, 2008
Messages
712
Reaction score
164
well
now go try on my 0.59 server
later tell u the result
 
Junior Spellweaver
Joined
Sep 2, 2008
Messages
130
Reaction score
0
I cant seem to figure out whads wrong with it, why cant work on v59.. anyone knows? o_O
 
Master Summoner
Loyal Member
Joined
Jul 27, 2008
Messages
583
Reaction score
0
after change need relog to work it?

cm.getPlayer().getPet().setName(name);
cm.gainMeso(-price);
cm.sendOk(" Your pet's name have been change. Happy Mapling. ");
cm.dispose();
cm.reloadChar();
 
Master Summoner
Loyal Member
Joined
Jul 22, 2008
Messages
573
Reaction score
0
i would rather use pet name tag than this, but still a great release.
 
Junior Spellweaver
Joined
Sep 2, 2008
Messages
130
Reaction score
0
Code:
/**************************************** 
    Done by bendanx3 
    pet name changer 
    6/9/2008 
*****************************************/ 

var status = 0;
var price = 10000000;

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

function action(mode, type, selection) 
{
    if (mode == -1) 
    {
        cm.dispose();
    } 
    else 
    {
        if (mode == 1)
        {
            status++;
        }
        else 
        {
            status--;
        }
        if (status == 0) {
        cm.sendYesNo(" Hello #b#h ##k, do you want to change your pet's name? ");
    } else if (status == 1) {
        cm.sendGetText(" Please enter your desired pet name in the blank below. ");
    } else if (status == 2) {
        name = cm.getText();
            if (name.length() < 5 || name.length() > 15) {
                cm.sendOk("Either the name you entered is too long or too short or you didnt enter any name.");
                cm.dispose();
            } else {
                cm.sendYesNo("Are you sure that you want to change your pet's name to #d " + name + "#k? Please double check if its the one that you wanted.");
            }
    } else if (status == 3) {
            if (cm.getPlayer().getPet() == null) {
                cm.sendOk(" Please make sure your pet is equipped or you have one. ");
                cm.dispose();
            } else if (cm.getMeso() < price) {
                cm.sendOk("You do not have enough mesos to change. Come back to me again after you have collected 10mill.");
                cm.dispose();
            } else {
                cm.getPlayer().getPet().setName(name);
                cm.gainMeso(-price);
                cm.reloadChar();
                cm.sendOk(" Your pet's name have been change. Happy Mapling. ");
                cm.dispose();
           }
        }
    }
}

I think this is the fixed script else you can't talk to npc after changing your pet's name. I tested it



What's the difference? lol o.o
 
Mythic Archon
Loyal Member
Joined
Jul 14, 2008
Messages
712
Reaction score
164
my server pet name tag not working
how to work it?
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
cm.dispose();
and cm.reloadChar();
are changed? LOL. I think must end with cm.dispose();
 
Status
Not open for further replies.
Back
Top