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!

[Tut] Making a npc that teleports too different places

Experienced Elementalist
Joined
Jun 8, 2008
Messages
275
Reaction score
4
This just a simple guide on adding a npc that warps 2 ways.

PHP:
/*
	This file is part of the OdinMS Maple Story Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
                       Matthias Butz <matze@odinms.de>
                       Jan Christian Meyer <vimes@odinms.de>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/**
 pvp :O
**/

var status = 0;

function start() {
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (status == 0) {
		if (cm.getChar().getMapId() == 910000000) { 
			cm.sendYesNo("Hello i  can take you to pvp, would you like to go their now?");//if character is in map 910000000(fm) then display 
		} else {
			cm.sendYesNo("Would you like to leave this place and head back to Fm?");// if character is elsewhere then display
		}
		status++;
	} else {
		if ((status == 1 && type == 1 && selection == -1 && mode == 0) || mode == -1) { // Basically the yes or no thing
			cm.dispose();
		} else {
			if (status == 1) {
					cm.sendNext ("Alright, see you next time. Take care.");
					status++
			} else if (status == 2) {
					if (cm.getChar().getMapId() == 910000000) {
						cm.warp(922010900, "st00");// if character is in fm (910000000) then jwarp to "Crack in the wall"
					} else {
						cm.warp(910000000, "bb14");// if character is  on any other map then warp to fm
					}
					cm.dispose();
			}
		}
	}
}

i commented the parts that would need to be changed etc...
comment = (//)
 
Newbie Spellweaver
Joined
Aug 26, 2007
Messages
57
Reaction score
1
Re: [Guide] Making a npc that teleports too different places

Awesome! Thanks for this :)
 
Newbie Spellweaver
Joined
May 3, 2006
Messages
54
Reaction score
0
Re: [Guide] Making a npc that teleports too different places

nice ! at least quite simple reading for us newbie :D

where do i edit this?

in my npcID.js ?
 
Experienced Elementalist
Joined
Jun 8, 2008
Messages
275
Reaction score
4
Re: [Guide] Making a npc that teleports too different places

you just copy and paste that code and then edit to what ever you want it to say and or warp too, if you need help just post here.
 
Newbie Spellweaver
Joined
Jul 23, 2008
Messages
7
Reaction score
0
Re: [Guide] Making a npc that teleports too different places

Are we gonna have to compile this? And like...where do we put it? lol. I placed it directly in the NPC java script folder, but all that did was make the NPC say the dialoge. She says "Alright, see you next time! Take care!"...but then nothing happens.

And I'm obviously quite nooby at this.
 
Master Summoner
Loyal Member
Joined
Apr 27, 2008
Messages
596
Reaction score
0
Re: [Guide] Making a npc that teleports too different places

Release Section!
 
Back
Top