Thread: [PI] Witches Potion Quest

Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1 [PI] Witches Potion Quest 
    Registered Member

    Join Date
    Aug 2011
    Posts
    766
    Thanks given
    105
    Thanks received
    59
    Rep Power
    114
    What you will be adding:

    Step 1.
    Make a new file called WitchesPotion.java in src-server-model-players-quests.
    Then add this in.

    Code:
    package server.model.players.quests;
    
    import server.model.players.Client;
    import server.model.players.ActionHandler;
    
    /*
     * @author Liam Aka Insidia X (R-S Name).
     */
    
    public class WitchesPotion {
    
    	Client c;
    	
    	public WitchesPotion(Client c) {
    	this.c = c;
    	}
    	
    	public void showInformation() {
    		for (int i = 8144; i < 8195; i++) {
    			c.getPA().sendFrame126("", i);
    		}
    		c.getPA().sendFrame126("@dre@Witches Potion", 8144);
    		c.getPA().sendFrame126("", 8145);
    		if(c.WitchesPotion == 0) {
    			c.getPA().sendFrame126("Witches Potion", 8144);
    			c.getPA().sendFrame126("Talk to Hetty in her house in Rimmington, south of Falador,", 8147);
    			c.getPA().sendFrame126("west of Port Sarim.", 8148);
    			c.getPA().sendFrame126("", 8149);
    			c.getPA().sendFrame126("There are no requirments.", 8150);
    		} else if(c.WitchesPotion == 1) {
    			c.getPA().sendFrame126("Witches Potion", 8144);
    			c.getPA().sendFrame126("@str@I've talked to Hetty.", 8147);
    			c.getPA().sendFrame126("She wants me to gather the following ingredients:", 8148);
    			
    			if(c.getItems().playerHasItem(300,1)) {
    				c.getPA().sendFrame126("@str@A Rat's tail", 8149);
    			} else {
    				c.getPA().sendFrame126("@red@A Rat's tail", 8149);
    			}
    			if(c.getItems().playerHasItem(2146,1)) {
    			c.getPA().sendFrame126("@str@Some Burnt Meat", 8150);
    			} else {
    			c.getPA().sendFrame126("@red@Some Burnt Meat", 8150);
    			}
    			if(c.getItems().playerHasItem(221,1)) {
    			c.getPA().sendFrame126("@str@An Eye of newt", 8151);
    			} else {
    				c.getPA().sendFrame126("@red@An Eye of newt", 8151);	
    			}
    			if(c.getItems().playerHasItem(1957,1)) {
    			c.getPA().sendFrame126("@str@And An Onion", 8152);
    			} else {
    				c.getPA().sendFrame126("@red@And An Onion", 8152);
    			}
    			} else if(c.WitchesPotion == 2) {
    				c.getPA().sendFrame126("Witches Potion", 8144);
    				c.getPA().sendFrame126("@str@I've talked to Hetty.", 8147);
    				c.getPA().sendFrame126("She wants me to gather the following ingredients:", 8148);
    				if(c.getItems().playerHasItem(300,1)) {
    				c.getPA().sendFrame126("@str@A Rat's tail", 8149);
    				} else {
    				c.getPA().sendFrame126("@red@A Rat's tail", 8149);
    				}
    				if(c.getItems().playerHasItem(2146,1)) {
    				c.getPA().sendFrame126("@str@Some Burnt Meat", 8150);
    				} else {
    					c.getPA().sendFrame126("@red@Some Burnt Meat", 8150);	
    				}
    				if(c.getItems().playerHasItem(221,1)) {
    				c.getPA().sendFrame126("@str@An Eye of newt", 8151);
    				} else {
    					c.getPA().sendFrame126("@red@An Eye of newt", 8151);
    				}
    				if (c.getItems().playerHasItem(1957,1)) {
    					c.getPA().sendFrame126("@str@And An Onion", 8152);
    				} else {
    					c.getPA().sendFrame126("@red@And An Onion", 8152);
    				}
    				} else if(c.WitchesPotion == 3) {
    					c.getPA().sendFrame126("Witches", 8144);
    					c.getPA().sendFrame126("@str@I talked to Hetty.", 8147);
    					c.getPA().sendFrame126("@str@I gave her the ingredients.", 8148);
    					c.getPA().sendFrame126("@red@     QUEST COMPLETE", 8150);
    					c.getPA().sendFrame126("As a reward, I gained 325,000 Magic Experience.", 8151);
    				}
    				c.getPA().showInterface(8134);
    			}
    	}
    Step 2.
    Go to dialoguehandler class and put this in it.

    Code:
    /**
    	* Witches Potion
    	* 
    	* Made by Liam
    	* Credits too - I'm A Boss 
    	* 
    	*/
    		
    	case 549:
    	sendNpcChat1("Okay, please hurry, the cauldron is waiting.", c.talkingNpc, "Hetty");
    	c.nextChat = 0;
    	break;
    	case 550:
    		sendNpcChat1("What could you want with an old woman like me?", c.talkingNpc, "Hetty");
    		c.nextChat = 551;
    		break;
    	case 551:
    		c.dialogueAction = 530;
    		sendOption2("I am in search of a Quest.","Nothing");
    		break;
    	case 552:
    		sendPlayerChat1("I am in search of a quest.");
    		c.nextChat = 553;
    		break;
    	case 553:
    		sendNpcChat1("Hmmm, maybe I could think of something for you.", c.talkingNpc, "Hetty");
    		c.nextChat = 554;
    		break;
    	case 554:
    		sendNpcChat1("Would you like to become more proficient in the dark arts?", c.talkingNpc, "Hetty");
    		c.nextChat = 555;
    		break;
    	case 555:
    		sendPlayerChat1("Yes help me become one with my darker side.");
    		c.WitchesPotion = 1;
    		c.nextChat = 556;
    		break;
    	case 556:
    		sendNpcChat1("Ok, I'm going to make a potion to help bring out your darker self.", c.talkingNpc, "Hetty");
    		c.nextChat = 557;
    		break;
    	case 557:
    		sendNpcChat1("You will need certain ingredients.", c.talkingNpc, "Hetty");
    		c.nextChat = 558;
    		break;
    	case 558:
    		sendPlayerChat1("What do I need?");
    		c.nextChat = 559;
    		break;
    	case 559:
    		sendNpcChat2("You need an eye of newt, a rat's tail, an onion...", "Oh and a peice of burnt mean.", c.talkingNpc, "Hetty");
    		c.nextChat = 560;
    		break;
    	case 560:
    		sendPlayerChat1("Okay, I will go and get them now.");
    		c.nextChat = 0;
    		break;
    	case 561:
    		sendNpcChat1("So have you found the things for my potion?", c.talkingNpc, "Hetty");
    		c.nextChat = 562;
    		break;
    	case 562:
    		if(c.getItems().playerHasItem(300, 1) && c.getItems().playerHasItem(2146, 1) && c.getItems().playerHasItem(221, 1)&& c.getItems().playerHasItem(1957, 1)) {
    			sendPlayerChat1("Yes I have Everything!");
    			c.nextChat = 563;
    			} else {
    			sendPlayerChat1("I don't have all the items yet.");
    			c.nextChat = 549;
    			}
    	case 563:
    		sendNpcChat1("Excellent can I have them?", c.talkingNpc, "Hetty");
    		c.nextChat = 564;
    		break;
    	case 564:
    		sendNpcChat1("Great, you brought me everything I need.", c.talkingNpc, "Hetty");
    		c.getItems().deleteItem(300, 1);
    		c.getItems().deleteItem(2146, 1);
    		c.getItems().deleteItem(221, 1);
    		c.getItems().deleteItem(1957, 1);
    		c.WitchesPotion = 2;
    		c.nextChat = 565;
    		break;
    	case 565:
    		sendPlayerChat1("Well is it ready?");
    		c.nextChat = 566;
    		break;
    	case 566:
    		sendNpcChat1("Yes, now drink up, and enjoy.", c.talkingNpc, "Hetty");
    		c.nextChat = 0;
    		c.sendMessage("You drink the witches potion");
    		c.getPA().witchFinish();
    		break;
    	case 567:
    		sendNpcChat1("You are now a Dark Wizard.", c.talkingNpc, "Hetty");
    		break;
    		
    		/*end of Witches Potion*/
    Step 3.
    Go to clickingbuttons and under case 9157 add this.
    Code:
    if(c.dialogueAction == 530 && c.WitchesPotion == 0) {
    						c.getDH().sendDialogues(552, 307);
    						return;
    					
    				}
    Step 4.
    Open actionhandler and put this in it.

    Code:
    case 307:
    			if(c.WitchesPotion == 0) {
    				c.getDH().sendDialogues(550, 307);
    			} else if(c.WitchesPotion == 1) {
    			c.getDH().sendDialogues(561, 307);
    			} else if(c.WitchesPotion == 3) {
    				c.getDH().sendDialogues(567, 307);
    			}
    			break;
    Step 5.
    Go to playerassistant and add these methods somewhere, you might already have loadQuest, so if so, add the WitchesPotion code, under it.

    Code:
    public void loadQuests() {
    		if(c.WitchesPotion == 0) {
            	sendFrame126("@red@Witches Potion", 7383);
    		} else if(c.WitchesPotion == 3) {
    			sendFrame126("@gre@Witches Potion", 7383);
    		} else {
    			sendFrame126("@yel@Witches Potion", 7383);
    			
    		}
    	}
    	
    	/**Witches Potion**/
    	public void witchFinish() {
    		c.WitchesPotion = 3;
    		c.getPA().addSkillXP(325000, 6);
    		c.getPA().showInterface(297);
    		c.getPA().showInterface(12140);
    		c.getPA().sendFrame126("You have completed: Witches Potion", 12144);
    		c.getPA().sendFrame126("325,000 Magic Experience", 12150);
    		c.getPA().sendFrame126("", 12151);
    		c.getPA().sendFrame126("", 12152);
    		c.getPA().sendFrame126("", 12153);
    		c.getPA().sendFrame126("", 12154);
    		c.getPA().sendFrame126("", 12155);
    		c.getPA().sendFrame126("@gre@Witches Potion", 7332);
    	}
    Step 6.
    Now still in client.java Find
    Code:
     private Food food = new Food(this);
    and under it add.
    Code:
    private WitchesPotion witchesPotion = new WitchesPotion(this);
    Make sure you add imports at top. You should know how to do this.

    Step 7.
    Search for,
    Code:
     public Food getFood() {
    Under it add
    Code:
    public WitchesPotion getWP() {
    		return witchesPotion;
    	}
    Step 8.
    Go into now go to playersave and add

    Code:
    else if (token.equals("WitchesPotion")) {
    					p.WitchesPotion = Integer.parseInt(token2);
    				}
    Step 9.
    Still in playersave add this now.

    Code:
    characterfile.newLine();
    			characterfile.write("WitchesPotion = ", 0, 15);
    			characterfile.write(Integer.toString(p.WitchesPotion), 0, Integer.toString(p.WitchesPotion).length());
    			characterfile.newLine();
    Step 10. The final step.
    go into player.java and add
    Code:
    WitchesPotion = 0,
    If you use this please thank me and rep, and if you post on other sites please give credits ty.
    Spoiler for vouches:

    Quote Originally Posted by TheMrClassic View Post
    Vouch for Insidia X. Fast and friendly.
    Quote Originally Posted by Vernorexia View Post
    Vouch for insidia x added clipped following and a timer on my gates. I paid first was fast work. I highly recommend using him!
    Quote Originally Posted by Matts B ring View Post
    Bought 5b ikov, vouch
    Quote Originally Posted by InsinuateRS View Post
    Vouch for me lad, bought 3b

    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member
    Join Date
    Jun 2014
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Amazing tut, keep up the good work, your server is going to be amazing
    Reply With Quote  
     

  4. #3  
    Registered Member

    Join Date
    Aug 2011
    Posts
    766
    Thanks given
    105
    Thanks received
    59
    Rep Power
    114
    Thanks Sam mate.
    Spoiler for vouches:

    Quote Originally Posted by TheMrClassic View Post
    Vouch for Insidia X. Fast and friendly.
    Quote Originally Posted by Vernorexia View Post
    Vouch for insidia x added clipped following and a timer on my gates. I paid first was fast work. I highly recommend using him!
    Quote Originally Posted by Matts B ring View Post
    Bought 5b ikov, vouch
    Quote Originally Posted by InsinuateRS View Post
    Vouch for me lad, bought 3b

    Reply With Quote  
     

  5. #4  
    Banned

    Join Date
    Nov 2013
    Posts
    1,015
    Thanks given
    240
    Thanks received
    265
    Rep Power
    0
    Good release bud, told you not to release this. Oh well, the community will love it.
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Contaminated

    Radiated's Avatar
    Join Date
    Mar 2011
    Age
    27
    Posts
    928
    Thanks given
    255
    Thanks received
    164
    Rep Power
    240
    Doric's Quest next? LOL

    Anyways, it's simple - but it's done in a poor way.
    fuckoff
    Reply With Quote  
     

  8. #6  
    hi


    Join Date
    Aug 2013
    Posts
    925
    Thanks given
    290
    Thanks received
    384
    Rep Power
    402
    This is honestly not a good way of doing quests at all.

    You're going to make a new void every time you add a quest just to display it's name and reward.


    Also you're supposed to drink from the potion to complete it.

    Anyways, I'm sure someone will appreciate your contribution.
    Reply With Quote  
     

  9. Thankful users:


  10. #7  
    Registered Member

    Join Date
    Aug 2011
    Posts
    766
    Thanks given
    105
    Thanks received
    59
    Rep Power
    114
    Code:
    case 2024:
    			if (c.WitchesPotion == 2) {
    			c.getPA().witchFinish();
    			} else {
    				c.sendMessage("You haven't helped the witch yet.");
    			}
    			break;
    You guys can add that yourself, YOU must delete c.getPA().witchFinish(); From the last dialogue.

    @ A7mad, No-one has released this, they have dorics quest.
    Spoiler for vouches:

    Quote Originally Posted by TheMrClassic View Post
    Vouch for Insidia X. Fast and friendly.
    Quote Originally Posted by Vernorexia View Post
    Vouch for insidia x added clipped following and a timer on my gates. I paid first was fast work. I highly recommend using him!
    Quote Originally Posted by Matts B ring View Post
    Bought 5b ikov, vouch
    Quote Originally Posted by InsinuateRS View Post
    Vouch for me lad, bought 3b

    Reply With Quote  
     

  11. #8  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Quote Originally Posted by Valiant View Post
    This is honestly not a good way of doing quests at all.

    You're going to make a new void every time you add a quest just to display it's name and reward.


    Also you're supposed to drink from the potion to complete it.
    To add to this, and correct it also, this would get messy extremely quickly if anyone is actually persuing a lot of quests in their server. I think abstraction should be used for quests, what type of infrastructer? I'm not entirely sure iv never seen a good quest system put in place yet. But that is the direction it should be heading to actually have healthy growth in this area of rsps development.
    "Know thy self, know thy enemy. A thousand battles, a thousand victories." - Sun Tzu
    GitHub: https://github.com/Faris-Mckay
    Reply With Quote  
     

  12. Thankful user:


  13. #9  
    Registered Member

    Join Date
    Aug 2011
    Posts
    766
    Thanks given
    105
    Thanks received
    59
    Rep Power
    114
    Quote Originally Posted by Bear_ View Post
    Good release bud, told you not to release this. Oh well, the community will love it.
    Thanks mate. Hopefully it gets used
    Took me quite abit of time to write it.
    Spoiler for vouches:

    Quote Originally Posted by TheMrClassic View Post
    Vouch for Insidia X. Fast and friendly.
    Quote Originally Posted by Vernorexia View Post
    Vouch for insidia x added clipped following and a timer on my gates. I paid first was fast work. I highly recommend using him!
    Quote Originally Posted by Matts B ring View Post
    Bought 5b ikov, vouch
    Quote Originally Posted by InsinuateRS View Post
    Vouch for me lad, bought 3b

    Reply With Quote  
     

  14. #10  
    Banned [PI] Witches Potion Quest Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    x__x

    nice job but you should really have some sort of quest system using abstraction lol
    Reply With Quote  
     

  15. Thankful user:


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

Similar Threads

  1. PI magic potion
    By Arithium in forum Snippets
    Replies: 8
    Last Post: 11-01-2010, 12:17 AM
  2. [PI] Pk Server Quest tab.
    By brawler97 in forum Tutorials
    Replies: 15
    Last Post: 10-03-2010, 07:27 PM
  3. Best PI Overload Potion
    By FuckThePolice in forum Show-off
    Replies: 25
    Last Post: 09-08-2010, 12:16 PM
  4. [PI] Explosive Potions
    By im slickk in forum Help
    Replies: 2
    Last Post: 07-01-2010, 06:54 AM
  5. [PI]Energy Potion
    By Mr.PedoBear in forum Help
    Replies: 3
    Last Post: 05-30-2010, 05:23 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
  •