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!

Pet Dragon Seller/Evolver *Updated

Status
Not open for further replies.
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Don't Flame Meeee =) this is my first release here at Ragezone =)
Ok So What This Really Does Is That It Doesn't Evolve Your Dragon But It Replaces It =P
The Dragon Seller Sells The Dragon (duuh) And it says talk to me again at level 15. talk to him say evolve dragon blah blah blah and then he tell you to go talk to mar. go talk to mar she takes the dragon gives you a green or black or red or blue dragon (its randomized like gachapon) and she gives you 13 nx pet foods so you can get the new dragon to lvl 15 so that it can do commands because those dragons won't obey any commands or w.e until lvl 15 =) well there you have it. =) enjoy

This Is The Dragon Seller mine was spindle but you can change it =)

Thanks RmZero213 for Editing My Noob Script
Code:
/* 
R1c31shg00d =) Updated by RMZero213 
*/

importPackage(net.sf.odinms.client);

var status = 0;


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.sendNext("Hello.\r\nHow are you today, #h #?");   
    		} else if (status == 1) {
 			cm.sendSimple("#L0##dGet a Baby Dragon for 10 mill!#k#l\r\n#L1##rEvolve Your Dragon!#k#l\r\n#L2##bBuy Pet name tag for 5 mill#k#l");   
		} else if (status == 2) {
 			if (selection == 0) {
				if (cm.getChar().getMeso() >= 10000000) {
     					cm.gainItem(5000029,1);
      					cm.gainMeso(-10000000);
					cm.sendOk("Enjoy Your dragon, Talk to me when its level 15");
				} else {
					cm.sendOk("You dont have enough mesos.");
				}
				cm.dispose();
			} else if (selection == 1) {
				if (cm.getChar().getPet() != null) {
					if (cm.getChar().getPet().getLevel() >= 15 && cm.getChar().getPet().getItemId() >= 5000029 && cm.getChar().getPet().getItemId() <= 5000033) {
						cm.sendOk("Talk to Mar the Fairy and she will evolve it!");
					} else if (cm.getChar().getPet().getLevel() < 15) {
						cm.sendOk("Your pet must be level 15.");
					} else {
						cm.sendOk("You dont have a dragon equipped!!");
					}
					cm.dispose();
				} else {
					cm.sendOk("You do not have a pet equipped!!");	
					cm.dispose();
				}
  			} else if (selection == 2) {
				if (cm.getChar().getMeso() >= 5000000) {
					cm.gainItem(5170000,1);
					cm.gainMeso(-5000000); 
 				} else {
					cm.sendOk("You dont have enough mesos.");
				}
				cm.dispose();
			}
		}
	}
}
}
Next is the Evolver Make It Mar Npc id is 1032102

YAY! RmZero Fixed up Mah Noob Script Again =) He's A Hero In My book =)
Code:
/* Credits Go To r1c31shg00d For Making script
	iGoofy for the edited gainItem()
		And Leifide For Making pets =)
			And RMZero213 for editing noob script.
*/

