Thread: [PI] Christmas Event.

Results 1 to 4 of 4
  1. #1 [PI] Christmas Event. 
    Registered Member Otrocity's Avatar
    Join Date
    Aug 2011
    Age
    30
    Posts
    40
    Thanks given
    0
    Thanks received
    1
    Rep Power
    31
    Hey guys i need a bit of help with something,
    So im making my first christmas event, with no tutorial and stuff and im a beginning coder so i was gonna start on an easier christmas event.
    here's my plans.
    1.Use an elf as a transporter.
    2.elf teleports you to a room with a certain boss.
    3.after killing it take a portal back to home.
    4.Talk to santa to open the shop.
    Heres the problem, i can do the teleports and make santa a shop and make npc teleport you, but! the thing i dont know how to do is make it where santa shop will only open if you have defeated the christmas boss.
    Im sure its not hard its just i dont know how.
    If someone could point me in the right direction (what classes are modified) and just use an example i would appreciate it.
    But please do not spoonfeed me im trying to learn so i just need a couple pointers in the right direction.
    Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2011
    Age
    28
    Posts
    1,880
    Thanks given
    311
    Thanks received
    557
    Rep Power
    703
    add something like "santaPrize" to playersave.java
    if you need help finding out what to put in the playersave file just look at what's already in there

    Then, to open the shop

    case #npcnumbergoeshere#:
    if(c.santaPrize == 0) {
    c.sendMessage("You have not completed the event.");
    } else if(c.santaPrize == 1) {
    PUT WHAT YOU WANT IT TO DO IF THEY DID EVENT (openshop)
    }
    break;

    And when they finish event you have to put in the code
    c.santaPrize = 1;

    Skype "Rayleo20" if you need anymore help.
    Reply With Quote  
     

  3. #3  
    Registered Member
    3lv3n snip3r's Avatar
    Join Date
    Jan 2011
    Posts
    916
    Thanks given
    48
    Thanks received
    114
    Rep Power
    84
    ^ And also in NPCHandler.java
    Find:
    Code:
    public void dropItems(int i) {
    And under this:
    Code:
    if(c != null) {
    Add:
    Code:
    if (npcs[i].npcType == NPC ID) {
    						if(c.santaPrize == WHATEVER YOU WANT THE NUMBER TO BE (EX: 5)) {
    							c.santaPrize += 1;
    						}
    					}
    And you can make it teleport you once you kill it:
    Code:
    if (npcs[i].npcType == NPC ID) {
    						if(c.santaPrize == WHATEVER YOU WANT THE NUMBER TO BE (EX: 5)) {
    							c.santaPrize += 1;
    							c.getPA().startTeleport(X COORD, Y COORD, HEIGHT, "modern");
    						}
    					}
    Spoiler for RuneScape:
    Reply With Quote  
     

  4. #4  
    Registered Member Otrocity's Avatar
    Join Date
    Aug 2011
    Age
    30
    Posts
    40
    Thanks given
    0
    Thanks received
    1
    Rep Power
    31
    Fixed~! Everything is now working full Christmas Event!
    Thanks to Revival!
    Last edited by Otrocity; 12-15-2011 at 03:04 AM. Reason: Thanking Revival!
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. My Christmas Event
    By Purp in forum Show-off
    Replies: 23
    Last Post: 01-04-2013, 11:31 PM
  2. Christmas Event
    By Fragon in forum Projects
    Replies: 3
    Last Post: 11-05-2011, 02:28 PM
  3. Christmas Event
    By Eleclion in forum Tutorials
    Replies: 43
    Last Post: 06-29-2008, 03:19 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •