1. import java.awt.*;
  2. import java.awt.event.KeyEvent;
  3. import java.util.*;
  4.  
  5. import org.rsbot.script.*;
  6. import org.rsbot.script.wrappers.*;
  7. import org.rsbot.bot.Bot;
  8. import org.rsbot.bot.input.Mouse;
  9. import org.rsbot.event.listeners.PaintListener;
  10. import org.rsbot.event.listeners.ServerMessageListener;
  11. import org.rsbot.event.events.ServerMessageEvent;
  12.  
  13. @ScriptManifest(authors = "Rapid", category = "Rapid", name = "Cheese Producer ;) v2", version = 1.0, description = "WHAT_YOU_WANT_IT_TO_SAY_IN_DESCRIPTION")
  14.  
  15. public class CheeseProducer extends Script implements ServerMessageListener {
  16.  
  17. //Counters
  18. public int TomatoCount;
  19. public int PizzaBaseCount;
  20. public int IncPizzaCount;
  21.  
  22. //IDs
  23. public int TomatoID = 1982;
  24. public int PizzaBaseID = 2283;
  25.  
  26. //Pizza to Incomplete Pizza Variables
  27. public Boolean makingIncompletePizza = true;
  28.  
  29. //Summoning Regeneration Timers
  30. public long SummoningTimer;
  31. public long CurrentTime;
  32. public long TimeToNextSpecial;
  33. public Boolean SpecialRegained;
  34.  
  35. //SkillsTab
  36. public int FirstTabX = 554;
  37. public int FirstTabY = 211;
  38. public int TabDifferenceX = 62;
  39. public int TabDifferenceY = 23;
  40.  
  41. //Log Variables
  42. public int TotalPizzaMade;
  43.  
  44. //General Variables
  45. public int RandomNumber;
  46. public int RandomX;
  47. public int RandomY;
  48.  
  49. //Summoning/Pizza Swap
  50. public Boolean usingScrolls = false;
  51. public Boolean makingPizza = false;
  52.  
  53. //Pizza Variables
  54. public int CheeseID = 1985;
  55. public int UncookedID = 2287;
  56. public int IncompleteID = 2285;
  57. public int CheeseCount;
  58. public int PizzaCount;
  59. public int PizzaMade;
  60. public int CombinedWithdraw;
  61. public int CheeseInv;
  62. public int PizzaInv;
  63.  
  64. //Make-All ID's
  65. public int PizzaX = 236;
  66. public int PizzaY = 397;
  67. public int MakeX = 192;
  68. public int MakeY = 457;
  69.  
  70. //Withdraw
  71. public Boolean WithdrawPotion = false;
  72.  
  73. //Objects
  74. public RSObject FindBank;
  75.  
  76. //ID's
  77. public int SummoningPotion1 = 12146;
  78. public int SummoningPotion2 = 12144;
  79. public int SummoningPotion3 = 12142;
  80. public int VialID = 229;
  81. public int ScrollID = 12430;
  82. public int PouchID = 12067;
  83. public int BankBoothID = 11402;
  84. public int Animation = 7660;
  85.  
  86. //Mouse Variables
  87. public int DepositSummonX = 457;
  88. public int DepositSummonY = 295;
  89.  
  90. public int SummonIconX = 695;
  91. public int SummonIconY = 135;
  92.  
  93. //Count Variables
  94. public int SpecialCount;
  95. public int SummoningPotionCounter;
  96.  
  97. //Check Variables
  98. public int CheckScroll;
  99. public int CheckPotion;
  100. public int CheckPotionInv;
  101. public Boolean CheckDeposit;
  102. public Boolean PotUp;
  103. public int SummoningPoint = 60;
  104. public int SummoningPotionCount;
  105.  
  106. public void doAntiBanPizza(){
  107. RandomNumber = random(1, 3);
  108. if (RandomNumber == 1){
  109. log("Using anti-ban method 1.");
  110. RandomX = 520 + random(0, 15);
  111. RandomY = 53 + random(0, 15);
  112. moveMouse(RandomX, RandomY);
  113. clickMouse(true);
  114. WaitRandom();
  115. RandomX = RandomX + random(-200, 200);
  116. RandomY = RandomY + random(-200, 200);
  117. moveMouse(RandomX, RandomY);
  118. WaitRandom();
  119. RandomX = 520 + random(0, 15);
  120. RandomY = 53 + random(0, 15);
  121. moveMouse(RandomX, RandomY);
  122. clickMouse(true);
  123. WaitRandom();
  124. }
  125. if (RandomNumber == 3){
  126. log("Using anti-ban method 2.");
  127. RandomX = 553 + random(0, 20);
  128. RandomY = 168 + random(0, 30);
  129. moveMouse(RandomX, RandomY);
  130. clickMouse(true);
  131. WaitRandom();
  132. RandomNumber = random(1, 24);
  133. if (RandomNumber == 1){
  134. RandomX = 554 + random(0, 40);
  135. RandomY = 211 + random(0, 20);
  136. moveMouse(RandomX, RandomY);
  137. }
  138. if (RandomNumber == 2){
  139. RandomX = FirstTabX + TabDifferenceX + random(0, 40);
  140. RandomY = FirstTabY + random(0, 20);
  141. moveMouse(RandomX, RandomY);
  142. }
  143. if (RandomNumber == 3){
  144. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0, 40);
  145. RandomY = FirstTabY + random(0, 20);
  146. moveMouse(RandomX, RandomY);
  147. }
  148. if (RandomNumber == 4){
  149. RandomX = FirstTabX + random(0, 40);
  150. RandomY = FirstTabY + TabDifferenceY + random(0, 20);
  151. moveMouse(RandomX, RandomY);
  152. }
  153. if (RandomNumber == 5){
  154. RandomX = FirstTabX + TabDifferenceX + random(0, 40);
  155. RandomY = FirstTabY + TabDifferenceY + random(0,20);
  156. moveMouse(RandomX, RandomY);
  157. }
  158. if (RandomNumber == 6){
  159. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0, 40);
  160. RandomY = FirstTabY + TabDifferenceY + random(0, 20);
  161. moveMouse(RandomX, RandomY);
  162. }
  163. if (RandomNumber == 7){
  164. RandomX = FirstTabX + random(0,40);
  165. RandomY = FirstTabY + (TabDifferenceY * 2) + random(0, 20);
  166. moveMouse(RandomX, RandomY);
  167. }
  168. if (RandomNumber == 8){
  169. RandomX = FirstTabX + TabDifferenceX + random(0,40);
  170. RandomY = FirstTabY + (TabDifferenceY * 2) + random(0, 20);
  171. moveMouse(RandomX, RandomY);
  172. }
  173. if (RandomNumber == 9){
  174. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0,40);
  175. RandomY = FirstTabY + (TabDifferenceY * 2) + random(0, 20);
  176. moveMouse(RandomX, RandomY);
  177. }
  178. if (RandomNumber == 10){
  179. RandomX = FirstTabX + random(0, 40);
  180. RandomY = FirstTabY + (TabDifferenceY * 3) + random(0,20);
  181. moveMouse(RandomX, RandomY);
  182. }
  183. if (RandomNumber == 11){
  184. RandomX = FirstTabX + TabDifferenceX + random(0, 40);
  185. RandomY = FirstTabY + (TabDifferenceY * 3) + random(0,20);
  186. moveMouse(RandomX, RandomY);
  187. }
  188. if (RandomNumber == 12){
  189. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0,40);
  190. RandomY = FirstTabY + (TabDifferenceY * 3) + random(0,20);
  191. moveMouse(RandomX, RandomY);
  192. }
  193. if (RandomNumber == 13){
  194. RandomX = FirstTabX + random(0,40);
  195. RandomY = FirstTabY + (TabDifferenceY * 4) + random(0,20);
  196. moveMouse(RandomX, RandomY);
  197. }
  198. if (RandomNumber == 14){
  199. RandomX = FirstTabX + TabDifferenceX + random(0,40);
  200. RandomY = FirstTabY + (TabDifferenceY * 4) + random(0,20);
  201. moveMouse(RandomX, RandomY);
  202. }
  203. if (RandomNumber == 15){
  204. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0,40);
  205. RandomY = FirstTabY + (TabDifferenceY * 4) + random(0,20);
  206. moveMouse(RandomX, RandomY);
  207. }
  208. if (RandomNumber == 16){
  209. RandomX = FirstTabX + random(0,40);
  210. RandomY = FirstTabY + (TabDifferenceY * 5) + random(0,20);
  211. moveMouse(RandomX, RandomY);
  212. }
  213. if (RandomNumber == 17){
  214. RandomX = FirstTabX + TabDifferenceX + random(0,40);
  215. RandomY = FirstTabY + (TabDifferenceY * 5) + random(0,20);
  216. moveMouse(RandomX, RandomY);
  217. }
  218. if (RandomNumber == 18){
  219. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0,40);
  220. RandomY = FirstTabY + (TabDifferenceY * 5) + random(0,20);
  221. moveMouse(RandomX, RandomY);
  222. }
  223. if (RandomNumber == 19){
  224. RandomX = FirstTabX + random(0, 40);
  225. RandomY = FirstTabY + (TabDifferenceY * 6) + random(0,20);
  226. moveMouse(RandomX, RandomY);
  227. }
  228. if (RandomNumber == 20){
  229. RandomX = FirstTabX + TabDifferenceX + random(0,40);
  230. RandomY = FirstTabY + (TabDifferenceY * 6) + random(0,20);
  231. moveMouse(RandomX, RandomY);
  232. }
  233. if (RandomNumber == 21){
  234. RandomX = FirstTabX + (TabDifferenceX * 2) + random(0,40);
  235. RandomY = FirstTabY + (TabDifferenceY * 6) + random(0,20);
  236. moveMouse(RandomX, RandomY);
  237. }
  238. if (RandomNumber == 21){
  239. RandomX = FirstTabX + random(0, 40);
  240. RandomY = FirstTabY + (TabDifferenceY * 7) + random(0,20);
  241. moveMouse(RandomX, RandomY);
  242. }
  243. if (RandomNumber == 22){
  244. RandomX = FirstTabX + TabDifferenceX + random(0,40);
  245. RandomY = FirstTabY + (TabDifferenceY * 7) + random(0,20);
  246. moveMouse(RandomX, RandomY);
  247. }
  248. if (RandomNumber == 23){
  249. RandomX = FirstTabX + TabDifferenceX + random(0, 40);
  250. RandomY = FirstTabY + (TabDifferenceY * 7) + random(0,20);
  251. moveMouse(RandomX, RandomY);
  252. }
  253. if (RandomNumber == 24){
  254. RandomX = FirstTabX + random(0,40);
  255. RandomY = FirstTabY + (TabDifferenceY * 8) + random(0,20);
  256. moveMouse(RandomX, RandomY);
  257. }
  258. WaitRandom();
  259. WaitRandom();
  260. }
  261. if (RandomNumber == 2){
  262. log("Using anti-ban method 2.");
  263. RandomX = random(0, 500);
  264. RandomY = random(0, 250);
  265. moveMouse(RandomX, RandomY);
  266. wait(random(10000, 30000));
  267. }
  268.  
  269. }
  270.  
  271. public void doAntiBan(){
  272.  
  273. }
  274.  
  275. public void WaitRandom(){
  276. RandomNumber = random(1, 5);
  277. if (RandomNumber == 1){
  278. wait(random(500,1000));
  279. }
  280. if (RandomNumber == 2){
  281. wait(random(750,1250));
  282. }
  283. if (RandomNumber == 3){
  284. wait(random(1000, 1500));
  285. }
  286. if (RandomNumber == 4){
  287. wait(random(1500,2000));
  288. }
  289. if (RandomNumber == 5){
  290. wait(random(2000, 2500));
  291. }
  292. }
  293.  
  294. public void WithdrawPot(){
  295. CheckPotionInv = getInventoryCount(SummoningPotion3);
  296. CheckPotionInv = CheckPotionInv + getInventoryCount(SummoningPotion2);
  297. CheckPotionInv = CheckPotionInv + getInventoryCount(SummoningPotion1);
  298. if (CheckPotionInv == 0);
  299. RSObject FindBank = getNearestObjectByID(BankBoothID);
  300. if (FindBank != null){
  301. while (!bank.open()){
  302. if (!bank.open()){
  303. atObject(FindBank, "Use-quickly");
  304. wait(random(4000, 5000));
  305. bank.getCount(SummoningPotion3);
  306. if (SummoningPotionCount == 0){
  307. log("Out of potions");
  308. stopScript();
  309. }
  310. }
  311. }
  312. }
  313. bank.withdraw(SummoningPotion3, 1);
  314. }
  315.  
  316. public void DrinkPot(){
  317. bank.close();
  318. SummoningPotionCount = getInventoryCount(SummoningPotion3);
  319. while (SummoningPotionCount == 1){
  320. SummoningPotionCount = getInventoryCount(SummoningPotion3);
  321. atInventoryItem(SummoningPotion3, "Drink");
  322. SummoningPoint = SummoningPoint + 15;
  323. wait(random(2000,3000));
  324. atInventoryItem(SummoningPotion2, "Drink");
  325. SummoningPoint = SummoningPoint + 15;
  326. wait(random(2000,3000));
  327. atInventoryItem(SummoningPotion1, "Drink");
  328. SummoningPoint = SummoningPoint + 15;
  329. wait(random(2000,3000));
  330. }
  331. }
  332.  
  333. public void MakePizza(){
  334. atInventoryItem(IncompleteID, "Use");
  335. wait(random(1000,2000));
  336. atInventoryItem(CheeseID, "Use");
  337. wait(random(1000,2000));
  338. PizzaX = PizzaX + random(0, 30);
  339. PizzaY = PizzaY + random(0, 10);
  340. moveMouse(PizzaX, PizzaY);
  341. PizzaX = 236;
  342. PizzaY = 397;
  343. clickMouse(false);
  344. MakeX = 194 + random(0, 90);
  345. MakeY = 457 + random(0, 5);
  346. moveMouse(MakeX, MakeY);
  347. clickMouse(true);
  348. MakeX = 194;
  349. MakeY = 457;
  350. }
  351.  
  352. public void MakeIncomplete(){
  353. atInventoryItem(TomatoID, "Use");
  354. WaitRandom();
  355. atInventoryItem(PizzaBaseID, "Use");
  356. WaitRandom();
  357. PizzaX = PizzaX + random(0, 30);
  358. PizzaY = PizzaY + random(0, 10);
  359. moveMouse(PizzaX, PizzaY);
  360. PizzaX = 236;
  361. PizzaY = 397;
  362. clickMouse(false);
  363. MakeX = 194 + random(0, 90);
  364. MakeY = 457 + random(0, 5);
  365. WaitRandom();
  366. moveMouse(MakeX, MakeY);
  367. clickMouse(true);
  368. MakeX = 194;
  369. MakeY = 457;
  370. }
  371.  
  372. public int loop(){
  373.  
  374. try{
  375. if (makingIncompletePizza == true){
  376. log("No Incompletes, Making Incomplete Pizza");
  377. if (!bank.open()){
  378. log("opening...");
  379. atObject(FindBank, "Use-quicky");
  380. WaitRandom();
  381. while (!bank.isOpen()){
  382. log("opening...");
  383. atObject(FindBank, "Use-quickly");
  384. WaitRandom();
  385. }
  386. }
  387. bank.depositAll();
  388. WaitRandom();
  389. bank.withdraw(TomatoID, 14);
  390. WaitRandom();
  391. bank.withdraw(PizzaBaseID, 14);
  392. WaitRandom();
  393. TomatoCount = getInventoryCount(TomatoID);
  394. PizzaBaseCount = getInventoryCount(PizzaBaseID);
  395. CombinedWithdraw = TomatoCount + PizzaBaseCount;
  396. WaitRandom();
  397. while (CombinedWithdraw != 28){
  398. bank.withdraw(TomatoID, 14);
  399. WaitRandom();
  400. bank.withdraw(PizzaBaseID, 14);
  401. WaitRandom();
  402. TomatoCount = getInventoryCount(TomatoID);
  403. PizzaBaseCount = getInventoryCount(PizzaBaseID);
  404. CombinedWithdraw = TomatoCount + PizzaBaseCount;
  405. WaitRandom();
  406. }
  407. bank.close();
  408. WaitRandom();
  409. while (bank.isOpen()){
  410. WaitRandom();
  411. bank.close();
  412. }
  413. MakeIncomplete();
  414. WaitRandom();
  415. WaitRandom();
  416. IncPizzaCount = getInventoryCount(IncompleteID);
  417. while (IncPizzaCount == 0){
  418. WaitRandom();
  419. MakeIncomplete();
  420. WaitRandom();
  421. IncPizzaCount = getInventoryCount(IncompleteID);
  422. }
  423. doAntiBanPizza();
  424. while (IncPizzaCount < 14){
  425. wait(random(10,100));
  426. IncPizzaCount = getInventoryCount(IncompleteID);
  427. }
  428. }
  429. if (usingScrolls == true){
  430. TimeToNextSpecial = System.currentTimeMillis() - SummoningTimer;
  431. if (TimeToNextSpecial == 300000){
  432. SpecialRegained = true;
  433. SummoningPoint = SummoningPoint + 10;
  434.  
  435. }
  436. if (SpecialRegained == true){
  437. SummoningTimer = System.currentTimeMillis();
  438. SpecialRegained = false;
  439. }
  440. CheckScroll = getInventoryCount(ScrollID);
  441. if (CheckScroll == 0){
  442. log("No scrolls left. Going to make pizza's");
  443. usingScrolls = false;
  444. makingPizza = true;
  445. }
  446. }
  447. if (usingScrolls == true){
  448. log("Using scrolls option.");
  449. while (SpecialCount <= 7){
  450. log("Doing Special.");
  451. SummonIconX = SummonIconX + random(0, 50);
  452. SummonIconY = SummonIconY + random(0, 10);
  453. moveMouse(SummonIconX, SummonIconY);
  454. clickMouse(true);
  455. SummonIconX = 695;
  456. SummonIconY = 135;
  457. SummoningPoint = SummoningPoint - 6;
  458. SpecialCount = SpecialCount + random(1, 2);
  459. WaitRandom();
  460. if (SummoningPoint <= 6){
  461. WithdrawPot();
  462. WaitRandom();
  463. DrinkPot();
  464. }
  465. }
  466. SpecialCount = 0;
  467. log("Banking.");
  468. RSObject FindBank = getNearestObjectByID(BankBoothID);
  469. if (FindBank == null){
  470. log("Couldn't find bank...");
  471. stopScript();
  472. }
  473. while (!bank.isOpen()){
  474. atObject(FindBank, "Use-quickly");
  475. WaitRandom();
  476. }
  477. if (bank.isOpen());
  478. bank.depositAllFamiliar();
  479. }
  480. if (makingPizza == true){
  481. PizzaCount = getInventoryCount(IncompleteID);
  482. CheeseCount = getInventoryCount(CheeseID);
  483. CombinedWithdraw = PizzaCount + CheeseCount;
  484. if (CombinedWithdraw != 28){
  485. RSObject FindBank = getNearestObjectByID(BankBoothID);
  486. while (!bank.isOpen()){
  487. atObject(FindBank, "Use-quickly");
  488. WaitRandom();
  489. }
  490. PizzaCount = bank.getCount(IncompleteID);
  491. CheeseCount = bank.getCount(CheeseID);
  492. if (PizzaCount == 0){
  493. log("No Pizza's");
  494. bank.getCount(TomatoID);
  495. if (TomatoCount > 0){
  496. log("Making uncomplete pizza's");
  497. makingPizza = false;
  498. usingScrolls = false;
  499. makingIncompletePizza = true;
  500. bank.close();
  501. return random(500,1000);
  502. }
  503. if (TomatoCount == 0){
  504. log("Stopping script...");
  505. stopScript();
  506. }
  507. }
  508. if (CheeseCount == 0){
  509. log("No Cheese");
  510. stopScript();
  511. }
  512. bank.depositAll();
  513. bank.withdraw(IncompleteID, 14);
  514. wait(random(100,200));
  515. bank.withdraw(CheeseID, 14);
  516. WaitRandom();
  517. CheeseInv = getInventoryCount(CheeseID);
  518. PizzaInv = getInventoryCount(IncompleteID);
  519. CombinedWithdraw = PizzaInv + CheeseInv;
  520. while (CombinedWithdraw != 28){
  521. CombinedWithdraw = 0;
  522. bank.depositAll();
  523. bank.withdraw(IncompleteID, 14);
  524. wait(random(100,200));
  525. bank.withdraw(CheeseID, 14);
  526. WaitRandom();
  527. CheeseInv = getInventoryCount(CheeseID);
  528. PizzaInv = getInventoryCount(IncompleteID);
  529. CombinedWithdraw = PizzaInv + CheeseInv;
  530. }
  531. bank.close();
  532. WaitRandom();
  533. while(bank.isOpen()){
  534. bank.close();
  535. WaitRandom();
  536. }
  537. }
  538. MakePizza();
  539. WaitRandom();
  540. PizzaMade = getInventoryCount(UncookedID);
  541. WaitRandom();
  542. PizzaMade = getInventoryCount(UncookedID);
  543.  
  544. while (PizzaMade == 0){
  545. MakePizza();
  546. WaitRandom();
  547. PizzaMade = getInventoryCount(UncookedID);
  548. }
  549.  
  550. doAntiBanPizza();
  551.  
  552. while (PizzaMade < 14){
  553. PizzaMade = getInventoryCount(UncookedID);
  554. wait(random(100,200));
  555. }
  556. log("Pizza's done.");
  557.  
  558. atObject(FindBank, "Use-quickly");
  559. WaitRandom();
  560. while (!bank.isOpen()){
  561. atObject(FindBank, "Use-quickly");
  562. WaitRandom();
  563. }
  564. bank.depositAll();
  565. bank.withdraw(IncompleteID, 14);
  566. wait(random(100,200));
  567. bank.withdraw(CheeseID, 14);
  568. WaitRandom();
  569. CheeseInv = getInventoryCount(CheeseID);
  570. PizzaInv = getInventoryCount(IncompleteID);
  571. CombinedWithdraw = PizzaInv + CheeseInv;
  572. while (CombinedWithdraw != 28){
  573. bank.withdraw(IncompleteID, 14);
  574. wait(random(100,200));
  575. bank.withdraw(CheeseID, 14);
  576. WaitRandom();
  577. CheeseInv = getInventoryCount(CheeseID);
  578. PizzaInv = getInventoryCount(IncompleteID);
  579. CombinedWithdraw = PizzaInv + CheeseInv;
  580. }
  581. bank.close();
  582. WaitRandom();
  583. while(bank.isOpen()){
  584. bank.close();
  585. wait(random(1000,2000));
  586. }
  587. }
  588. }
  589. catch (Exception e){
  590. log("Script failed. Trying to start again.");
  591. }
  592. return random(500,1000);
  593. }
  594.  
  595. public void onFinish(){
  596. log("Thanks for using I2HYCheeseProducer");
  597. log("Uncooked pizza's made: " + TotalPizzaMade + ".");
  598. }
  599. //Paint
  600.  
  601. public void onRepaint(Graphics g) {
  602. //long millis = System.currentTimeMillis() - startTime;
  603. Mouse m = Bot.getClient().getMouse();
  604. //long PizzaPerHour = 0;
  605. int startlvl = 0;
  606. //if (MakePizza > 0)
  607. //PizzaPerHour = MakePizza * 3600 / (millis / 1000);
  608.  
  609. //long hours = millis / (1000 * 60 * 60);
  610. //millis -= hours * (1000 * 60 * 60);
  611. //long minutes = millis / (1000 * 60);
  612. //millis -= minutes * (1000 * 60);
  613. //long seconds = millis / 1000;
  614. //Status
  615. g.setColor( new Color(70, 234, 40, 150));
  616. g.fillRect(337, 322, 60, 16);
  617. g.setColor(new Color(0, 0, 0));
  618. g.drawRect(337, 322, 60, 16);
  619. g.setColor( new Color(70, 234, 40, 200));
  620. g.drawRect(338, 323, 58, 14);
  621. g.setColor(new Color(255, 255, 255));
  622. g.setFont(new Font("Comic Sans", Font.BOLD, 12));
  623. g.setColor(Color.black);
  624. g.drawString("Status", 341,334);
  625. g.setColor( new Color(70, 234, 40, 100));
  626. g.fillRect(337, 322, 60, 8);
  627. //Time Ran
  628. g.setColor( new Color(70, 234, 40, 150));
  629. g.fillRect(226, 322, 110, 16);
  630. g.setColor(new Color(0, 0, 0));
  631. g.drawRect(226, 322, 110, 16);
  632. g.setColor( new Color(70, 234, 40, 200));
  633. g.drawRect(227, 323, 108, 14);
  634. g.setColor(new Color(255, 255, 255));
  635. g.setFont(new Font("Comic Sans", Font.BOLD, 12));
  636. g.setColor(Color.black);
  637. //g.drawString(
  638. //hours
  639. //+"h "
  640. //+minutes
  641. //+"min "
  642. //+seconds
  643. //+"sec ", 234,334);
  644. //g.setColor( new Color(70, 234, 40, 100));
  645. g.fillRect(226, 322, 110, 8);
  646. if(m.x >= 337 && m.x < 397 && m.y >= 321 && m.y < 337) {
  647. g.setColor( new Color(70, 234, 40, 150));
  648. g.fillRect(337, 175, 182, 147);
  649. g.setColor(new Color(0, 0, 0));
  650. g.drawRect(337, 175, 182, 147);
  651. g.setColor(new Color(255, 255, 255));
  652. g.setColor(Color.black);
  653. g.setFont(new Font("Comic Sans", Font.BOLD, 12));
  654. g.drawString("PizzaMade: " + Integer.toString(PizzaMade) + "", 360, 217);
  655. //g.drawString("Averaging: " +PizzaPerHour+ " Pizza/Hr", 360, 257);
  656. //g.drawString("Status: "+status, 360, 317);
  657. g.setColor(new Color(255, 255, 255));
  658. g.setColor(Color.white);
  659. g.drawString("I2HYCheeseProducer!", 360, 197);
  660. g.setColor(Color.red);
  661. }
  662. //Color(white);
  663. g.setColor(new Color(255, 255, 255));
  664. }
  665. @Override
  666. public void serverMessageRecieved(ServerMessageEvent e) {
  667. String word = e.getMessage();
  668. if (word.contains("You add the cheese to the pizza.")){
  669. TotalPizzaMade = TotalPizzaMade + 1;
  670. }
  671. }
  672. }