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