[Release] Boss Spawner NPC

Sorry to bump this old thread, I'm using this "BossSpawner", and I would like to change the defined coordinates, so it can spawn bosses in a different map, How would I accomplish this?
Any help would be appreciated :)
 
Sorry to bump this old thread, I'm using this "BossSpawner", and I would like to change the defined coordinates, so it can spawn bosses in a different map, How would I accomplish this?
Any help would be appreciated :)

I guess you will have to find the coordinates manually for each map, unless there is some indicator in those maps that you can use to locate the coordinates.

2
 
I don't know if this works. Just made it and didn't test it.

PHP:
/* boss summoner npc */
// cm.spawnMonster(int mobid, int HP, int MP, int level, int EXP, int boss, int undead, int amount, int x, int y);


var status;
var mob = [[100100, 100101],[100, 100],[100, 100],[10, 10],[100, 100],[0, 0],[0, 0],[1, 0],[0, 0],[0,0]]; // mobid, hp, mp, lvl, xp, boss, undead, amt, x, y
var sel;
var cost = 300;

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.sendOk("Are you sure? Scaredy cat :<");
		cm.dispose();
	} else {
		if (mode == 1) {
			status++;
		} else {
			status--;
		}
		if (status == 0) {
			text = "Here is a list of mobs you can spawn.\r\n";
			for (var i = 0; i < mob.length; i++)
			text += "\r\n#L"+i+"##o"+mob[0][i]+"# #b"+mob[1][i]+" hp#k #b"+mob[4][i]+" exp#k";
				cm.sendSimple(text);
		} else if (status == 1) {
			selection = sel;
				cm.sendGetText("How many of #o"+mob[0][sel]+"# do you want? They are "+cost+" mesos each.");
		} else if (status == 2) {
			if (cm.getMeso() < cost*cm.getText()) {
				cm.sendOk("You don't have enough cash.");
			} else {
				cm.spawnMonster(mob[0][sel],  mob[1][sel], mob[2][sel], mob[3][sel], mob[4][sel], mob[5][sel], mob[6][sel], cm.getText(), mob[8][sel], mob[9][sel]);
				cm.gainMeso(-cost*cm.getText());
			}
		cm.dispose();
		}
	}
}
 
Last edited:
I don't know if this works. Just made it and didn't test it.

PHP:
/* boss summoner npc */
// cm.spawnMonster(int mobid, int HP, int MP, int level, int EXP, int boss, int undead, int amount, int x, int y);


var status;
var mob; [[100100, 100101],[100, 100],[100, 100],[10, 10],[100, 100],[0, 0],[0, 0],[1, 0],[0, 0],[0,0]]; // mobid, hp, mp, lvl, xp, boss, undead, amt, x, y
var sel;
var cost = 300;

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.sendOk("Are you sure? Scaredy cat :<");
		cm.dispose();
	} else {
		if (mode == 1) {
			status++;
		} else {
			status--;
		}
		if (status == 0) {
			text = "Here is a list of mobs you can spawn.\r\n";
			for (var i = 0; i < mob.length; i++)
			text += "\r\n#L"+i+"##o"+mob[0][i]+"# #b"+mob[1][i]+" hp#k #b"+mob[4][i]+" exp#k";
				cm.sendSimple(text);
		} else if (status == 1) {
			selection = sel;
				cm.sendGetText("How many of #o"+mob[0][sel]+"# do you want? They are "+cost+" mesos each.");
		} else if (status == 2) {
			if (cm.getMeso() < cost*cm.getText()) {
				cm.sendOk("You don't have enough cash.");
			} else {
				cm.spawnMonster(mob[0][sel],  mob[1][sel], mob[2][sel], mob[3][sel], mob[4][sel], mob[5][sel], mob[6][sel], cm.getText(), mob[8][sel], mob[9][sel]);
				cm.gainMeso(-cost*cm.getText());
			}
		cm.dispose();
		}
	}
}

Easier to make an sub-array for each mob so it will be less messy....

Edit: also, it won't work :P var mob; [ lmao
 
Last edited:
Use mapeditor
Add mobs in the map then save the map.
Dump the map and replace and your done.
Supersonic's way work if u wish to spend about 30-60 minutes on one map.
I guess I didn't explain it well.
I meant that if he wants to spawn a monster in different maps, he will have to set fixed coordinates for all those maps instead of using some kind of a variable (for instance, an object found in all those maps, so you can use it's coords as an indicator - i.e. object.x + something and object.y + something).
Also, finding the coords itself doesn't take "30-60 minutes". It takes a simple command and a few seconds for each map.

And why should he use Mapeditor? He wants to make a boss spawner, not to edit the map...
 
Back