importPackage(net.sf.odinms.client);

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0) {
			cm.sendOk("Alright, see you next time.");
			cm.dispose();
			return;
		}
		if (mode == 1) {
			status++;
		}
		else {
			status--;
		}
		if (status == 0) {
			if (cm.getChar().getPet() == null) {
				cm.sendOk("You need a pet equipped..");
			} else if (cm.getPetLevel() < 15 || !cm.haveItem(5000029)) {
				cm.sendOk("Well Well Well I Guess You Don't Have A Dragon...oR ITS not lEVEL 15 yET");
			} else if (!cm.haveItem(5380000) {
				cm.sendOk("You dont have the rock of evolution.. without it I cant evolve your dragon.");
			} else if (cm.getChar().getPet().getItemId() != 5000029) {
				cm.sendOk("Trying to cheat me huh.. you need a dragon equipped sir.");
			} else {
				var rand = 1 + Math.floor(Math.random() * 4);
				if (rand == 1) {
					cm.gainItem(5000030, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(5000029, -1);
				} else if (rand == 2) {
					cm.gainItem(5000031, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(5000029, -1);
				} else if (rand == 3) {
					cm.gainItem(5000032, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(5000029, -1);
				} else if (rand == 4) {
					cm.gainItem(5000033, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(5000029, -1);
				}
				cm.sendOk("Boom Boom Shalla Shalla koom koom!!!Your Dragon Is Now A Bigger Dragon!!!\r\nPlease Use The Dragon Pet Food I Have Provided Before You Start Using Commands To Your New Dragon*note Getting your new dragon is randomized*");
				cm.gainItem(5240012,26);
			}
			cm.dispose();	
		}
	}
}
Use This If you Want People Not Able To Re-Evolve an Adult Dragon (thanks RmZero213 Again Lmao)
Code:
/* Credits Go To r1c31shg00d For Making script
	iGoofy for the edited gainItem()
		And Leifide For Making pets =)
			And RMZero213 for editing noob script.
*/

importPackage(net.sf.odinms.client);

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0) {
			cm.sendOk("Alright, see you next time.");
			cm.dispose();
			return;
		}
		if (mode == 1) {
			status++;
		}
		else {
			status--;
		}
		if (status == 0) {
			if (cm.getChar().getPet() == null) {
				cm.sendOk("You need a pet equipped..");
			} else if (cm.getPetLevel() < 15) {
				cm.sendOk("Well Well Well I Guess You Don't Have A Dragon...oR ITS not lEVEL 15 yET");
			} else if (!cm.haveItem(5380000) {
				cm.sendOk("You dont have the rock of evolution.. without it I cant evolve your dragon.");
			} else if (cm.getChar().getPet().getItemId() < 5000029 || cm.getChar().getPet().getItemId() > 5000033) {
				cm.sendOk("Trying to cheat me huh.. you need a dragon equipped sir.");
			} else {
				var id = cm.getChar().getPet().getItemId();
				var rand = 1 + Math.floor(Math.random() * 4);
				if (rand == 1) {
					cm.gainItem(5000030, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(id, -1);
				} else if (rand == 2) {
					cm.gainItem(5000031, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(id, -1);
				} else if (rand == 3) {
					cm.gainItem(5000032, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(id, -1);
				} else if (rand == 4) {
					cm.gainItem(5000033, 1);
					cm.gainItem(5380000, -1);
					cm.gainItem(id, -1);
				}
				cm.sendOk("Boom Boom Shalla Shalla koom koom!!!Your Dragon Is Now A Bigger Dragon!!!\r\nPlease Use The Dragon Pet Food I Have Provided Before You Start Using Commands To Your New Dragon*note Getting your new dragon is randomized*");
				cm.gainItem(5240012,26);
			}
			cm.dispose();	
		}
	}
}
Also Use this http://forum.ragezone.com/showthread.php?t=438864


Use Igoofy's Gainitem guide to make these work
Using Leifde's pet patch requires that you modify certain things, the gainItem() function included, when pets are involved. If you don't use this fix, your client will crash if you ever use the gainItem() function for pets due to the whole database shabang not being applied to that pet. Here we go:

In AbstractPlayerInteraction.java, replace the gainItem() function with this:
PHP:
public void gainItem(int id, short quantity) {
            MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
                        if (id >= 5000000 && id <= 5000045) {http://forum.ragezone.com/editpost.php?do=editpost&p=3773709
            try {
                Connection con = (Connection) DatabaseConnection.getConnection();
                PreparedStatement ps = (PreparedStatement) con.prepareStatement("INSERT INTO pets (name, level, closeness, fullness) VALUES (?, ?, ?, ?)");
                ps.setString(1, ii.getName(id));
                ps.setInt(2, 1);
                ps.setInt(3, 0);
                ps.setInt(4, 100);
                ps.executeUpdate();
                ResultSet rs = ps.getGeneratedKeys();
                rs.next();
                //c.getPlayer().equipChanged();
                MapleInventoryManipulator.addById(c, id, (short) quantity, c.getPlayer().getName() + " receieved pet, ID " + id + ", from a scripted PlayerInteraction. (Quantity: " + quantity + ")", null, rs.getInt(1));
                rs.close();
                ps.close();
            } catch (SQLException ex) {
                java.util.logging.Logger.getLogger(AbstractPlayerInteraction.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
        if (quantity >= 0) {
            StringBuilder logInfo = new StringBuilder(c.getPlayer().getName());
            logInfo.append(" received ");
            logInfo.append(quantity);
            logInfo.append(" from a scripted PlayerInteraction (");
            logInfo.append(this.toString());
            logInfo.append(")");
            MapleInventoryManipulator.addById(c, id, quantity, logInfo.toString());
                
        } else {
            MapleInventoryManipulator.removeById(c, MapleItemInformationProvider.getInstance().getInventoryType(id), id, -quantity, true, false);
                    }
                }
        c.getSession().write(MaplePacketCreator.getShowItemGain(id, quantity, true));
    }

That's about it. You'll need a bunch of imports, but if you're using Netbeans and haven't noticed by now that it gives you the option of adding in all missing imports then you should shoot yourself, sorry.

edit: updated info on what it does =)


Update* Made The evoler give 26 nx foods since if you have more then 2 nx pet foods click once it will use both but only give 100 closeness Example: you have 3. you wan't to use one but it uses 2 =P


Update** now checks if dragon is level 15

Update** Checks If You Have Evolution Rock + gaimesos changed and fixed =)
 
Last edited:
Experienced Elementalist
Joined
May 28, 2007
Messages
264
Reaction score
2
Re: [REALEASE]Pet Dragon Seller/Evolver

Nice release.
 
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Re: [REALEASE]Pet Dragon Seller/Evolver

Yeah Its My First =) ima update the information about what it does in a lil blehh im on a mac =\
 
Initiate Mage
Joined
Jul 21, 2008
Messages
4
Reaction score
0
Re: [REALEASE]Pet Dragon Seller/Evolver

lol. grats on the first release.
btw its RElease not REALeasexD
 
Experienced Elementalist
Joined
Jun 8, 2008
Messages
275
Reaction score
4
Re: [REALEASE]Pet Dragon Seller/Evolver

why don't you just combine both scripts so that you don't need to use 2 Npcs.
 
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Re: [REALEASE]Pet Dragon Seller/Evolver

ionoo i tried that it didn't work so good so i was likee bleeh might as well make 2
 
Experienced Elementalist
Joined
May 28, 2007
Messages
264
Reaction score
2
Re: [REALEASE]Pet Dragon Seller/Evolver

Because maybe he doesn't know how to yet. Why don't you?
 
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Re: [REALEASE]Pet Dragon Seller/Evolver

bleehh at least its something? =P well now you can have dragons on your server i guess?
 
Master Summoner
Loyal Member
Joined
Apr 27, 2008
Messages
596
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver

So, dragons do work? After all?
 
Newbie Spellweaver
Joined
Jun 5, 2008
Messages
82
Reaction score
3
Re: [RELEASE]Pet Dragon Seller/Evolver

nice release
 
Newbie Spellweaver
Joined
May 22, 2008
Messages
95
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver

lol thanks :D but, my spindle is in use ): can suggest me any npc that can replace spindle? :D
 
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver

So, dragons do work? After all?
the egg doesn't but the others do welll... red/green etc etc don't unless they are lvl 15 and up thats why i included 13 pet foods so when you get your new dragon you can use the pet food to make it lvl 15 =)
 
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver *Updated

uuuhhmmm you can usseee.................... uugggghhh lmao........ doofus if its not in use?
 
Newbie Spellweaver
Joined
May 22, 2008
Messages
95
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver *Updated

doofus sells pet D:
 
Junior Spellweaver
Joined
Jul 8, 2008
Messages
164
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver *Updated

Wow great release! Ty
 
Junior Spellweaver
Joined
Apr 24, 2008
Messages
153
Reaction score
0
Re: [RELEASE]Pet Dragon Seller/Evolver *Updated

i added level checking =) so now the dragon has to be level 15
 
Master Summoner
Loyal Member
Joined
Apr 20, 2008
Messages
578
Reaction score
76
Re: [RELEASE]Pet Dragon Seller/Evolver *Updated

It's a contradiction.

You can only get the level of a pet that's OUT. Not in inventory.

And. The cm.haveItem means you're checking for the pet thats in inventory.

Might wanna fix that.
 
Status
Not open for further replies.
Back
Top