[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:
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
 
Status
Not open for further replies.
Back