• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

DigitalStory's Boss Spawner

Newbie Spellweaver
Joined
Jun 12, 2011
Messages
73
Reaction score
5
Hello guys I'm kinda new here and I just made this boss spawner and I like it I hope you will like it too.

BTW: this is my first release so please i would very much like it that you would not flag.


Add this into NPCConversationManager ("YourRepack"/src/net/sf/odinms/scripting/npc/NPCConversationManager.java

PHP:
public void killAllMobs() {
        MapleMap map = getPlayer().getMap();
        double range = Double.POSITIVE_INFINITY;
        List<MapleMapObject> monsters = map.getMapObjectsInRange(getPlayer().getPosition(), range, Arrays.asList(MapleMapObjectType.MONSTER));
        for (MapleMapObject monstermo : monsters) {
            MapleMonster monster = (MapleMonster) monstermo;
            map.killMonster(monster, getPlayer(), false);
        }
    }
^^ Its Prolly gonna give you errors at mapleMapObject so click the light bulb and press what ever its telling you to do and it should work^^


And add this aswell

PHP:
 public void summonMob(int mobid, int customHP, int customEXP, int amount) {
        MapleMonsterStats newStats = new MapleMonsterStats();
        if (customHP > 0) {
            newStats.setHp(customHP);
        }
        if (customEXP >= 0) {
            newStats.setExp(customEXP);
        }
        if (amount <= 1) {
            MapleMonster npcmob = MapleLifeFactory.getMonster(mobid);
            npcmob.setOverrideStats(newStats);
            npcmob.setHp(npcmob.getMaxHp());
            getPlayer().getMap().spawnMonsterOnGroudBelow(npcmob, getPlayer().getPosition());
        } else {
            for (int i = 0; i < amount; i++) {
                MapleMonster npcmob = MapleLifeFactory.getMonster(mobid);
                npcmob.setOverrideStats(newStats);
                npcmob.setHp(npcmob.getMaxHp());
                getPlayer().getMap().spawnMonsterOnGroudBelow(npcmob, getPlayer().getPosition());
            }
        }
    }

Now this is the NPC script I have it into a PlayerNPC I named MobSpawner but if you do not have PlayerNPC add this into 1012103.js witch is Natalie and its found in ("YourRepack"/script/npc/1012103.js

PHP:
//Made By Kevin of DigitalStory
//This is Natalie
//Posted in RaGEZoNE

var status = -1;

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) {
		cm.sendNext("I'm #rDigitalStory#k's boss spawner I will summon any boss listed below for 15million mesos!");
		} else if (status == 1) {
			cm.sendSimple("Please choose: #b\r\n#L4#Rooster#l\r\n#L12#Moss Snail#l\r\n#L11#Moss Mushroom#l\r\n#L6#MushMom#l\r\n#L7#Jr.Balrog#l\r\n#L9#Male Boss#l\r\n#L1#Headless Horseman#l\r\n#L2#Black Crow#l#b\r\n#L0#Papulatus clock#l\r\n#L8#Pianus#l\r\n#L5#BigFoot#l\r\n#L3#Anego#l\r\n#L10#Body Guard A#l\r\n#L13#Kill Monsters");
		} else {
		
		
			if (selection == 0) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(8500001, 23000000, 596000, 1); // Pap Clock
                    cm.dispose();
				}
				
				
			} else if (selection == 1) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9400549, 500000, 300000, 1); // HeadLess HorseMan
                    cm.dispose(); 
				}
				
				
			} else if (selection == 2) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9400014, 35000000, 2000000, 1); // Black Crow
                    cm.dispose();
				}
				
				
			} else if (selection == 3) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9400121, 75000000, 5000000, 1); // Anego
                    cm.dispose();
				}
				
				
			} else if (selection == 4) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9600001, 1000, 500, 1); // Rooster
                    cm.dispose();
				}
				
				
			} else if (selection == 5) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9400575, 5000000, 5000000, 1); // BigFoot
                    cm.dispose();
				}
				
				
			} else if (selection == 6) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9500124, 25000, 50000, 1); // Mushmom
                    cm.dispose();
				}
				
				
				} else if (selection == 7) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(8130100, 100000, 100000, 1); // Jr. Balrog
			        cm.dispose();
				}				
				

				} else if (selection == 8) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(8510000, 5000000, 1000000, 1); // Pianus
			        cm.dispose();    
					}
					
					
				} else if (selection == 9) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					 cm.summonMob(9400120, 2500000, 500000, 1); // Male Boss
			         cm.dispose();
					}
					
					
				} else if (selection == 10) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(9400112, 50000000, 8000000, 1); // Body Guard A
			        cm.dispose();
					}
					
					
				} else if (selection == 11) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(5250000, 50000, 10000, 1); // Moss Mushroom
					cm.dispose();
					}
					
					
				} else if (selection == 12) {
				if (cm.getMeso() < 15000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-15000000);
					cm.summonMob(4250000, 25000, 5000, 1); // Moss Snail
			        cm.dispose();
				}
				
				
				} else if (selection == 13) {
				if (cm.countMonster() >= 1) {
		            cm.killAllMobs();
		            cm.dispose();
			  } else { 
			        cm.sendOk("Theres no Monsters on the map");
		}
				
				
				
			} else {
				cm.dispose();
			}
		}
	}
}

Well... it works for me. Hope it works for you

PS: If you have any questions please email me at KevinSoccer55@hotmail.com :eek:tt1:

**Screen Shots**

KevinSoccer5 - DigitalStory's Boss Spawner - RaGEZONE Forums

KevinSoccer5 - DigitalStory's Boss Spawner - RaGEZONE Forums

KevinSoccer5 - DigitalStory's Boss Spawner - RaGEZONE Forums

KevinSoccer5 - DigitalStory's Boss Spawner - RaGEZONE Forums


** EDIT **

This is for people who want a boss spawner that spawns moonsters with a limit of 10 at a time for free (I just got my computer back and alot of my players were not enjoying the fact that it costed money so i set it back to a limit for free) anyways here is is

PHP:
//Made By Kevin of DigitalStory 
//This is PlayerNPC MobSpawner


var status = -1; 

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

function action(mode, type, selection) { 
    if (mode == -1) { 
        cm.sendOk("Well come back soon!"); 
        cm.dispose(); 
    } else { 
        if (mode == 1) { 
            status++; 
        } else { 
            status--; 
        } 

        if (status == 0) { 
        cm.sendNext("I'm #rDigitalStory#k's boss spawner I will summon any boss listed below for #rFREE"); 
        } else if (status == 1) { 
            cm.sendSimple("Please choose: #b\r\n#L4#Rooster#l\r\n#L12#Moss Snail#l\r\n#L11#Moss Mushroom#l\r\n#L6#MushMom#l\r\n#L7#Jr.Balrog#l\r\n#L9#Male Boss#l\r\n#L1#Headless Horseman#l\r\n#L2#Black Crow#l#b\r\n#L0#Papulatus clock#l\r\n#L8#Pianus#l\r\n#L5#BigFoot#l\r\n#L3#Anego#l\r\n#L10#Body Guard A#l\r\n#L13##rKill Monsters"); 
        } else { 
         
         
            if (selection == 0) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else {    
                    cm.summonMob(8500001, 23000000, 596000, 10); // Pap Clock 
                    cm.dispose(); 
                } 
                 
                 
            } else if (selection == 1) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else {              
                    cm.summonMob(9400549, 500000, 300000, 10); // HeadLess HorseMan 
                    cm.dispose();  
                } 
                 
                 
            } else if (selection == 2) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else {  
                    cm.summonMob(9400014, 35000000, 2000000, 10); // Black Crow 
                    cm.dispose(); 
                } 
                 
                 
            } else if (selection == 3) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(9400121, 75000000, 5000000, 10); // Anego 
                    cm.dispose(); 
                } 
                 
                 
            } else if (selection == 4) { 
                if (cm.countMonster() >= 1) {  
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(9600001, 1000, 500, 10); // Rooster 
                    cm.dispose(); 
                } 
                 
                 
            } else if (selection == 5) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(9400575, 5000000, 5000000, 10); // BigFoot 
                    cm.dispose(); 
                } 
                 
                 
            } else if (selection == 6) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(9500124, 25000, 50000, 10); // Mushmom 
                    cm.dispose(); 
                } 
                 
                 
                } else if (selection == 7) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(8130100, 100000, 100000, 10); // Jr. Balrog 
                    cm.dispose(); 
                }                 
                 

                } else if (selection == 8) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(8510000, 5000000, 1000000, 10); // Pianus 
                    cm.dispose();     
                    } 
                     
                     
                } else if (selection == 9) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                     cm.summonMob(9400120, 2500000, 500000, 10); // Male Boss 
                     cm.dispose(); 
                    } 
                     
                     
                } else if (selection == 10) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(9400112, 50000000, 8000000, 10); // Body Guard A 
                    cm.dispose(); 
                    } 
                     
                     
                } else if (selection == 11) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(5250000, 50000, 10000, 10); // Moss Mushroom 
                    cm.dispose(); 
                    } 
                     
                     
                } else if (selection == 12) { 
                if (cm.countMonster() >= 1) {   
                    cm.sendOk("Sorry but there is still monsters on the map."); 
                    cm.dispose(); 
                    return; 
                } else { 
                    cm.summonMob(4250000, 25000, 5000, 10); // Moss Snail 
                    cm.dispose(); 
                } 
                 
                 
                } else if (selection == 13) { 
                if (cm.countMonster() >= 1) { 
                    cm.killAllMobs(); 
                    cm.dispose(); 
              } else {  
                    cm.sendOk("Theres no Monsters on the map"); 
        } 
                 
                 
                 
            } else { 
                cm.dispose(); 
            } 
        } 
    } 
}
 
Last edited:
Newbie Spellweaver
Joined
Jun 9, 2011
Messages
13
Reaction score
8
PHP:
//Made By Kevin of DigitalStory
//This is Natalie
//Posted in RaGEZoNE

var mobs = [[8500001, 23000000, 596000], [9400549, 500000, 300000], [9400014, 35000000, 2000000], [9400121, 75000000, 5000000], [9600001, 1000, 500], 
			[9400575, 5000000, 5000000], [9500124, 25000, 50000], [8130100, 100000, 100000], [8510000, 5000000, 1000000], [9400120, 2500000, 500000],
			[9400112, 50000000, 8000000], [5250000, 50000, 10000], [4250000, 25000, 5000]];
			
function start() {
	var talk = "I'm #rDigitalStory#k's boss spawner I will summon any boss listed below for 15million mesos! Please choose:\r\n"
	for (var i = 0; i < mobs.length; talk += "#L" + i + "##b#o" + mobs[i][0] + "\r\n", i++);
	talk += "#L" + mobs.length + "#Kill Monsters";
	cm.sendSimple(talk);
}

function action(mode, type, s) {
	cm.dispose();
    if (mode != 1) {
        cm.sendOk("Are you sure? Scaredy cat :<");
        return;
    }
	if (s < mobs.length) {
		if (cm.getMeso() < 15000000) {
			cm.sendOk("You do not have enough mesos.");
            return;
		}
		cm.gainMeso(-15000000);
		cm.summonMob(mobs[s][0], mobs[s][1], mobs[s][2], 1);
	} else 
		cm.killAllMobs();
}

I shortened it to show you how much time arrays can save.
Nice job, but try to work on more advanced scripting methods so you don't have to make your scripts so redundant!
 
Last edited:
Legendary Battlemage
Loyal Member
Joined
Dec 13, 2010
Messages
649
Reaction score
140
Good job :) I'm sure you put a lot of work into this.

I agree, CodeSomeBS did put some effort into this :O: .

But, @OP, nice job for your first try.
 
Newbie Spellweaver
Joined
Jun 12, 2011
Messages
73
Reaction score
5
PHP:
//Made By Kevin of DigitalStory
//This is Natalie
//Posted in RaGEZoNE

var mobs = [[8500001, 23000000, 596000], [9400549, 500000, 300000], [9400014, 35000000, 2000000], [9400121, 75000000, 5000000], [9600001, 1000, 500], 
			[9400575, 5000000, 5000000], [9500124, 25000, 50000], [8130100, 100000, 100000], [8510000, 5000000, 1000000], [9400120, 2500000, 500000],
			[9400112, 50000000, 8000000], [5250000, 50000, 10000], [4250000, 25000, 5000]];
			
function start() {
	var talk = "I'm #rDigitalStory#k's boss spawner I will summon any boss listed below for 15million mesos! Please choose:\r\n"
	for (var i = 0; i < mobs.length; talk += "#L" + i + "##b#o" + mobs[i][0] + "\r\n", i++);
	talk += "#L" + mobs.length + "#Kill Monsters";
	cm.sendSimple(talk);
}

function action(mode, type, s) {
	cm.dispose();
    if (mode != 1) {
        cm.sendOk("Are you sure? Scaredy cat :<");
        return;
    }
	if (s < mobs.length) {
		if (cm.getMeso() < 15000000) {
			cm.sendOk("You do not have enough mesos.");
            return;
		}
		cm.gainMeso(-15000000);
		cm.summonMob(mobs[s][0], mobs[s][1], mobs[s][2], 1);
	} else 
		cm.killAllMobs();
}

I shortened it to show you how much time arrays can save.
Nice job, but try to work on more advanced scripting methods so you don't have to make your scripts so redundant!

Wow!! You see I'm not THAT good at codgin ATM lol well thanks alot this is VERY helpful
I might say makes mine look like garbage :eek:tt1:
Thank you CodeSomeBS!

---------- Post added at 08:53 PM ---------- Previous post was at 08:52 PM ----------

Um I'v been trying to add countmonster to it Like I have countMonster inside my NPCConversationMageger its just everitime I add killallMobs WITH count monsetr the kill all dont work anymore anyone have ideas...

PS: Thats the reason i added Money
If i have the countMonster It would be free Thanks!
 
Newbie Spellweaver
Joined
Dec 3, 2010
Messages
46
Reaction score
6
Well, When i click on my Mob spawner i click on Pianus or another boss and it takes my money but no summon.
And i don't get a error from "Npc is not working"
But when i click END CHAT its normaly but no summom..

Help? i use the Stuff from this tutorial and the npc from CodedSomeBS
 
Junior Spellweaver
Joined
Jun 2, 2010
Messages
105
Reaction score
63
I know you're new and all, but this is a release section; not a "look at what I can do!" section. If you want people to help improve your code, post it in the help section. If you actually believe that your release might help someone, only THEN post it here.
 
Newbie Spellweaver
Joined
Jun 24, 2011
Messages
16
Reaction score
0
I know you're new and all, but this is a release section; not a "look at what I can do!" section. If you want people to help improve your code, post it in the help section. If you actually believe that your release might help someone, only THEN post it here.

He obviously doesn't want help, I played his server... The NPC is complete, he's releasing it for noobs like me who actually think it is useful. Since he doesn't want help he's giving it away.

Good job :) I'm sure you put a lot of work into this.
 
Last edited:
Junior Spellweaver
Joined
Jun 2, 2010
Messages
105
Reaction score
63
He obviously doesn't want help, I played his server... The NPC is complete, he's releasing it for noobs like me who actually think it is useful. Since he doesn't want help he's giving it away.

I mean help by giving it away. Which he isn't, since there isa wide variety of way better spawner NPCs in this section alone. He's actually doing more harm than good, he might turn the attention away from a better boss spawner which would teach you better coding habits.
 
Newbie Spellweaver
Joined
Jun 12, 2011
Messages
73
Reaction score
5
Well, When i click on my Mob spawner i click on Pianus or another boss and it takes my money but no summon.
And i don't get a error from "Npc is not working"
But when i click END CHAT its normaly but no summom..

Help? i use the Stuff from this tutorial and the npc from CodedSomeBS

Um its prolly because you got an error in your cm.summonMob thing in Java go review it or you proly forgot to move the new JAR file and replace with the old JAR file :)

(Still having errors contact me at EMAIL: Kevinsoccer55@hotmail.com)
 
Newbie Spellweaver
Joined
Jun 12, 2011
Messages
73
Reaction score
5
I know you're new and all, but this is a release section; not a "look at what I can do!" section. If you want people to help improve your code, post it in the help section. If you actually believe that your release might help someone, only THEN post it here.

Um I never ONCE said anywhere in the release "Help me make this code better" I just said release boss spawner they just posted there better version of my script..
 
Junior Spellweaver
Joined
Jun 2, 2010
Messages
105
Reaction score
63
Um I never ONCE said anywhere in the release "Help me make this code better" I just said release boss spawner they just posted there better version of my script..

I never said you did, I said you should. Because releasing it just to say "look at what I can do" is pretty lame dude.
 
Newbie Spellweaver
Joined
Jun 12, 2011
Messages
73
Reaction score
5
I never said you did, I said you should. Because releasing it just to say "look at what I can do" is pretty lame dude.

Oh.. Ok well thanks for the advice I'l be sure to keep it in mind!
:)
 
Back
Top