• 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.

Several Releases

Experienced Elementalist
Joined
Mar 21, 2011
Messages
237
Reaction score
118
This first one is a type of PvP where upon death by your killer, you lose all the items that you have equipped. It's sorta like.. runescape PvP where you lose everything, so it's like taking a risk going in, but can possibly lead to high rewards. If you are going to use this, i am assuming you already have PvP added and working.

Type of PvP:
Place the following method anywhere in MapleCharacter.java:

PHP:
    public void dropEquippedItems() {
        List<IItem> items = new LinkedList<IItem>();
        for(IItem equips : getInventory(MapleInventoryType.EQUIPPED)) {
            items.add(equips);
        }
        for(IItem equips : getInventory(MapleInventoryType.EQUIPPED)) {
            IItem toDrop = MapleItemInformationProvider.getInstance().getEquipById(equips.getItemId());
            getMap().spawnItemDrop(this, this, toDrop, this.getPosition(), true, true);
        }
        for (IItem item : items) {
            MapleInventoryManipulator.removeById(client, MapleInventoryType.EQUIPPED, item.getItemId(), item.getQuantity(), false, false);
        }
    }
*Partial credits to NemesisToKill for helping with the List.*


Now go into MaplePvP.java ( Or w.e your main PvP class is ), and search for the MonsterBomb method. Near the bottom, you'll see something that looks like this:

PHP:
map.killMonster(pvpMob, player, false);

Above that, you'll see a block of code that checks if the player is dead. Above the last "}" in that block of code, add:

PHP:
	int[] maps = {910000010, 910000011, 910000012};
	for (int i = 0; i < maps.length; i++)
        if (attackedPlayers.getMapId() == maps[i]) {
			attackedPlayers.dropEquippedItems();
        }
*Note* Change the values in the array maps to change what maps this occurs in.

And you are now done. :)

Now, you just need a warper to warp the players to the map they want to go to, and the type of PvP. Something like :

PHP:
/*
	Veda
	PvP Warper ( Hardcore pvp = lose equips )
*/

status = 0;
maps = [910000010, 910000011, 910000012, 910000007, 910000008, 910000009];

function start() {
	cm.sendSimple(" #b Hello there, what type of Player v Player (PvP) would you like to do? \r\n #L0# High Roller ( Lose Equips ) #l\r\n #L1# Regular PvP #l#r\r\n #L2# Explain High Roller #l\r\n #L3# Explain Regular PvP #k");
}

function action(m,t,s) {
	if (m < 1) {
		cm.dispose();
		return;
	} else {
		status++;
		}
	if (status == 1) {
		if (s == 0 || s == 1) {
			cm.sendSimple(s == 0 ? " #b What map would you like to enter? \r\n #L0# High Roller Map 1 #l\r\n #L1# High Roller Map 2 #l\r\n #L2# High Roller Map 3" : " #b What map would you like to enter? \r\n #L3# Regular PVP Map 1 #l\r\n #L4# Regular PVP Map 2 #l\r\n #L5# Regular PVP Map 3");
		} else if (s == 2 || s == 3) {
			cm.sendOk(s == 2 ? "#b \t\t\t\t\t\t\t\t\t #rHigh Roller#k \r\n \t\t\t\t High roller is a type of PvP where on the instance of death, all of your equips that you are currently wearing will be dropped for the other player to loot. \r\n #r*Note*#k If you lose items on accident, it is your fault and do not ask GMs to replace your items. " : "#b \t\t\t\t\t\t\t\t\t #rRegular PvP#k \r\n \t\t\t\t Regular PvP is the type of PvP where you do not lose anything upon death, other than another obtained PvPDeath. No items will be lost upon your death, nor will you receive items for killing other players. "); 	
			cm.dispose();
		}
	} else if (status == 2) {
		cm.warp(maps[s], 0);
		cm.dispose();
	}
}

This next release is something called "Pet Contest". In this "Game Mode", two players are sent into a random map ( Based on whether or not players are in the map the player is trying to be sent to ) and it's a face off of two pets. The two players use pet commands like "poop" or "sit" and at the end, the player with the most points wins a prize, and the loser gets a consolation prize. You can only play this game one time a day.

Add these commands into MapleCharacter.java:


PHP:
    private long petctime;
	private int petpoints;
	
	public int getPetPoints() {
        return this.petpoints;
    }

    public void setPetPoints(int petpointz) {
        this.petpoints = petpointz;
    }

    public void addPetPoints(int amount) {
        setPetPoints(getPetPoints() + amount);
    }
	
	public long getLastPetTime() {
        return petctime;
    }

    public long setLastPetTime() {
        return petctime = System.currentTimeMillis() / 60000;
    }
   
    public int getHighestPetPoints() {
        int petpointz = 0, id = 0;
        for(MapleCharacter chr : getPartyMembers()) {
            if(chr.getPetPoints() > petpointz) {
                petpointz = chr.getPetPoints();
                id = chr.getId();
            }
        }
      return id;
    }
*Credits to Sharky for the getHighestPetPoints method*

Now, we need to save/load petctime. PetPoints don't need to be saved or loaded.

Add :
PHP:
            ps = con.prepareStatement("UPDATE accounts SET petctime = ? WHERE id = ?");
            ps.setLong(1, petctime);
            ps.setInt(2, client.getAccID());
            ps.executeUpdate();
            ps.close();

Under:
PHP:
            if (cashshop != null) {
                cashshop.save();
            }

Now run this SQL:

PHP:
ALTER TABLE `accounts`
ADD COLUMN `petctime` INT(12) NOT NULL DEFAULT 0;

Now, all you need is the NPC:

PHP:
/* 
	Veda
	Pet Contest Warper ( Most is handled in MapleCharacter.warptoPetContest )
*/

importPackage(Packages.java.lang); // System for the current time.

status = 0;

function start() {
	if (cm.getParty() != null) {
		if (cm.getParty().getMembers().size() <= 2) {
			if (cm.isLeader()) {
			for (var i = 0; i < cm.getParty().getMembers().size(); i++)
				if (cm.getParty().getMembers().get(i).getMapId() == 910000000) {
					cm.sendSimple(" Hello there! Would you like to start a Pet Contest? \r\n #L0# Yes #l\r\n #L1# Explain Pet Contest #l\r\n #L2# No");
				} else {
					cm.sendOk("Please have your party members all be in the Free Market Enterance. ");
					cm.dispose();
				}
			} else {
				cm.sendYesNo(" I see you are in a party. If you would like to do the Pet Contest, please hit yes. You must do this to be able to play.");
				status = 1;
			}
		} else {
			cm.sendOk(" You need a party of 2 players; but no more. ");
			cm.dispose();
		}
	} else {
		cm.sendOk(" Please get into a party to use me. ");
		cm.dispose();
	}
}

function action(m,t,s) {
	if (m < 1) {
		cm.dispose();
		return;
	} else {
		status++;
		}
	if (status == 1) {
		if (s == 0) {
			cm.getPlayer().setPetPoints(1);
			for (var i = 0; i < cm.getParty().getMembers().size(); i++)
				if (cm.getParty().getMembers().get(i).getPetPoints() >= 1) {
					cm.sendNext(" Ok, I see your party is eligble for this task. You are now ready to go inside. ");
					status = 2;
				} else {
					cm.sendOk(" Please have your party member talk to me, so he can become eligible to participate.");
					cm.getPlayer().setPetPoints(0);
					cm.dispose();
				}
		} else if (s == 1) {
			cm.sendOk(" Pet Contest is a contest where two contestants battle with their pets. Each player is warped to a map, and have 3 minutes to gain the most closeness with their pets in the given time. The winner gains 3k nx, and the other 30,000 mesos for trying. ");
			cm.dispose();
		}
	} else if (status == 2) {
		cm.getPlayer().setPetPoints(1);
		cm.dispose();
	} else if (status == 3) {
		var curtime = System.currentTimeMillis() / 60000;
		if (curtime - cm.getPlayer().getLastPetTime() >= 1440) {
			cm.getPlayer().warptoPetContest(0, 0, 1);
		} else {
			cm.sendOk(" Sorry, you may only participate one time a day. ");
		}
	}
	cm.dispose();
}

This next release a concept i like to call "One Reborn". This concept is for pretty low rate servers, specifically made for a 40x exp server. What this release does is, well let me tell you an exmaple. Let's say you train to level 200 ( Hard to do in a low rate server ) Now you, the server owner, need to make the choice whether to have reborns ( To give players things to do after they hit highest level ), or to not. Now with this, it's a little bit of both. If you add reborns, you basically take out the need to have all 5 classes. Thats why, in GMS, different jobs team up together to fight towards a common goal, causing people to interact. So i took this feature of GMS and made it into "One Reborn". Now, with one reborn, when you hit level 200 you have a option. Keep playing on your level 200 not caring for the world, or, start a new account. Now when you start this new account, you will have a choice. Either A) Accept HardMode or B) Decline it. If you accept hard mode, your exp rate will decrease by 1/2 of the current one. I.e if it's 40, it will become 20. This makes the leveling to 200 more challenging. Now, when a player hits 200 on this new account, they have a new choice. To reborn or not. If they choose to reborn, they will keep all AP, and all currently binded skills (Like regular reborns) but will also go into super hard mode. Super hard mode is 1/4 the Exp rate, I.e 40x becomes 10x. Once the palyer hits 200 after reborned, they no longer can reborn. This helps keeps the players entertained with leveling, and also has people work together.

First, add these to MapleCharacter.java:

PHP:
	public static int difficulty;
    public static int getDifficulty() {
        return MapleCharacter.difficulty;
    }

    public static void setDifficulty(int newdifficulty) {
        MapleCharacter.difficulty = newdifficulty;
    }

    public boolean inHardMode() {
        return (getDifficulty() == 10 ? true : false);
    }

    public boolean inSuperHardMode() {
        return (getDifficulty() == 20 ? true : false);
    }
	
     public void doReborn() {
        if (getReborns() == 0) {
            addReborns(1);
            setDifficulty(20);
            List<Pair<MapleStat, Integer>> reborn = new ArrayList<Pair<MapleStat, Integer>>(4);
            setLevel(1);
            setExp(0);
            setJob(MapleJob.BEGINNER);
            updateSingleStat(MapleStat.LEVEL, 1);
            updateSingleStat(MapleStat.JOB, 0);
            updateSingleStat(MapleStat.EXP, 0);
        try {
            getClient().getChannelServer().getWorldInterface().broadcastMessage(getName(), MaplePacketCreator.serverNotice(6, "" + getName() + " has just rebirthed! Congragulate them on such an amazing accomplisment! ").getBytes());
        } catch (RemoteException e) {
            getClient().getChannelServer().reconnectWorld();
        }
        } else {
            this.ban("Getting more than one reborns", true);
        }
    }

Now add this to the end of the levelUp() metohd in MapleCharacter.java:

PHP:
        if (getLevel() == 200 && getDifficulty() == 0) {
            setDifficulty(1);
        }
        if (getLevel() == 200 && getDifficulty() == 10) {
            NPCScriptManager.getInstance().start(getClient(), 2007, null, null);
        }

And this into gainExp, under the int total = gain + equip;

PHP:
        if (inHardMode()) {
            gain *= (float) .5;
        } else if (inSuperHardMode()) {
            gain *= (float) .25;
		}

And you need to change the script of 2007.js ( In NPCS folder in scripts folder ) To:

PHP:
/*
	Veda
	Hard Mode / Opens on create of new charater.
*/

status = 0;

function start() {
	if (cm.getPlayer().getDifficulty() == 1) {
		cm.sendYesNo(" Hello there brave adventurer! I see you have reached level 200 on a previous account. Would you like to enter Hard Mode for this account? ( Press Yes for more info )");
	} else if (cm.getPlayer().getDifficulty() == 10) {
		cm.sendYesNo(" Oh my! You have reached level 200 in Hard Mode. This is a great accomplishment, and you shall be awarded. Would you like to rebirth now? ");
		status = 9;
	} else {
		cm.sendOk(" Welcome to ProjectJ! We hope you have a great time in our server. Be sure to check out all of the custom features. ");
		cm.dispose();
	}
}

function action(m,t,s) {
	if (m < 1) {
		cm.dispose();
		return;
	} else {
		status++;
		}
	if (status == 1) {
		cm.sendNext("Hard Mode is the mode where you will go through the leveling up process the same, but with one catch: you will have 1/2 the amount of exp you would normally get. -- ( 20x ). ");
	} else if (status == 2) {
		cm.sendNext(" The good thing about Hard Mode is that once you achieve level 200, you can REBIRTH and pick a new job! ( You may only rebirth one time. ). The downside to rebirth, is that you will gain 1/4 of the current EXP rate. ( ~10x ). Upside: You get more skills to use and get more max hp / ap / mp. ");
	} else if (status == 3) {
		cm.sendYesNo(" So, would you like to go into Hard Mode? ");
	} else if (status == 4) {
		cm.getPlayer().setDifficulty(10);
		cm.getPlayer().saveToDB(true);
		cm.dispose();
	} else if (status == 10) {
		cm.sendAcceptDecline(" Once you rebirth, you will enter Super Hard Mode, where you will receive 1/4 of the current exp -- ( 10x ). ");
	} else if (status == 11) {
		cm.getPlayer().doReborn();
		cm.dispose();
	}
}

And then run this sql:
PHP:
ALTER TABLE `accounts`
ADD COLUMN `difficulty` INT(12) NOT NULL DEFAULT 0;


And then save difficulty to the DB:
in saveToDB add :

PHP:
            ps = con.prepareStatement("UPDATE accounts SET difficulty = ? WHERE id = ?");
            ps.setInt(1, difficulty);
            ps.setInt(2, client.getAccID());
            ps.executeUpdate();
            ps.close();
Under:
PHP:
            if (cashshop != null) {
                cashshop.save();
            }


And your done.
 
Last edited:
bleh....
Loyal Member
Joined
Oct 15, 2008
Messages
2,898
Reaction score
1,129
In before anyone trolls this thread. Please give the Topic Starter (TS) time to finish posting the release before posting an opinion about it. RaGEZONE is having issues, so that could be why this thread isn't complete yet.
 
Custom Title Activated
Loyal Member
Joined
Mar 17, 2009
Messages
1,911
Reaction score
538
Well how would this lead to good rewards? People would go in naked or with crappy equips.

Who cares? This idea never came upon me, and anyone can make such great use of this release. Thanks man :)
 
return null;
Loyal Member
Joined
Dec 21, 2008
Messages
805
Reaction score
130
I love this release, I had something similar in my mind.
No people will not run with crappy equipment if they want to kill.
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
Ragezone is seriously lagging, lmao.. anyways I made something like this but it more 'nicer' :] I'll tell you what I mean when this RZ lag spike passes by..
 
Legendary Battlemage
Loyal Member
Joined
Dec 13, 2010
Messages
649
Reaction score
140
Good job, good job. I didn't like most of the releases lately, but this one is good. (Not all releases I didn't like though :O!)
 
bleh....
Loyal Member
Joined
Oct 15, 2008
Messages
2,898
Reaction score
1,129
If Osiris is teaching her I'm sure she is better than Moogra by now. (Rofl :wink:)

You do realize Moogra taught/teaches Osiris a decent amount right? Yes, Osiris knows a lot as is, from learning multiple languages... there have been a few times I've been in chat with both of them and seen Moogra correct Osiris on some things :D:

@OnTopic: This is a great idea. I like it. Very unique and challenging... something that's lacking in a lot of servers these days.
 
Back
Top