Didn't think to post this until now, sorry for the late one.
Not special but just a small Christmas event, saves you lot from having to make something or w/e.
I could have probably included the Dialogues in the event class but, Ah well.
Run down of how it goes//
Talk to a snow man, go and locate the 4 snow imps, talking to them creates a int.
When u talked to all of the imps, talk to snowman again and you'll get teleported to the land of snow..
Talk to Santa for reward, be creative add some objects i had the spawn locations and objects but i can't seem to find them anymore.
So you'll have to make do with it.
Spoiler for Event Class:Code:package server.model.minigames;
import server.Server;
import server.model.players.Client;
import server.util.Misc;
import server.model.players.*;
/**
* Start of ChristmasEvent Class
* Written by: Zack / Erethium
* Used for: 8thGen RSPS
**/
/**
* Players must talk to the Snowman to start event.
* Then talk to all four imps around 8thGen.
* Talk with the SnowMan again.
* Get teleported to land of snow, talk with Santa for reward.
**/
public class ChristmasEvent {
/**
* Starts chats for NPC.
**/
public static void StartEvent(Client c) {
if(c.xmas == 0) {
c.getDH().sendDialogues(2001, 6746);
c.sendMessage("Locate and talk to all four imps.");
c.xmas +=1;
}else if(c.xmas == 5) {
c.getDH().sendDialogues(2019, 6746);
}else if(c.xmas == 1) {
c.getDH().sendDialogues(2002, 6746);
}
}
public static void ImpChat1(Client c) {
if(c.xmas == 1) {
c.xmas +=1;
c.getDH().sendDialogues(2003, 6732);
c.sendMessage("Check Varrock for the next task.");
}
}
public static void ImpChat2(Client c) {
if(c.xmas == 2) {
c.xmas +=1;
c.getDH().sendDialogues(2007, 6732);
c.sendMessage("Check Catherby for the next task.");
}
}
public static void ImpChat3(Client c) {
if(c.xmas == 3) {
c.xmas +=1;
c.getDH().sendDialogues(2011, 6732);
c.sendMessage("Check Edgevile for the next task.");
}
}
public static void ImpChat4(Client c) {
if(c.xmas == 4) {
c.xmas +=1;
c.getDH().sendDialogues(2015, 6732);
}
}
public static void SantaChat(Client c) {
if(c.xmas == 5) {
if (c.getItems().freeSlots() < 1) {
c.sendMessage("Not enough space in inventory.");
return;
}
c.getDH().sendDialogues(2021, 6732);
c.getItems().addItem(1050, 1);
c.xmas += 1;
}else{
c.sendMessage("You have already recieved a present.");
}
}
}
Spoiler for Action Handler:Code:case 9400:
ChristmasEvent.SantaChat(c);
break;
case 6746:
ChristmasEvent.StartEvent(c);
break;
case 6732:
ChristmasEvent.ImpChat1(c);
break;
case 6733:
ChristmasEvent.ImpChat2(c);
break;
case 6734:
ChristmasEvent.ImpChat3(c);
break;
case 6735:
ChristmasEvent.ImpChat4(c);
break;
Spoiler for Dialogue Handler:Code:case 2001:
sendNpcChat3("Merry Christmas, " + c.playerName +".",
"I need your help, four imps are planning to",
"Sabotage Santa's sleigh i need you to stop them!",
c.talkingNpc, "Snowman");
c.nextChat = 2002;
break;
case 2002:
sendNpcChat3("They can be located in @[email protected]@[email protected],",
"@[email protected]@[email protected], @[email protected]@[email protected], @[email protected]@[email protected]",
"You must talk to each and stop them!",
c.talkingNpc, "Snowman");
c.nextChat = 0;
break;
case 2003: //Chat 1
sendNpcChat1("Ahh get away human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 2004;
break;
case 2004:
sendPlayerChat1("How dare you sabotage christmas!", 9850);
c.nextChat = 2005;
break;
case 2005:
c.startAnimation(7530);
sendStatement("You pelt a snow ball at the imp!");
c.nextChat = 2006;
break;
case 2006:
sendNpcChat1("You will regret this human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 0;
break;
case 2007: //Chat 2
sendNpcChat1("Ahh get away human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 2008;
break;
case 2008:
sendPlayerChat1("Take this pesky imp!", 9850);
c.nextChat = 2009;
break;
case 2009:
c.startAnimation(7530);
sendStatement("You pelt a snow ball at the imp!");
c.nextChat = 2010;
break;
case 2010:
sendNpcChat1("You will regret this human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 0;
break;
case 2011: //Chat 3
sendNpcChat1("Ahh get away human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 2012;
break;
case 2012:
sendPlayerChat1("I will destory you imp!", 9850);
c.nextChat = 2013;
break;
case 2013:
c.startAnimation(7530);
sendStatement("You pelt a snow ball at the imp!");
c.nextChat = 2014;
break;
case 2014:
sendNpcChat1("You will regret this human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 0;
break;
case 2015: //Chat 4
sendNpcChat1("Ahh get away human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 2016;
break;
case 2016:
sendPlayerChat1("I will crush your bones!", 9850);
c.nextChat = 2017;
break;
case 2017:
c.startAnimation(7530);
sendStatement("You pelt a snow ball at the imp!");
c.nextChat = 2018;
break;
case 2018:
sendNpcChat1("You will regret this human!",
c.talkingNpc, "Snow Imp");
c.nextChat = 0;
break;
case 2019:
sendNpcChat2("Thank you, " + c.playerName +".",
"I'll send you to Santa for a reward!",
c.talkingNpc, "Snowman");
c.nextChat = 2020;
break;
case 2020:
c.getPA().startTeleport(2656, 5598, 0, "cabbage");
c.getPA().walkableInterface(11877);
c.nextChat = 0;
break;
case 2021:
sendStatement("Merry Christmas from 8thGen.");
c.nextChat = 0;
break;
Spoiler for Player.java:Code:public int xmas = 0;
public boolean xmascomplete = false;
