o wait
|
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.Rep++ to anyone who can help!Code:addItem(5299, 1);
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."); } } }
o wait
PlayerAssistant:
Then:Code:public static int Seeds[] = {5299, 5300}; public int randomSeeds() { return Seeds[(int)(Math.random()*Seeds.length)]; }
You do need to add the seeds in the int yourself.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."); } } }
Sure thing man.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |