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!

Some of my custom NPCs [odin]

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 26, 2008
Messages
10
Reaction score
0
These are some of the NPC I coded a while back. I thought I would just share them :winky:

Sera
Gives you the option of which town you want to start in. Also gives you the following items:
Prismix - Some of my custom NPCs [odin] - RaGEZONE Forums
Prismix - Some of my custom NPCs [odin] - RaGEZONE Forums
Prismix - Some of my custom NPCs [odin] - RaGEZONE Forums
Prismix - Some of my custom NPCs [odin] - RaGEZONE Forums
Prismix - Some of my custom NPCs [odin] - RaGEZONE Forums
Prismix - Some of my custom NPCs [odin] - RaGEZONE Forums
and 1 million mesos
Code:
/* Sera
	First NPC on Map 0
*/

var wui = 0;

function start() {
	cm.sendSimple ("Welcome to the world of MapleStory. Were would you like to start your adventure? \r\n#L0##bLith Harbor#k #l\r\n#L1##bHenesys#k #l\r\n#L2##bEllinia#k #l\r\n#L3##bPerion#k #l\r\n#L4##bKerning City#k #l");
}

function action(mode, type, selection) {
cm.dispose();
	if (selection == 0) {
		cm.warp(104000000,0);
		cm.gainMeso(1000000);
                cm.gainItem(01462039,1);
                cm.gainItem(1452044,1);
                cm.gainItem(01472052,1);
                cm.gainItem(1382036,1);
                cm.gainItem(1442002,1);
                cm.gainItem(1332050,1);
		} else if (selection == 1) {
		cm.warp(100000000,0);
		cm.gainMeso(1000000);
                cm.gainItem(01462039,1);
                cm.gainItem(1452044,1);
                cm.gainItem(01472052,1);
                cm.gainItem(1382036,1);
                cm.gainItem(1442002,1);
                cm.gainItem(1332050,1);
		} else if (selection == 2) {
		cm.warp(101000000,0);
		cm.gainMeso(1000000);
                cm.gainItem(01462039,1);
                cm.gainItem(1452044,1);
                cm.gainItem(01472052,1);
                cm.gainItem(1382036,1);
                cm.gainItem(1442002,1);
                cm.gainItem(1332050,1);
		} else if (selection == 3) {
		cm.warp(102000000,0);
		cm.gainMeso(1000000);
                cm.gainItem(01462039,1);
                cm.gainItem(1452044,1);
                cm.gainItem(01472052,1);
                cm.gainItem(1382036,1);
                cm.gainItem(1442002,1);
                cm.gainItem(1332050,1);
		} else if (selection == 4) {
		cm.warp(103000000,0);
		cm.gainMeso(1000000);
                cm.gainItem(01462039,1);
                cm.gainItem(1452044,1);
                cm.gainItem(01472052,1);
                cm.gainItem(1382036,1);
                cm.gainItem(1442002,1);
                cm.gainItem(1332050,1);
		cm.dispose();
		}

	if (mode == 0 || wui == 1) {
		cm.dispose();
	} else {
		wui = 1;
		var statup = new java.util.ArrayList();
		var p = cm.c.getPlayer();
		var totAp = p.getRemainingAp() + p.getStr() + p.getDex() + p.getInt() + p.getLuk();
		p.setStr(4);
		p.setDex(4);
		p.setInt(4);
		p.setLuk(4);
		p.setRemainingAp (totAp - 16);
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(4)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(4)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(4)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(4)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp())));

		p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
		cm.sendOk ("Ok,let the training begin!");
	}
}


Level Seller
Code:
/*
@
@    NPC = NAME
@    Map =  MAP
@    NPC MapId = MAPID
@    Function = Level Up
@
*/

var status = 0;

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

function action(mode, type, selection) {

         
         if (mode == -1) {//ExitChat
        cm.dispose();
    
    }else if (mode == 0){//No
        cm.sendOk("Ok, talk to me when you're sure you want to #bLevel Up#k.");
        cm.dispose();

    }else{            //Regular Talk
        if (mode == 1)
            status++;
        else
            status--;
        
                 if (status == 0) {
        cm.sendYesNo("Welcome, I can help you on your journey. Would you like to #rLevel Up#k for 800 million mesos?");
        }else if (status == 1) {
        if (cm.getMeso() < 800000000) {
        cm.sendOk("You do not have enough mesos.")
        cm.dispose();
        }else{
        cm.sendOk("you have been qualified for a Level Up.");
        }
         }else if (status == 2) {
		wui = 1;
		var statup = new java.util.ArrayList();
		var p = cm.c.getPlayer();
        cm.gainExp(2121276324);
        cm.gainMeso(-800000000);
        cm.sendNext("You have leveled up! Good luck on your next journey.");
		p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
        cm.dispose();
        }            
          }
     }
 
Newbie Spellweaver
Joined
Apr 30, 2008
Messages
49
Reaction score
16
Re: [Release] Some of my custom NPCs [odin]

Nice release but... @ the Level Seller. If the server has multi-level the player would overlevel, right? Player gains 2121276324 exp...
 
Custom Title Activated
Loyal Member
Joined
Apr 5, 2008
Messages
1,025
Reaction score
5
Re: [Release] Some of my custom NPCs [odin]

yah i was wondering that too.
and yes they would overlevel. so for the level seller its only good if ur server doesnt have multi-level enabled.
 
Experienced Elementalist
Joined
Jun 30, 2008
Messages
206
Reaction score
0
Re: [Release] Some of my custom NPCs [odin]

my server does not have multi level but it has exp bugged....
 
Newbie Spellweaver
Joined
Apr 6, 2008
Messages
55
Reaction score
0
Re: [Release] Some of my custom NPCs [odin]

A simple way to rewrite that is just to use cm.levelup, I think it is?
There is a defualt command, that gives you one level.
Make a check to make sure it is not over level 199, or below 1, and it should be good.
 
Status
Not open for further replies.
Back
Top