Thread: Xmas event!

Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1 Xmas event! 
    dead pker
    Guest
    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:
     

  2. #2  
    Skillz
    Guest
    Thanks man...R3p for j00
     

  3. #3  
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    Nice 471 game frame on your client also Nice coding.
    Level me up

    Not allowed
     

  4. #4  
    elkoi
    Guest
    lol, that's awesome nice job dude!
     

  5. #5  
    raimonduo
    Guest
    Dude this is awesome works realy well and no errors =D TY!
     

  6. #6  
    Donator

    Grep's Avatar
    Join Date
    Nov 2007
    Posts
    180
    Thanks given
    4
    Thanks received
    1
    Rep Power
    130
    verynice! i like the event much keep up the good work =]
     

  7. #7  
    Registered Member $esame st's Avatar
    Join Date
    Aug 2007
    Posts
    93
    Thanks given
    0
    Thanks received
    0
    Rep Power
    39
    Small,Lil,Tiny but Useful Help

    BEST TUT IN THE WORLD FOR 2007 XMAS EVENT!

    ^ Link ^

    Also get them to add this as it may help to stopping people from getting lots and lots of santas

    search for...
    Code:
    case 14604:
    and in that case (probably below the additem) add this...
    Code:
    xmasevent = 1;
    then search for...
    Code:
    	if (command.equalsIgnoreCase("xmas"))
    and then change that whole code to this awesome code...
    Code:
    	if (command.equalsIgnoreCase("xmas"))
    		if (xmasevent == 0) {
    		teleportToX = 3222;
    		teleportToY = 3372;
                    ChristmasEventMenu();
    	} else if (xmasevent == 1) {
    	    sendMessage("You have already done the Christmas Event!");
    	}
    Now keep going we are almost done!

    search for...
    Code:
    public int mageTimer = 0;
    and under it add this...
    Code:
    public int xmasevent = 0;
    ok now we must add the part where it saves it all AWESOME!!!

    first search for this....
    Code:
    } else if (token.equals("character-starter")) {
    IF YOU DONT HAVE GO INTO YOUR MOREINFO FOLDER AND FIND ONE OF THE LITTLE SAVING THINGS (i dont know name) AND THEN JUST CHANGE "character-starter" to what ever you found and then search...NEVER GIVE UP!

    now under...
    Code:
    } else if (token.equals("character-starter")) {
    starter = Integer.parseInt(token2);
    add this...
    Code:
    } else if (token.equals("character-xmas")) {
    xmasevent = Integer.parseInt(token2);
    now search for...(now again for those who didnt have the above you will need to change the character-starter to your thing)
    Code:
    			characterfile.write("character-starter = ", 0, 20);
    			characterfile.write(Integer.toString(starter), 0, Integer.toString(starter).length());
    			characterfile.newLine();
    Under it add this...
    Code:
    			characterfile.write("character-xmas = ", 0, 20);
    			characterfile.write(Integer.toString(xmasevent), 0, Integer.toString(xmasevent).length());
    			characterfile.newLine();
    PM ME FOR ANY HELP!
    I TRIED TO MAKE THIS VERY EASY FOR THE STARTERS OF CODING! BUT FEEL FREE TO ASK ANY QUESTIONS!


    BY $ESAME ST
    ORIGINAL TUT BY
    DEAD PKER (the xmas event)
    Elite Series Coder
    RSBot Scripter
    RSBot Full Member
    Likes Boobs
     

  8. #8  
    Member
    Join Date
    Jul 2007
    Age
    30
    Posts
    331
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    I tryd that and I still can get alot of santa's
    Im back?
     

  9. #9  
    dead pker
    Guest
    Thanks for all the good feedback guys im glad you liked it


    Edit: $esame i was gonna add that into the code but for some reason when i tryed it, it would erase the character file and make it say they are already on, if you can please fix it then i will add it because it is a good code
    Last edited by dead pker; 12-02-2007 at 03:09 AM. Reason: added message
     

  10. #10  
    Icy Realm Owner
    Icy Whip's Avatar
    Join Date
    May 2007
    Posts
    1,419
    Thanks given
    30
    Thanks received
    35
    Rep Power
    213
    very nice will be helpful on me server


    Signature made by Mr. Ervis

    Any questions, MSN me; [email protected]
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •