Thread: Christmas event(not for noobs)

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35
  1. #1 Christmas event(not for noobs) 
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    28
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    Purpose: To add a nice holiday event!

    Difficulty: 2/10

    Assumed Knowledge: How to copy and paste, how to not cause 100 errors (stupid noobs), know how to fix your errors if you get any.

    Server Base: Dodian AKA devolution but should work on all

    Classes Modified: Client.java, NPCHandler.java

    Procedure

    Step 1: Adding The Voids...

    Find:
    Code:
    public class client extends Player implements Runnable {
    Underneath that add:
    Code:
    public int cpoints = 0;
    
    public void loadChristmasevent() {
    	IsSnowing = 1;
        sendQuest("Christmas", 640);
        sendQuest("Event",663);
        /*Free Quests*/
        sendQuest("@[email protected] Event", 7332);
        sendQuest("@[email protected] chickens for", 7333);
        sendQuest("@[email protected] points and", 7334);
        sendQuest("@[email protected] them below.", 7336);
        sendQuest("", 7383);
        sendQuest("@[email protected] Points:", 7339);
        sendQuest("", 7340);
        sendQuest("@[email protected]:", 7346);
        sendQuest("@[email protected] Phat - 125", 7341);
        sendQuest("@[email protected] Phat - 130", 7342);
        sendQuest("@[email protected] Phat - 140", 7337);
        sendQuest("@[email protected] Phat - 145", 7343);
        sendQuest("@[email protected] Phat - 150", 7335);
        sendQuest("@[email protected] Phat - 170", 7344);
        sendQuest("@[email protected] @[email protected] - 350", 7345);
        sendQuest("", 7347);
        sendQuest("", 7348);
    }
    Then find;
    Code:
    public boolean process()
    Underneath it add:
    Code:
    	if (cpoints > 124) {
    		sendQuest("@[email protected]" + cpoints + "", 7338);
    	} else if (cpoints < 125) {
    		sendQuest("@[email protected]" + cpoints + "", 7338);
    	}
    Search for:
    Code:
    case 185:
    Underneath it add or replace your quests with this:
    Code:
    case 28164:
    case 28165:
    case 28166:
    case 28168:
    case 28215:
    case 28171:
    case 28170:
    case 28172:
    case 28178:
    break;
    
    case 28173:
    if (cpoints > 124) {
    cpoints -= 125;
    addItem(1046, 1);
    } else if (cpoints < 125) {
    sendMessage("You need 125 points to buy a purple phat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28174:
    if (cpoints > 129) {
    cpoints -= 130;
    addItem(1040, 1);
    } else if (cpoints < 130) {
    sendMessage("You need 130 points to buy a yellow phat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28169:
    if (cpoints > 139) {
    cpoints -= 140;
    addItem(1038, 1);
    } else if (cpoints < 140) {
    sendMessage("You need 140 points to buy a red phat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28175:
    if (cpoints > 144) {
    cpoints -= 145;
    addItem(1044, 1);
    } else if (cpoints < 145) {
    sendMessage("You need 145 points to buy a green phat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28167:
    if (cpoints > 149) {
    cpoints -= 150;
    addItem(1042, 1);
    } else if (cpoints < 150) {
    sendMessage("You need 150 points to buy a blue phat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28176:
    if (cpoints > 169) {
    cpoints -= 170;
    addItem(1048, 1);
    } else if (cpoints < 170) {
    sendMessage("You need 170 points to buy a white phat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28177:
    if (cpoints > 349) {
    cpoints -= 350;
    addItem(1050, 1);
    } else if (cpoints < 350) {
    sendMessage("You need 350 points to buy a santa hat");
    sendMessage("You currently have: " + cpoints + ".");
    }
    break;
    
    case 28179:
    case 28180:
    break;
    Find:
    Code:
    character-energy
    Underneath it add:
    Code:
    } else if (token.equals("character-ChristmasPoints")) {
    cpoints = Integer.parseInt(token2);
    Then find:
    Code:
    characterfile.write("character-energy = ", 0, 19);
    Underneath add:
    Code:
    characterfile.newLine();
    characterfile.write("character-ChristmasPoints = ", 0, 25);
    characterfile.write(Integer.toString(cpoints), 0, Integer.toString(cpoints).length());
    characterfile.newLine();
    Step 2: Adding The Points...

    Find:
    Code:
    if (npcs[i].npcType == 50) {
    Underneath it add:
    Code:
    if (npcs[i].npcType == ANYNPCIDYOUWANTHERE) {
    client c = (client) PlayerHandler.players[GetNpcKiller(i)];
    c.cpoints += 2;
    c.sendMessage("You killed the chicken and recieve 2 points.");
    }
    REMEMBER TO CHANGE THE "ANYNPCIDYOUWANTHERE" TO A NPC ID!

    Feel free to edit but do not leech


    Credits: Me 100%

     

  2. #2  
    kthegcc
    Guest
    add pics plz so i know it wont be a waste of time to do this
     

  3. #3  
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    28
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    ..............................
    Last edited by AlexMason; 12-10-2007 at 05:16 AM. Reason: Double posting is not allowed!

     

  4. #4  
    Donator

    Frosty Teh Snowman's Avatar
    Join Date
    Sep 2007
    Posts
    1,083
    Thanks given
    86
    Thanks received
    256
    Rep Power
    103
    i cant find

    Code:
    if (npcs[i].npcType == 50) {
    not even

    Code:
    if (npcs[i].npcType
    and i have that same source.... any help on where to add???
     

  5. #5  
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    28
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    Assumed Knowledge: How to copy and paste, how to not cause 100 errors (stupid noobs), know how to fix your errors if you get any.

     

  6. #6  
    Member
    Join Date
    Jul 2007
    Age
    28
    Posts
    331
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by pur3frostyx3 View Post
    i cant find

    Code:
    if (npcs[i].npcType == 50) {
    not even

    Code:
    if (npcs[i].npcType
    and i have that same source.... any help on where to add???
    Try NPCHandler
    Im back?
     

  7. #7  
    Community Veteran

    Tasty Noob's Avatar
    Join Date
    Dec 2006
    Posts
    540
    Thanks given
    110
    Thanks received
    67
    Discord
    View profile
    Rep Power
    360

     

  8. #8  
    Registered Member
    AlexMason's Avatar
    Join Date
    Aug 2007
    Age
    28
    Posts
    1,199
    Thanks given
    17
    Thanks received
    27
    Rep Power
    98
    Quote Originally Posted by pur3frostyx3 View Post
    i cant find

    Code:
    if (npcs[i].npcType == 50) {
    not even

    Code:
    if (npcs[i].npcType
    and i have that same source.... any help on where to add???

    Find the part where it says Dad has been slain then add it underneath it

     

  9. #9  
    Donator

    Frosty Teh Snowman's Avatar
    Join Date
    Sep 2007
    Posts
    1,083
    Thanks given
    86
    Thanks received
    256
    Rep Power
    103
    thanks alex and mafia
     

  10. #10  
    sriyegna
    Guest
    umm, so i dun get this , u kill chickens... to get a phat... but its like a minigame???
     

Page 1 of 4 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
  •