- Joined
- Apr 9, 2008
- Messages
- 1,415
- Reaction score
- 168
its an old post but hey no one looks at the post date anymore =.=You dont need to compile anything
its an old post but hey no one looks at the post date anymore =.=You dont need to compile anything
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![]()
/* 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();
}
}
}
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(); } } }
I guess I didn't explain it well.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.