Thread: [PI] Adding an NPC to turn Curses On

Results 1 to 5 of 5
  1. #1 [PI] Adding an NPC to turn Curses On 
    Registered Member
    Join Date
    Aug 2011
    Posts
    40
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    Need to add an NPC so when you click on it, It will show the interfact of text and itll say this
    Code:
    Turn Curses On
    Turn Curses Off
    Cancel
    Here are my commands to turn curses on for you can see what the prayerbook codes are
    Code:
    		if(playerCommand.equalsIgnoreCase("Curseson") && c.playerRights >=3) {	
    		c.prayerBook = 1;
            c.setSidebarInterface(5, 22500);
            c.getCombat().resetPrayers();
            c.sendMessage("You change to Ancient Curses.");
    		}
    		
    		if(playerCommand.equalsIgnoreCase("Cursesoff") && c.playerRights <=3) {	
    		c.prayerBook = 0;
            c.setSidebarInterface(5, 5608);
            c.getCombat().resetPrayers();
            c.sendMessage("You change back to normal prayers.");
    		}

    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    why
    Code:
    && c.playerRights >=3) {
    and
    Code:
    && c.playerRights <=3) {
    ?
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  3. #3  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    uhm this is pretty simple lol.
    in DialogueHandler.java
    Code:
    sendOption2("Curses on", "Curses off", c.talkingNpc, "NPCNAMEHERE");
    and under that add this:
    Code:
    c.dialogueAction = 500;
    then goto actionhandler and in firstclickNPC add
    Code:
     c.getDH().sendDialogues(##, i);
    change the ## to the dialogue CASE number in dialoguehandler.java

    Now goto clickingbuttons under the case (THE CASE IS WHEN YOU CLICK "CURSE ON" on your NPC ingame and the case will show in CMD. YOU figure this part out. but here is the code to add.

    for Curses on:
    Code:
    if(c.dialogueAction == 500) {
    c.prayerBook = 1;
            c.setSidebarInterface(5, 22500);
            c.getCombat().resetPrayers();
            c.sendMessage("You change to Ancient Curses.");
    				
    					return;
    				}
    then under the CURSES OFF DIALOGUE CASE:
    Code:
    if(c.dialogueAction == 500) {
    c.prayerBook = 0;
            c.setSidebarInterface(5, 5608);
            c.getCombat().resetPrayers();
            c.sendMessage("You change back to normal prayers.");
    				
    					return;
    				}
    [email protected]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2011
    Posts
    40
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    Thanks it worked. Took a bit of messing around.

    Reply With Quote  
     

  5. #5  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    hit the thank button or rep? lol, would be appreciated.
    [email protected]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    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. [PI] Adding a ::curses command?
    By Jmk600 in forum Help
    Replies: 3
    Last Post: 06-20-2013, 07:48 PM
  2. PI adding curses interface
    By Someone in forum Help
    Replies: 0
    Last Post: 04-02-2011, 02:17 PM
  3. Adding Ancient Curses.
    By Rag3 in forum Tutorials
    Replies: 33
    Last Post: 01-28-2011, 04:26 AM
  4. [HELP] Adding Leach Curses [HELP]
    By coledp5 in forum Help
    Replies: 8
    Last Post: 01-15-2011, 09:00 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •