- Joined
- Aug 1, 2006
- Messages
- 357
- Reaction score
- 68
Sup here is my monster spawning NPC. Really easy to modify.
Add to Mobs array and it will spawn 15 of the chosen mob
Add to Boss array and it will spawn 1 of the chosen mob
Fetches monster name from wz so only need to change Id's
Thanks rm zero for helping me out with the last check.
Enjoy.
Note: This is coded to work with v82 CelinoSEA source. You might have to change around the cm.spawnMob parameters a bit to have the spawner work for your source.
Note#2: Remove world checks if you don't have multi world.
Update -- Removed world check
Add to Mobs array and it will spawn 15 of the chosen mob
Add to Boss array and it will spawn 1 of the chosen mob
Fetches monster name from wz so only need to change Id's
Code:
/* Marat
boss spawn npc
*/
var status = -1;
var x = 0
var mobs = Array(210100, 1110100, 2230101, 5130107, 9410010, 6130101, 9400205, 8190003);
var boss = Array(8500001, 9400014, 8820001, 6300005, 9420546, 9410014, 8800002, 8810026);
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status == 2) {
cm.sendNext("test");
}
status--;
}
if (status == 0) {
var talk = "Hello i am the Fornax training NPC! I can help you train by spawning varius different types of monsters and bosses.\r\n";
var ttalk = "Please select a training monster:\r\n";
for(var t = 0; t < mobs.length; t++){
ttalk += "#L"+ t +"##o"+ mobs[t] +"# x15#l\r\n";
}
var btalk = "\r\n Please select a boss:\r\n";
for(var b = mobs.length; b < mobs.length + boss.length; b++){
btalk += "#L"+ b +"##o"+ boss[b - mobs.length] +"##l\r\n";
}
talk += ttalk;
talk += btalk;
cm.sendSimple(talk);
} else if (status == 1) {
if(selection >= mobs.length){
cm.spawnMob(boss[selection - mobs.length], 1, 0);
cm.dispose();
}
else {
for(var a = 0; a <= 15; a++){
cm.spawnMob(mobs[selection], 1, 0);
}
cm.dispose();
}
}
}
Thanks rm zero for helping me out with the last check.
Enjoy.
Note: This is coded to work with v82 CelinoSEA source. You might have to change around the cm.spawnMob parameters a bit to have the spawner work for your source.
Note#2: Remove world checks if you don't have multi world.
Update -- Removed world check
Last edited by a moderator: