[Release] AlcoveMs Donator functions/Island npcs/Release

Experienced Elementalist
Joined
May 19, 2008
Messages
281
Reaction score
0
Location
♥ In Your Heart
Im having a donator island on my MS, i dont know if you guys need this. But i hope it would help those MS that needs a donator system.

The npcs check if you're a donator :D


add the following function into your NPCConversationManager.java

PHP:
public boolean isDonator() {
            return c.getPlayer().isDonator();
    }

Next, open your MapleCharacter.java and add the following underneath "private int gm;"

PHP:
private boolean donator;

After that find "ret.gm = rs.getInt("gm") == 0 ? false : true;" and add the following underneath it

PHP:
ret.donator = rs.getInt("donator") == 0 ? false : true;

Lastly, add this boolean

PHP:
public boolean isDonator() {
        return donator;
    }


Save & Compile. . .


For the entrance npc that checks if you're a donator

PHP:
/*
	AlcoveMs Donator Island Entrance NPC
*/

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			if(cm.getChar().isDonator() == false) {
				cm.sendOk("Hmph! You are not a donater! Please donate to access me :D ");
				cm.dispose();
			} else {
				if(cm.getChar().isDonator() == true) {
					cm.sendSimple("Hello #h # ! I am the donater island NPC warper! Please choose an option. \r\n#L0#Goto donator island#l");
				}
			}
		} else if (status == 1) {
			if (selection == 0 ) {
				cm.warp(<InsertYourDonatorIslandMapIDhere>, 0);
				cm.dispose();
			}
		}
	}
}


Remember to execute the following scripts into your MYSQL for it to work

PHP:
alter table characters add donator tinyint(1) NOT NULL default 0;

To add donator access to the character execute this in MYSQL

PHP:
UPDATE characters SET donator='1' where name='CharacterNameHere';


BossRoom NPC that summons monsters of your choice

i allowed donators to have their own bossroom on my MS. I decided to release it as well.

To allow NPC to summon boss, Open up your NPCConversationManager.java and add this

PHP:
public void spawnMonster(int mobid, int HP, int MP, int level, int EXP, int boss, int undead, int amount, int x, int y) {
                MapleMonsterStats newStats = new MapleMonsterStats();
                Point spawnPos = new Point(x,y);
                if (HP != 0) {
                        newStats.setHp(HP);
                }
                if (MP != 0) {
                        newStats.setMp(MP);
                }
                if (level != 0) {
                        newStats.setLevel(level);
                }
                if (EXP != 0) {
                        newStats.setExp(EXP);
                }
                if (boss == 1) {
                        newStats.setBoss(true);
                }
                if (undead == 1) {
                        newStats.setUndead(true);
                }
                for (int i = 0; i < amount; i++) {
                        MapleMonster npcmob = MapleLifeFactory.getMonster(mobid); 
                        npcmob.setOverrideStats(newStats);
                        npcmob.setHp(npcmob.getMaxHp());
                        npcmob.setMp(npcmob.getMaxMp());
                        getPlayer().getMap().spawnMonsterOnGroundBelow(npcmob, spawnPos);
                }
        }

and this is the npc file, add it to any npc that you wanna use.

PHP:
/*
	AlcoveMs BossRoom NPC */

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.sendSimple("Hello #h # ! I am the boss summoner NPC of donator island! Each boss monster that i summon would cost you 3mil mesos because they have more Exp and lesser HP! Would you like to pay me some mesos to spawn some #e Special Boss Monsters #n for you? \r\n Please choose #b\r\n#L1#Papu clock#l\r\n#L2#Pianus#l\r\n#L3#BlackCrow#l\r\n#L4#Anego#l\r\n#L5#BodyGuard A#l\r\n#L6#Bodyguard B#l\r\n#L7#TheBoss!#l#k");
		} else {
			if (selection == 1) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(8500001, 20000000, 2000000, 125, 700000, 1, 0, 1, 430, 238);
					cm.dispose();
				}
			} else if (selection == 2) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(8510000, 24000000, 3000000, 110, 1500000, 1, 0, 1, 827, 238);
					cm.dispose();
				}
			} else if (selection == 3) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(9400014, 30000000, 10000000, 115, 2000000, 1, 0, 1, 430, 238);
					cm.dispose();
				}
			} else if (selection == 4) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(9400121, 70000000, 10000, 130, 4500000, 1, 0, 1, 430, 238);
					cm.dispose();
				}
			} else if (selection == 5) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(9400112, 350000000, 5000, 152, 15000000, 1, 0, 1, 430, 238);
					cm.dispose();
				}
			} else if (selection == 6) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(9400113, 450000000, 50000, 160, 15000000, 1, 0, 1, 430, 238);
					cm.dispose();
				}
			} else if (selection == 7) {
				if (cm.getMeso() < 3000000) {
					cm.sendOk("You do not have enough mesos.");
					cm.dispose();
					return;
				} else {
					cm.gainMeso(-3000000);
					cm.spawnMonster(9400300, 123000000, 10000, 175, 20000000, 1, 0, 1, 430, 238);
					cm.dispose();
				}
			} else {
				cm.dispose();
			}
		}
	}
}


This npc summons, Papuclock,Pianus,BlackCrow,Anego, Bodyguard A/B and the Boss for 3million mesos, it checks if you have 3million before letting you spawn any boss monsters.


and you can allow donators to use # commands by doing this, and player @ commands dont get logged.

replace what you have in your commandprocessor.java with mine ctrl + f this line "public static boolean processCommand(MapleClient c, String line) {"


PHP:
public static boolean processCommand(MapleClient c, String line) {
		return processCommandInternal(c, new ServernoticeMapleClientMessageCallback(c), c.getPlayer().isGM(), c.getPlayer().isDonator(), line);
        }
	
	/* (non-Javadoc)
	 * @see net.sf.odinms.client.messages.CommandProcessorMBean#processCommandJMX(int, int, java.lang.String)
	 */
	public String processCommandJMX(int cserver, int mapid, String command) {
            
		ChannelServer cserv = ChannelServer.getInstance(cserver);
		if (cserv == null) {
			return "The specified channel Server does not exist in this serverprocess";
		}
		MapleClient c = new MapleClient(null, null, new MockIOSession());
		MapleCharacter chr = MapleCharacter.getDefault(c, 26023);
		c.setPlayer(chr);
		chr.setName("/---------jmxuser-------------\\"); // (name longer than maxmimum length)
		MapleMap map = cserv.getMapFactory().getMap(mapid);
		if (map != null) {
			chr.setMap(map);
			SkillFactory.getSkill(5101004).getEffect(1).applyTo(chr);
			map.addPlayer(chr);
		}
		cserv.addPlayer(chr);
		MessageCallback mc = new StringMessageCallback();
		try {
			processCommandInternal(c, mc, true, true, command);
		} finally {
			if (map != null) {
				map.removePlayer(chr);
			}
			cserv.removePlayer(chr);
		}
		return mc.toString();
                
	}

        
	
         private static boolean processCommandInternal(MapleClient c, MessageCallback mc, boolean isGM, boolean donator, String line) {
		MapleCharacter player = c.getPlayer();
		ChannelServer cserv = c.getChannelServer();
                donator = c.getPlayer().isDonator();
                if (line.charAt(0) == '!' && isGM || line.charAt(0) =='@' || line.charAt(0) == '#' && donator) {
			if(isGM){
                        synchronized (gmlog) {
				gmlog.add(new Pair<MapleCharacter, String>(player, line));
			}
			log.warn("{} used a GM command: {}", c.getPlayer().getName(), line);
                        }

allow donators to rebirth without having to look for the Rebirth npc :)

PHP:
} else if (splitted[0].equals("#rebirth")) {
                            int expfix;
                            if (player.getLevel() >= 200) {
                            player.setLevel(1);
                            c.getPlayer().changeJob(MapleJob.getById(0));
                            
                            expfix = c.getPlayer().getExp();
                                      c.getPlayer().gainExp(-expfix, false, false);
				      player.updateSingleStat(MapleStat.EXP, player.getExp()); 
				
                            } else {
                                mc.dropMessage("Rebirth is only available at level 200+");
                            }

credits - alcovems developer 'nejevoli' myself :)
credits - airflow for his boss spawner function
credits - gorgon for his donator commands
credits - localms source


[note] i do not know if this has been release before, i hope it can help someone that needs it. Good day :)



SOME preview, i used valendale for my donator island [credits Davidkun] thanks for the map

i have unlimited hair changer, skill maxer, glove shop, cape shop, pet shop, morph shop, Donator quests npcs, scroll npcs, 6 training grounds with special exp for donators , everything a donator needs =p the exit and entrance npcs check if you're a donator, if you vip rock in , thats it. you get stuck, since its a event map, you cant click 'trade' to fm , or do anything about it :P


here are some screenshots:

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


NPC that sents you into the bossroom, checks if you're a donator.

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


:D

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


The evil guy that spawns monster in the bossRoom for a price ^^ ;D


Had nothing to do , so made a stupid jump quest using forest of patience 1 & 2 :D

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


this is the teleporter that sents you in the starts the jump quest

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


the npc you speak to after completeing the 1st stage of the quest

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


ta da ! the end of the jumping quest

rewards are these super cool cute cash items

nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


nejevoli - [Release] AlcoveMs Donator functions/Island npcs/Release - RaGEZONE Forums


I'll post more, if any of you guys need my files, just let me know. I have tons of exclusve stuffs that i made/leeched from ragezone, i decided not to continue dev in my server, as all along im the only dev doing everything. Tired Z_Z


[^__^]
 
Last edited:
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

lawl why illegal o: nice release btw :D eventho i dun have a server >_>
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Great release! Illegal tho :P

The release is not illegal.
The release is coded for one groups privatley made and released source.
Those files arent supplied with any of nexons owned data :)
Thus you can code what you want for it without any legal obstructions :)
Now what people choose to do with your release is another thing altogether.

Non profit donations are a grey area.
Taking donations and spending them on personal uses is illegal & you can easily get sued. :)
My tip:
If your using you donations to fun server expenses only:
Congrat's your head is on straight and i respect you.
If your using your donations to buy stuff for yourself:
Your disgusting. GTFO!

:)
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Thank you,
I'm using it already, And my Donator island has
a new town, Using PartyQuest's maps,
I will release if you want it.
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Thank you,
I'm using it already, And my Donator island has
a new town, Using PartyQuest's maps,
I will release if you want it.
PQ maps? ._.
so pretty much useless for any server with PQ's....
There are some maps......
town in the east/west/south/north...
Massive array of unused maps there ;o
Might require you to remove reactors / unscript portals *?possible?* / add npc's tho.
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

PQ maps? ._.
so pretty much useless for any server with PQ's....
There are some maps......
town in the east/west/south/north...
Massive array of unused maps there ;o
Might require you to remove reactors / unscript portals *?possible?* / add npc's tho.
Uhm, Amoria PQ maps,
Orbis, Herbtown [pirate] and more,
It's so pretty, you gotta see that before you talk like that.
I deleted useless reactors, monsters and all that.
ill release probally like more 3 days b/c im fixing the ludimaze pq.
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Uhm, Amoria PQ maps,
Orbis, Herbtown [pirate] and more,
It's so pretty, you gotta see that before you talk like that.
I deleted useless reactors, monsters and all that.
ill release probally like more 3 days b/c im fixing the ludimaze pq.

Talk like that? ;O
Im just saying your maps will get tromped all over when those pq's are coded ;o
I mean im all for the idea till someone codes those pq's but, yer uno what i mean.
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Talk like that? ;O
Im just saying your maps will get tromped all over when those pq's are coded ;o
I mean im all for the idea till someone codes those pq's but, yer uno what i mean.
I am using APQ, If there will be released APQ, and weddings,
I'll just back up it.

@ - Mussii, Just kerning, Ludi, LudiMaze, Zakum and guildquest.
APQ, PPQ and such aren't already, And if they will be released,
I will make a bakcu p of the maps.
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Can someone help me??
When I compile whiling using the NPC boss summon person. It gives me 6 errors about maplemonsterstats

Can someone help me?
 
Re: [Release] AlcoveMs Donator Island NPCS, Donator functions.

Can someone help me??
When I compile whiling using the NPC boss summon person. It gives me 6 errors about maplemonsterstats

Can someone help me?
Add to NPCConversionManagar.java this :

public void spawnMonster(int mobid, int HP, int MP, int level, int EXP, int boss, int undead, int amount, int x, int y) {
MapleMonsterStats newStats = new MapleMonsterStats();
Point spawnPos = new Point(x,y);
if (HP != 0) {
newStats.setHp(HP);
}
if (MP != 0) {
newStats.setMp(MP);
}
if (level != 0) {
newStats.setLevel(level);
}
if (EXP != 0) {
newStats.setExp(EXP);
}
if (boss == 1) {
newStats.setBoss(true);
}
if (undead == 1) {
newStats.setUndead(true);
}
for (int i = 0; i < amount; i++) {
MapleMonster npcmob = MapleLifeFactory.getMonster(mobid);
npcmob.setOverrideStats(newStats);
npcmob.setHp(npcmob.getMaxHp());
npcmob.setMp(npcmob.getMaxMp());
getPlayer().getMap().spawnMonsterOnGroundBelow(npcmob, spawnPos);
}
}
 
Back