You will have to find the triggers that call specific methods or functions and add the code to the trigger. The best bet is not to merge source code instead add onto it.
Like:
[CODE]
@Override
public void forceClose() {
player.getHintIconsManager().removeUnsavedHintIcon();
player.getMusicsManager().reset();
if (Settings.HOSTED)
FriendsChat.requestJoin(player,
Utils.formatPlayerNameForDisplay("help"));
String ip = player.getSession() != null ? player.getSession().getIP()
: null;
if (ip != null && !ips.contains(ip)) {
ips.add(ip);
/*
* The Player will only be allow 3 Accounts Per IP.
* The Player's Main Account will start out with Selective Requirement Levels
* Concerning the action of worship and devotion to Zamorak.
*/
player.getSkills().addXp(Skills.ATTACK, 1210421); // Level 75 for ZGS
player.getSkills().addXp(Skills.DEFENCE, 1210421); // Level 75 for Warpiest
player.getSkills().addXp(Skills.PRAYER, 4470); // Level 20
player.getSkills().addXp(Skills.MAGIC, 273742); // Level 60
player.getSkills().addXp(Skills.RUNECRAFTING, 1475581); // Level 77
/*
* This Server is basis of Zamorakian Worship, other Devotion will be implemented.
* Upon God Wars, creating a Spell or Curse that Target Other NPC to AGGRO other Target NPC.
*
* Devotion will be a form as currency as well. Loyality Points will be rewarded every 10 minutes.
*/
player.getInventory().addItem(new Item(2417, 3)); // Zamorak Staff x 3
player.getInventory().addItem(new Item(3842, 3)); // Zamorak Book of Chaos x3
player.getInventory().addItem(new Item(10461, 3)); // Zamorok Robe Top x 3
player.getInventory().addItem(new Item(10469, 3)); // Zamorak Robe Legs x 3
/*
* Player starts out with 10k coins and 1k Blood Money 1 pair of dice
*/
/*
* Main Account will have Adult Zamorak Hawk
* Subjucations will only have chicks.
* 12506 - Zamorak chick
* 12507 - Zamorak bird
* 12508 - Zamorak hawk
*
* 13453 - Zamorak godsword
* 11708 - Zamorak hilt
*/
player.getInventory().addItem(new Item(12508, 1)); // Zamorak hawk
player.getInventory().addItem(new Item(13453, 1)); // Zamorak godsword
/*
* 32703 - Blood amulet of fury
* 32704 - Blood amulet of fury
* 32705 - Blood amulet of fury (empty) = Blood Money Pendant
* 36735 - Soul gem = Gem used to Charge Blood Money Pendant
* 36836 - Soul-in-a-box = Drops from Demons
*/
player.getInventory().addItem(new Item(32705, 1)); // Blood Money Pendant
player.getInventory().addItem(new Item(36735, 1)); // Soul gem
player.getInventory().addItem(new Item(36836, 3)); // 3 x Souls in a Box
/*
* In order to exchange Blood Money or even collect it, you must have a charged Blood Amulet
* The amount of charges decrease upon every transaction concerning blood money.
* IF you had 100% of 666 Charges, you can only Trade, Exchange, Collect, or even Use Blood Money 666 times.
* To recharge amulets you have to collect the souls of your sacrifices, killing, and offerings to Zamorak.
* To recharge amulets you have to use Soul Gem on Chaos Altar in Wilderness with a total Limted Kill Count.
* The Kill Count is concerned based on a selection of creatures.
* You can accelerate kill counts in God Wars Dungeon or Slaying Demons.
* K'ril Tsutsaroth requirement 1 Kill per full Charge of Soul Gem
* Tormented demon requirement 3 Kills per full Charge of Soul Gem
* Abyssal Demon requirement 6 Kills per full Charge of Soul Gem
* Black Demon requirement 13 Kills per full Charge of Soul Gem
* Greater Demon requirement 36 kills per full Charge of Soul Gem
* Lesser Demons requirement 66 kills per full Charge of Soul Gem
* Imp requirement 666 kills per full Charge of Soul Gem
*/
player.getInventory().addItem(new Item(3848, 1)); // Lighthouse Key
player.getInventory().addItem(new Item(995, 10000)); // Common Coin x 10k
} else
player.getPackets().sendGameMessage(
"You may only have 1 Main Account per player.<br>You are only allow 3 accounts per player!<br>Please respect the Rules.");
player.getDialogueManager().startDialogue(
"SimpleNPCMessage",
23009,
"You have Entered the Abyssal Dimensional Space of SerraHist, where the demons sleeps.<br>You dare venture into the Darkness!!<br>All are welcome!!");
player.getInventory().addItem(new Item(3849, 1)); // Rusty Casket
/*
* Rusty Caskets will contain Treasure Hunter Keys or a Random Rare Reward.
* Lighthouse Key + Rust Casket = TRIGGER_OPEN + ITEM:=(Treasure Hunter Key)
*/
player.getInventory().addItem(new Item(28775, 1)); // Warpriest of Zamorak gauntlets v3
player.getInventory().addItem(new Item(28778, 1)); // Warpriest of Zamorak boots v3
player.getInventory().addItem(new Item(28781, 1)); // Warpriest of Zamorak cuirass v3
player.getInventory().addItem(new Item(28784, 1)); // Warpriest of Zamorak greaves v3
player.getInventory().addItem(new Item(28787, 1)); // Warpriest of Zamorak helm v3
player.getInventory().addItem(new Item(28790, 1)); // Warpriest of Zamorak cape v3
player.getInventory().addItem(new Item(12506, 1)); // Zamorak chick
player.getInventory().addItem(new Item(11708, 1)); // Zamorak hilt
}
-------------------------------------------
/*
* Quest Item Creating
*/
/* ZHAZA CODE */
case 2417: // Zammy Staff
// Zammy Brew & Zammy Staff & 666 Blood Runes (o)
if (player.getInventory().containsItem(2450, 1) && player.getInventory().containsItem(2417, 1) && player.getInventory().containsItem(17383, 666)) {
if (!player.getInventory().hasFreeSlots()) {
player.getPackets().sendGameMessage("Not enough space in your inventory.");
return;
}
if (!player.getInventory().containsItem(17385, 6)) {
player.getPackets().sendGameMessage("You do not bear the significant amount of Blessed Blood Runes<br>You need a total of 6 Blessed Blood Runes");
return;
}
if (!player.getInventory().containsItem(2450, 1)) {
player.getPackets().sendGameMessage("The thirst of power is not great enough!!<br> I need a Zamorakian Brew");
return;
}
player.setNextAnimation(new Animation(811));
player.getInventory().deleteItem(17385, 665);
player.getInventory().deleteItem(2450, 1);
player.getSkills().addXp(Skills.RUNECRAFTING, 362420); //Runecraft
player.getInventory().addItem(17454, 3); // 3 x RoseBlood
player.getInventory().addItem(28251, 1); // 1 x Unfermented Zammy Wine
} else {
player.getPackets().sendGameMessage("You have not shown enough devotion to Zamorak!<br>Now DIE!!!");
//player.getVarsManager().sendVarBit(2032, currentTarget.getEffectsManager().hasActiveEffect(EffectType.POISON);
}
break;
//------------- END ------------
[/CODE]
This was edited using "KEYWORDS" that were pre-programmed into the source code. If you have conflicting KEYWORDS that are called there would be crash.