Thread: Master Farmer.

Results 1 to 5 of 5
  1. #1 Master Farmer. 
    Registered Member
    Join Date
    Dec 2009
    Posts
    615
    Thanks given
    106
    Thanks received
    33
    Rep Power
    17
    What's the best way to go about randomizing the seeds received from a Master Farmer?

    Pretty much all I need to know is of a way to expand addItem.
    Code:
    addItem(5299, 1);
    Rep++ to anyone who can help!

    Code:
    	else if (NpcType == 2234) {
    				if (WithinDistance(NpcX, NpcY, absX, absY, 3)) {
    					int lvl = playerLevel[playerThieving];
    					if (thiefDelay <= 0) {
    						if (lvl >= 65) {
    							if (misc.random(lvl) >= 38) {
    								startAnimation(881, 1);
    								sendMessage("You manage to pick the Master Farmer's pocket.");
    								addItem(5299, 1);
    								addSkillXP(43 * thiefXpInc, 17);
    								thiefDelay = 4;
    							} else {
    								Server.s.npcHandler.npcs[NpcSlot].StartAnimation(412);
    								Server.s.npcHandler.npcs[NpcSlot].TurnNpcTo(absX, absY);
    								Server.s.npcHandler.npcs[NpcSlot].showText("What do you think you're doing?");
    								EntangleDelay = 6;
    								thiefDelay = 6;
    								sendMessage("The Master Farmer catches you!");
    								startAnimation(GetBlockEmote(getItemName(playerEquipment[playerWeapon])), 0);
    								CreatePlayerGfx(80, 0, 100);
    								hitDiff = misc.random(15);
    								updateHp(hitDiff, false);
    								updateRequired = true;
    								hitUpdateRequired = true;
    							}
    						} else
    							showDialogue("You need 38 thieving to pickpocket a Master Farmer.");
    					}
    				}
    			}
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Oct 2012
    Posts
    7
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    o wait
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2012
    Posts
    561
    Thanks given
    43
    Thanks received
    53
    Rep Power
    72
    PlayerAssistant:
    Code:
    	public static int Seeds[] = {5299, 5300};
    	public int randomSeeds() {
    		return Seeds[(int)(Math.random()*Seeds.length)];
    	}
    Then:
    Code:
    else if (NpcType == 2234) {
                if (WithinDistance(NpcX, NpcY, absX, absY, 3)) {
                    int lvl = playerLevel[playerThieving];
                    if (thiefDelay <= 0) {
                        if (lvl >= 65) {
                            if (misc.random(lvl) >= 38) {
                                startAnimation(881, 1);
                                sendMessage("You manage to pick the Master Farmer's pocket.");
                                addItem(getPA().randomSeeds(), 1);
                                addSkillXP(43 * thiefXpInc, 17);
                                thiefDelay = 4;
                            } else {
                                Server.s.npcHandler.npcs[NpcSlot].StartAnimation(412);
                                Server.s.npcHandler.npcs[NpcSlot].TurnNpcTo(absX, absY);
                                Server.s.npcHandler.npcs[NpcSlot].showText("What do you think you're doing?");
                                EntangleDelay = 6;
                                thiefDelay = 6;
                                sendMessage("The Master Farmer catches you!");
                                startAnimation(GetBlockEmote(getItemName(playerEquipment[playerWeapon])), 0);
                                CreatePlayerGfx(80, 0, 100);
                                hitDiff = misc.random(15);
                                updateHp(hitDiff, false);
                                updateRequired = true;
                                hitUpdateRequired = true;
                            }
                        } else
                            showDialogue("You need 38 thieving to pickpocket a Master Farmer.");
                    }
                }
            }
    You do need to add the seeds in the int yourself.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2009
    Posts
    615
    Thanks given
    106
    Thanks received
    33
    Rep Power
    17
    Quote Originally Posted by I No Mercy I View Post
    PlayerAssistant:
    Code:
    	public static int Seeds[] = {5299, 5300};
    	public int randomSeeds() {
    		return Seeds[(int)(Math.random()*Seeds.length)];
    	}
    Then:
    Code:
    else if (NpcType == 2234) {
                if (WithinDistance(NpcX, NpcY, absX, absY, 3)) {
                    int lvl = playerLevel[playerThieving];
                    if (thiefDelay <= 0) {
                        if (lvl >= 65) {
                            if (misc.random(lvl) >= 38) {
                                startAnimation(881, 1);
                                sendMessage("You manage to pick the Master Farmer's pocket.");
                                addItem(getPA()randomSeeds(), 1);
                                addSkillXP(43 * thiefXpInc, 17);
                                thiefDelay = 4;
                            } else {
                                Server.s.npcHandler.npcs[NpcSlot].StartAnimation(412);
                                Server.s.npcHandler.npcs[NpcSlot].TurnNpcTo(absX, absY);
                                Server.s.npcHandler.npcs[NpcSlot].showText("What do you think you're doing?");
                                EntangleDelay = 6;
                                thiefDelay = 6;
                                sendMessage("The Master Farmer catches you!");
                                startAnimation(GetBlockEmote(getItemName(playerEquipment[playerWeapon])), 0);
                                CreatePlayerGfx(80, 0, 100);
                                hitDiff = misc.random(15);
                                updateHp(hitDiff, false);
                                updateRequired = true;
                                hitUpdateRequired = true;
                            }
                        } else
                            showDialogue("You need 38 thieving to pickpocket a Master Farmer.");
                    }
                }
            }
    You do need to add the seeds in the int yourself.
    Thank you thank you thank you.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2012
    Posts
    561
    Thanks given
    43
    Thanks received
    53
    Rep Power
    72
    Sure thing man.
    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] master farmer
    By katastrophic in forum Help
    Replies: 8
    Last Post: 07-28-2011, 01:04 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
  •