ok some notes first:
My first tut on here
And Also
I just thought of this randomly so it might be bad just no flames for it pls
Purpose: To add a little event to pass some time in your server
Difficulty: 1/10 unless you cant c+p lol
Assumed Knowledge: How to c+p
Server Base: phonescape works on any
Classes Modified: client.java, npchandler.java, npc.cfg, autospawn.cfg
Procedure
Step 1: Open up autospawn.cfg and add this above [ENDOFSPAWNLIST]
Code:
spawn = 94 3228 3368 0 0 0 0 0 2 evil mage
spawn = 599 3231 3424 0 0 0 0 0 0 make over mage
close autospawn.cfg
Step 2: Open up your client.java and search for:
Code:
case 14600: // Make over mage chat
Replace from case 14600 to 14604 with this
Code:
case 14600: // Make over mage chat
sendFrame126(GetNpcName(NpcTalkTo), 4902);
sendFrame126("", 4903);
sendFrame126("I see you recived the news!", 4904);
sendFrame126("", 4905);
sendFrame126("", 4906);
sendFrame75(NpcTalkTo, 4901);
sendFrame164(4900);
NpcDialogueSend = true;
break;
case 14601: // Make over mage chat option - choose make over y/n
sendFrame171(1, 2465);
sendFrame171(0, 2468);
sendFrame126("Select an Option", 2460);
sendFrame126("Yes i heard that you needed a cog for santa.", 2461);
sendFrame126("No just go die!", 2462);
sendFrame164(2459);
NpcDialogueSend = true;
break;
case 14602: // Make over mage chat accept offer
sendFrame126(GetNpcName(NpcTalkTo), 4902);
sendFrame126("", 4903);
sendFrame126("Yes may i have the cog? You will be rewarded.", 4904);
sendFrame126("", 4905);
sendFrame126("", 4906);
sendFrame75(NpcTalkTo, 4901);
sendFrame164(4900);
NpcDialogueSend = true;
break;
case 14603: // Make over mage chat option - pay coins - owned k?
sendFrame171(1, 2465);
sendFrame171(0, 2468);
sendFrame126("Select an Option", 2460);
sendFrame126("Sure,here you go.", 2461);
sendFrame126("Nah!", 2462);
sendFrame164(2459);
NpcDialogueSend = true;
break;
case 14604: // Make over mage chat accept coins
if(playerHasItemAmount(20, 1)) {
deleteItem(20, getItemSlot(20), 1);
addItem(1050, 1);
NpcDialogue = 0;
break;
}
else {
sendFrame126(GetNpcName(NpcTalkTo), 4902);
sendFrame126("", 4903);
sendFrame126("Fine you can kiss my ass.", 4904);
sendFrame126("I will just keep your reward asshole.", 4905);
sendFrame126("", 4906);
sendFrame75(NpcTalkTo, 4901);
sendFrame164(4900);
NpcDialogueSend = true;
break;
}
Step 3: Search for MainHelpMenu and under the last } add
Code:
public void ChristmasEventMenu()
{
sendQuest("@gre@Oh No Santa's Slay!", 8144); //Title
clearQuestInterface();
sendQuest("@red@Well when santa was flying to deliver his gifts", 8145);
sendQuest("@gre@an evil mage shot his slay down, and stole a cog!", 8146);
sendQuest("@red@In order to recieve your gift this year you have to", 8147);
sendQuest("@gre@kill that evil mage and give the cog to the make-over-", 8148);
sendQuest("@red@mage located in varrok's range shop.", 8149);
sendQuest("@red@Becareful and Merry Chrismas To All!", 8150);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
Step4:Add this tele command
Code:
else if (command.equalsIgnoreCase("xmas"))
{
teleportToX = 3222;
teleportToY = 3372;
ChristmasEventMenu();
}
Close client.java
Step5:open npchandler.java and search for ItemHandler.addItem
add this under one of the }
Code:
if(npcs[NPCID].npcType == 94)
{
ItemHandler.addItem(20, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
Credits: 100% me
Pic: