Magus

(Wiremod Lemon Gate) Lodkagan Cookie Clicker

Jul 10th, 2014
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 19.05 KB | None | 0 0
  1. Cookie Clicker// Created by Magus / Lodkagan
  2. // Cookie Clicker v2.4.0
  3.  
  4. // ===== CONFIG =====
  5. int MaxBuyCount = 50
  6. bool HideChip = true
  7. bool DebugMode = false
  8.  
  9. // ===== CREATE INPUT/OUTPUTS =====
  10. input wirelink EGP
  11.  
  12. // ===== VARIABLES =====
  13. int Cookie      = 0
  14. int CpS         = 0
  15. int CookieMul   = 1.0
  16.  
  17. int Cursor      = 0
  18. int Grandma     = 0
  19. int Farm        = 0
  20. int Factory     = 0
  21. int Mine        = 0
  22. int Shipment    = 0
  23. int AlchemyLab  = 0
  24. int Portal      = 0
  25. int TimeMachine = 0
  26. int Antimatter  = 0
  27. int Prism       = 0
  28.  
  29. int CursorUpg      = 0
  30. int GrandmaUpg     = 0
  31. int FarmUpg        = 0
  32. int FactoryUpg     = 0
  33. int MineUpg        = 0
  34. int ShipmentUpg    = 0
  35. int AlchemyLabUpg  = 0
  36. int PortalUpg      = 0
  37. int TimeMachineUpg = 0
  38. int AntimatterUpg  = 0
  39. int PrismUpg       = 0
  40.  
  41. int CursorMul      = 1
  42. int GrandmaMul     = 1
  43. int FarmMul        = 1
  44. int FactoryMul     = 1
  45. int MineMul        = 1
  46. int ShipmentMul    = 1
  47. int AlchemyLabMul  = 1
  48. int PortalMul      = 1
  49. int TimeMachineMul = 1
  50. int AntimatterMul  = 1
  51. int PrismMul       = 1
  52.  
  53.  
  54. // ===== EGP =====
  55. EGP:egpClear()
  56.  
  57. // Cookies Counter
  58. EGP:egpText(1,"Cookie: " + Cookie, vec2(50,150))
  59. EGP:egpColor(1, color(255,255,255) )
  60. // Cookies Multiply
  61. EGP:egpText(2,"Mul: " + CookieMul, vec2(50,170))
  62. EGP:egpColor(2, color(255,255,255) )
  63. // Cookies!!!!!!!!!!!!!!!!!!!!!!
  64. EGP:egpCircle(3,vec2(80,120), vec2(30,30))
  65. EGP:egpColor(3, color(139,69,19) )
  66. // Cookies (CpS)
  67. EGP:egpText(4,"CpS: " + CpS*10, vec2(50,70))
  68. EGP:egpColor(4, color(255,255,255) )
  69. // TitleBar
  70. EGP:egpText(5,"Cookie Clicker by [Lodkagan/Magus]", vec2(120,0))
  71. EGP:egpColor(5, color(255,0,0) )
  72. // ===== Help =====
  73. // Help gain Cookies
  74. EGP:egpTextLayout(6,"- Press E on the cookie to bake a cookie!!!\n"+
  75.                     "- type 'buy name' to buy something ", vec2(10,370), vec2(502,512))
  76. EGP:egpColor(6, color(255,255,255) )
  77.  
  78. // ===== Buildings =====
  79. // Cursor
  80. EGP:egpText(20,"Cursor: " + Cursor + " (" + ceil(15*1.15^Cursor) + ")", vec2(250,120))
  81. EGP:egpColor(20, color(255,255,255) )
  82. // Grandma
  83. EGP:egpText(21,"Grandma: " + Grandma + " (" + ceil(100*1.15^Grandma) + ")", vec2(250,140))
  84. EGP:egpColor(21, color(255,255,255) )
  85. // Farm
  86. EGP:egpText(22,"Farm: " + Farm + " (" + ceil(500*1.15^Farm) + ")", vec2(250,160))
  87. EGP:egpColor(22, color(255,255,255) )
  88. // Factory
  89. EGP:egpText(23,"Factory: " + Factory + " (" + ceil(3000*1.15^Factory) + ")", vec2(250,180))
  90. EGP:egpColor(23, color(255,255,255) )
  91. // Mine
  92. EGP:egpText(24,"Mine: " + Mine + " (" + ceil(10000*1.15^Mine) + ")", vec2(250,200))
  93. EGP:egpColor(24, color(255,255,255) )
  94. // Shipment
  95. EGP:egpText(25,"Shipment: " + Shipment + " (" + ceil(40000*1.15^Shipment) + ")", vec2(250,220))
  96. EGP:egpColor(25, color(255,255,255) )
  97. // AlchemyLab
  98. EGP:egpText(26,"AlchemyLab: " + AlchemyLab + " (" + ceil(200000*1.15^AlchemyLab) + ")", vec2(250,240))
  99. EGP:egpColor(26, color(255,255,255) )
  100. // Portal
  101. EGP:egpText(27,"Portal: " + Portal + " (" + ceil(1666666*1.15^Portal) + ")", vec2(250,260))
  102. EGP:egpColor(27, color(255,255,255) )
  103. // TimeMachine
  104. EGP:egpText(28,"TimeMachine: " + TimeMachine + " (" + ceil(123456789*1.15^TimeMachine) + ")", vec2(250,280))
  105. EGP:egpColor(28, color(255,255,255) )
  106. // Antimatter
  107. EGP:egpText(29,"Antimatter: " + Antimatter + " (" + ceil(3999999999*1.15^Antimatter) + ")", vec2(250,300))
  108. EGP:egpColor(29, color(255,255,255) )
  109. // Prism
  110. EGP:egpText(30,"Prism: " + Prism + " (" + ceil(75000000000*1.15^Prism) + ")", vec2(250,320))
  111. EGP:egpColor(30, color(255,255,255) )
  112.  
  113. EGP:egpBox(40,vec2(240,130),vec2(10,10))
  114. EGP:egpColor(40, color(255,0,0) )
  115. EGP:egpBox(41,vec2(240,150),vec2(10,10))
  116. EGP:egpColor(41, color(255,0,0) )
  117. EGP:egpBox(42,vec2(240,170),vec2(10,10))
  118. EGP:egpColor(42, color(255,0,0) )
  119. EGP:egpBox(43,vec2(240,190),vec2(10,10))
  120. EGP:egpColor(43, color(255,0,0) )
  121. EGP:egpBox(44,vec2(240,210),vec2(10,10))
  122. EGP:egpColor(44, color(255,0,0) )
  123. EGP:egpBox(45,vec2(240,230),vec2(10,10))
  124. EGP:egpColor(45, color(255,0,0) )
  125. EGP:egpBox(46,vec2(240,250),vec2(10,10))
  126. EGP:egpColor(46, color(255,0,0) )
  127. EGP:egpBox(47,vec2(240,270),vec2(10,10))
  128. EGP:egpColor(47, color(255,0,0) )
  129. EGP:egpBox(48,vec2(240,290),vec2(10,10))
  130. EGP:egpColor(48, color(255,0,0) )
  131. EGP:egpBox(49,vec2(240,310),vec2(10,10))
  132. EGP:egpColor(49, color(255,0,0) )
  133. EGP:egpBox(50,vec2(240,330),vec2(10,10))
  134. EGP:egpColor(50, color(255,0,0) )
  135.  
  136. // ===== CODE =====
  137. if(HideChip) {
  138.     self():setColor( color(0,0,0,0) )
  139. }
  140.  
  141. // ===== FUNCTIONS =====
  142. function gameTime() {
  143.     CpS = ((Cursor*0.1)*CursorMul+
  144.     (Grandma*0.5)*GrandmaMul+
  145.     (Farm*4.0)*FarmMul+
  146.     (Factory*10.0)*FactoryMul+
  147.     (Mine*40.0)*MineMul+
  148.     (Shipment*100.0)*ShipmentMul+
  149.     (AlchemyLab*400.0)*AlchemyLabMul+
  150.     (Portal*6666.0)*PortalMul+
  151.     (TimeMachine*98765.0)*TimeMachineMul+
  152.     (Antimatter*999999.0)*AntimatterMul+
  153.     (Prism*10000000.0)*PrismMul)/10
  154.        
  155.     Cookie += CpS * CookieMul
  156.    
  157.     if(Cookie >= 15         *1.15^Cursor)        {EGP:egpColor(40, color(0,255,0) )} else {EGP:egpColor(40, color(255,0,0) )}
  158.     if(Cookie >= 100        *1.15^Grandma)       {EGP:egpColor(41, color(0,255,0) )} else {EGP:egpColor(41, color(255,0,0) )}
  159.     if(Cookie >= 500        *1.15^Farm)          {EGP:egpColor(42, color(0,255,0) )} else {EGP:egpColor(42, color(255,0,0) )}
  160.     if(Cookie >= 3000       *1.15^Factory)       {EGP:egpColor(43, color(0,255,0) )} else {EGP:egpColor(43, color(255,0,0) )}
  161.     if(Cookie >= 10000      *1.15^Mine)          {EGP:egpColor(44, color(0,255,0) )} else {EGP:egpColor(44, color(255,0,0) )}
  162.     if(Cookie >= 40000      *1.15^Shipment)      {EGP:egpColor(45, color(0,255,0) )} else {EGP:egpColor(45, color(255,0,0) )}
  163.     if(Cookie >= 200000     *1.15^AlchemyLab)    {EGP:egpColor(46, color(0,255,0) )} else {EGP:egpColor(46, color(255,0,0) )}
  164.     if(Cookie >= 1666666    *1.15^Portal)        {EGP:egpColor(47, color(0,255,0) )} else {EGP:egpColor(47, color(255,0,0) )}
  165.     if(Cookie >= 123456789  *1.15^TimeMachine)   {EGP:egpColor(48, color(0,255,0) )} else {EGP:egpColor(48, color(255,0,0) )}
  166.     if(Cookie >= 3999999999 *1.15^Antimatter)    {EGP:egpColor(49, color(0,255,0) )} else {EGP:egpColor(49, color(255,0,0) )}
  167.     if(Cookie >= 75000000000*1.15^Prism)         {EGP:egpColor(50, color(0,255,0) )} else {EGP:egpColor(50, color(255,0,0) )}
  168.    
  169.    
  170.     timerCreate("gameTime",0.1,0,function() {gameTime()})
  171. }
  172.  
  173. function resetGame() {
  174.     Cursor      = 0
  175.     Grandma     = 0
  176.     Farm        = 0
  177.     Factory     = 0
  178.     Mine        = 0
  179.     Shipment    = 0
  180.     AlchemyLab  = 0
  181.     Portal      = 0
  182.     TimeMachine = 0
  183.     Antimatter  = 0
  184.     Prism       = 0
  185.    
  186.     CursorUpg      = 0
  187.     GrandmaUpg     = 0
  188.     FarmUpg        = 0
  189.     FactoryUpg     = 0
  190.     MineUpg        = 0
  191.     ShipmentUpg    = 0
  192.     AlchemyLabUpg  = 0
  193.     PortalUpg      = 0
  194.     TimeMachineUpg = 0
  195.     AntimatterUpg  = 0
  196.     PrismUpg       = 0
  197.    
  198.     Cookie      = 0
  199.     CpS         = 0
  200.     CookieMul   = 1.0
  201.    
  202.     EGP:egpSetText(20,"Cursor: "      + Cursor      + " (" + ceil(15         *1.15^Cursor      ) + ")")
  203.     EGP:egpSetText(21,"Grandma: "     + Grandma     + " (" + ceil(100        *1.15^Grandma     ) + ")")
  204.     EGP:egpSetText(22,"Farm: "        + Farm        + " (" + ceil(500        *1.15^Farm        ) + ")")
  205.     EGP:egpSetText(23,"Factory: "     + Factory     + " (" + ceil(3000       *1.15^Factory     ) + ")")
  206.     EGP:egpSetText(24,"Mine: "        + Mine        + " (" + ceil(10000      *1.15^Mine        ) + ")")
  207.     EGP:egpSetText(25,"Shipment: "    + Shipment    + " (" + ceil(40000      *1.15^Shipment    ) + ")")
  208.     EGP:egpSetText(26,"AlchemyLab: "  + AlchemyLab  + " (" + ceil(200000     *1.15^AlchemyLab  ) + ")")
  209.     EGP:egpSetText(27,"Portal: "      + Portal      + " (" + ceil(1666666    *1.15^Portal      ) + ")")
  210.     EGP:egpSetText(28,"TimeMachine: " + TimeMachine + " (" + ceil(123456789  *1.15^TimeMachine ) + ")")
  211.     EGP:egpSetText(29,"Antimatter: "  + Antimatter  + " (" + ceil(3999999999 *1.15^Antimatter  ) + ")")
  212.     EGP:egpSetText(30,"Prism: "       + Prism       + " (" + ceil(75000000000*1.15^Prism       ) + ")")
  213. }
  214.  
  215. function setGame(string Text) {
  216.     table LoadedContent = Text:explode(",")
  217.    
  218.     Cookie      = LoadedContent[1,string]
  219.     CookieMul   = LoadedContent[2,string]
  220.     Cursor      = LoadedContent[3,string]
  221.     Grandma     = LoadedContent[4,string]
  222.     Farm        = LoadedContent[5,string]
  223.     Factory     = LoadedContent[6,string]
  224.     Mine        = LoadedContent[7,string]
  225.     Shipment    = LoadedContent[8,string]
  226.     AlchemyLab  = LoadedContent[9,string]
  227.     Portal      = LoadedContent[10,string]
  228.     TimeMachine = LoadedContent[11,string]
  229.     Antimatter  = LoadedContent[12,string]
  230.     Prism       = LoadedContent[13,string]
  231.    
  232.     CursorUpg      = LoadedContent[14,string]
  233.     GrandmaUpg     = LoadedContent[15,string]
  234.     FarmUpg        = LoadedContent[16,string]
  235.     FactoryUpg     = LoadedContent[17,string]
  236.     MineUpg        = LoadedContent[18,string]
  237.     ShipmentUpg    = LoadedContent[19,string]
  238.     AlchemyLabUpg  = LoadedContent[20,string]
  239.     PortalUpg      = LoadedContent[21,string]
  240.     TimeMachineUpg = LoadedContent[22,string]
  241.     AntimatterUpg  = LoadedContent[23,string]
  242.     PrismUpg       = LoadedContent[24,string]
  243.    
  244.     EGP:egpSetText(20,"Cursor: "      + Cursor      + " (" + ceil(15         *1.15^Cursor      ) + ")")
  245.     EGP:egpSetText(21,"Grandma: "     + Grandma     + " (" + ceil(100        *1.15^Grandma     ) + ")")
  246.     EGP:egpSetText(22,"Farm: "        + Farm        + " (" + ceil(500        *1.15^Farm        ) + ")")
  247.     EGP:egpSetText(23,"Factory: "     + Factory     + " (" + ceil(3000       *1.15^Factory     ) + ")")
  248.     EGP:egpSetText(24,"Mine: "        + Mine        + " (" + ceil(10000      *1.15^Mine        ) + ")")
  249.     EGP:egpSetText(25,"Shipment: "    + Shipment    + " (" + ceil(40000      *1.15^Shipment    ) + ")")
  250.     EGP:egpSetText(26,"AlchemyLab: "  + AlchemyLab  + " (" + ceil(200000     *1.15^AlchemyLab  ) + ")")
  251.     EGP:egpSetText(27,"Portal: "      + Portal      + " (" + ceil(1666666    *1.15^Portal      ) + ")")
  252.     EGP:egpSetText(28,"TimeMachine: " + TimeMachine + " (" + ceil(123456789  *1.15^TimeMachine ) + ")")
  253.     EGP:egpSetText(29,"Antimatter: "  + Antimatter  + " (" + ceil(3999999999 *1.15^Antimatter  ) + ")")
  254.     EGP:egpSetText(30,"Prism: "       + Prism       + " (" + ceil(75000000000*1.15^Prism       ) + ")")
  255.    
  256.     print("Game Loaded!")
  257. }
  258.  
  259. function loadGame(string FileName) {
  260.     print("Loading File: (" +FileName+"). Use 'game save <name>' to save the game.")
  261.     fileLoad("CookieClicker/"+FileName+".txt",setGame )
  262. }
  263.  
  264. function saveGame(string FileName) {
  265.     print("Saving File: (" +FileName+"). Use 'game load <name>' to load the game.")
  266.     fileWrite("CookieClicker/"+FileName+".txt",
  267.         Cookie         +","+
  268.         CookieMul      +","+
  269.         Cursor         +","+
  270.         Grandma        +","+
  271.         Farm           +","+
  272.         Factory        +","+
  273.         Mine           +","+
  274.         Shipment       +","+
  275.         AlchemyLab     +","+
  276.         Portal         +","+
  277.         TimeMachine    +","+
  278.         Antimatter     +","+
  279.         Prism          +","+
  280.         CursorUpg      +","+
  281.         GrandmaUpg     +","+
  282.         FarmUpg        +","+
  283.         FactoryUpg     +","+
  284.         MineUpg        +","+
  285.         ShipmentUpg    +","+
  286.         AlchemyLabUpg  +","+
  287.         PortalUpg      +","+
  288.         TimeMachineUpg +","+
  289.         AntimatterUpg  +","+
  290.         PrismUpg)
  291.        
  292. }
  293.  
  294. function buyCursor() {
  295.     if(Cookie >= 15*1.15^Cursor) {
  296.         Cookie -= 15*1.15^Cursor
  297.         Cursor++
  298.         EGP:egpSetText(20,"Cursor: " + Cursor + " (" + ceil(15*1.15^Cursor) + ")")
  299.     }
  300. }
  301.  
  302. function buyGrandma() {
  303.     if(Cookie >= 100*1.15^Grandma) {
  304.         Cookie -= 100*1.15^Grandma
  305.         Grandma++
  306.         EGP:egpSetText(21,"Grandma: " + Grandma + " (" + ceil(100*1.15^Grandma) + ")")
  307.     }
  308. }
  309.  
  310. function buyFarm() {
  311.     if(Cookie >= 500*1.15^Farm) {
  312.         Cookie -= 500*1.15^Farm
  313.         Farm++
  314.         EGP:egpSetText(22,"Farm: " + Farm + " (" + ceil(500*1.15^Farm) + ")")
  315.     }
  316. }
  317.  
  318. function buyFactory() {
  319.     if(Cookie >= 3000*1.15^Factory) {
  320.         Cookie -= 3000*1.15^Factory
  321.         Factory++
  322.         EGP:egpSetText(23,"Factory: " + Factory + " (" + ceil(3000*1.15^Factory) + ")")
  323.     }
  324. }
  325.  
  326. function buyMine() {
  327.     if(Cookie >= 10000*1.15^Mine) {
  328.         Cookie -= 10000*1.15^Mine
  329.         Mine++
  330.         EGP:egpSetText(24,"Mine: " + Mine + " (" + ceil(10000*1.15^Mine) + ")")
  331.     }
  332. }
  333.  
  334. function buyShipment() {
  335.     if(Cookie >= 40000*1.15^Shipment) {
  336.         Cookie -= 40000*1.15^Shipment
  337.         Shipment++
  338.         EGP:egpSetText(25,"Shipment: " + Shipment + " (" + ceil(40000*1.15^Shipment) + ")")
  339.     }
  340. }
  341.  
  342. function buyAlchemyLab() {
  343.     if(Cookie >= 200000*1.15^AlchemyLab) {
  344.         Cookie -= 200000*1.15^AlchemyLab
  345.         AlchemyLab++
  346.         EGP:egpSetText(26,"AlchemyLab: " + AlchemyLab + " (" + ceil(200000*1.15^AlchemyLab) + ")")
  347.     }
  348. }
  349.  
  350. function buyPortal() {
  351.     if(Cookie >= 1666666*1.15^Portal) {
  352.         Cookie -= 1666666*1.15^Portal
  353.         Portal++
  354.         EGP:egpSetText(27,"Portal: " + Portal + " (" + ceil(1666666*1.15^Portal) + ")")
  355.     }
  356. }
  357. function buyTimeMachine() {
  358.     if(Cookie >= 123456789*1.15^TimeMachine) {
  359.         Cookie -= 123456789*1.15^TimeMachine
  360.         TimeMachine++
  361.         EGP:egpSetText(28,"TimeMachine: " + TimeMachine + " (" + ceil(123456789*1.15^TimeMachine) + ")")
  362.     }
  363. }
  364. function buyAntimatter() {
  365.     if(Cookie >= 3999999999*1.15^Antimatter) {
  366.         Cookie -= 3999999999*1.15^Antimatter
  367.         Antimatter++
  368.         EGP:egpSetText(29,"Antimatter: " + Antimatter + " (" + ceil(3999999999*1.15^Antimatter) + ")")
  369.     }
  370. }
  371. function buyPrism() {
  372.     if(Cookie >= 75000000000*1.15^Prism) {
  373.         Cookie -= 75000000000*1.15^Prism
  374.         Prism++
  375.         EGP:egpSetText(30,"Prism: " + Prism + " (" + ceil(75000000000*1.15^Prism) + ")")
  376.     }
  377. }
  378.  
  379. // ===== EVENTS =====
  380. event tick() {
  381.     EGP:egpSetText(1,"Cookie: " + floor(Cookie))
  382.     EGP:egpSetText(4,"CpS: " + CpS*10)
  383. }
  384.  
  385. event think() {
  386.    
  387. }
  388.  
  389. event keypress(int Key) {
  390.     if( Key == 128) { // Numpad: 0 - (15)Cursor
  391.         buyCursor()
  392.     }elseif( Key == 129) { // Numpad: 1 - (100)Grandma
  393.         buyGrandma()
  394.     }elseif( Key == 130) { // Numpad: 2 - (500)Farm
  395.         buyFarm()
  396.     }elseif( Key == 131) { // Numpad: 3 - (3.000)Factory
  397.         buyFactory()
  398.     }elseif( Key == 132) { // Numpad: 4 - (10.000)Mine
  399.         buyMine()
  400.     }elseif( Key == 133) { // Numpad: 5 - (40.000)Shipment
  401.         buyShipment()
  402.     }elseif( Key == 134) { // Numpad: 6 - (200.000)AlchemyLab
  403.         buyAlchemyLab()
  404.     }elseif( Key == 135) { // Numpad: 7 - (1.666.666)Portal
  405.         buyPortal()
  406.     }elseif( Key == 136) { // Numpad: 8 - (123.456.789)TimeMachine
  407.         buyTimeMachine()
  408.     }elseif( Key == 137) { // Numpad: 9 - (3.999.999.999)Antimatter
  409.         buyAntimatter()
  410.     }elseif( Key == 143) { // Numpad: , - (75.000.000.000)Prism
  411.         buyPrism()
  412.     }
  413. }
  414.  
  415. event keyrelease(int Key) {
  416.    
  417. }
  418.  
  419. event playerChat(entity Player, string Text) {
  420.     table Say = Text:lower():explode(" ")
  421.    
  422.     if(Say[1,string] == "buy") {
  423.         Say[3,number] = (int) Say[3,string]
  424.         if( Say[2,string] == "cursor") { // Numpad: 0 - (15)Cursor
  425.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  426.                 for(int I=0;I<Say[3,number];I++) {
  427.                     buyCursor()
  428.                 }
  429.             } else {
  430.                 buyCursor()
  431.             }
  432.         }elseif( Say[2,string] == "grandma") { // Numpad: 1 - (100)Grandma
  433.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  434.                 for(int I=0;I<Say[3,number];I++) {
  435.                     buyGrandma()
  436.                 }
  437.             } else {
  438.                 buyGrandma()
  439.             }
  440.         }elseif( Say[2,string] == "farm") { // Numpad: 2 - (500)Farm
  441.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  442.                 for(int I=0;I<Say[3,number];I++) {
  443.                     buyFarm()
  444.                 }
  445.             } else {
  446.                 buyFarm()
  447.             }
  448.         }elseif( Say[2,string] == "factory") { // Numpad: 3 - (3.000)Factory
  449.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  450.                 for(int I=0;I<Say[3,number];I++) {
  451.                     buyFactory()
  452.                 }
  453.             } else {
  454.                 buyFactory()
  455.             }
  456.         }elseif( Say[2,string] == "mine") { // Numpad: 4 - (10.000)Mine
  457.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  458.                 for(int I=0;I<Say[3,number];I++) {
  459.                     buyMine()
  460.                 }
  461.             } else {
  462.                 buyMine()
  463.             }
  464.         }elseif( Say[2,string] == "shipment") { // Numpad: 5 - (40.000)Shipment
  465.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  466.                 for(int I=0;I<Say[3,number];I++) {
  467.                     buyShipment()
  468.                 }
  469.             } else {
  470.                 buyShipment()
  471.             }
  472.         }elseif( Say[2,string] == "alchemylab") { // Numpad: 6 - (200.000)AlchemyLab
  473.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  474.                 for(int I=0;I<Say[3,number];I++) {
  475.                     buyAlchemyLab()
  476.                 }
  477.             } else {
  478.                 buyAlchemyLab()
  479.             }
  480.         }elseif( Say[2,string] == "portal") { // Numpad: 7 - (1.666.666)Portal
  481.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  482.                 for(int I=0;I<Say[3,number];I++) {
  483.                     buyPortal()
  484.                 }
  485.             } else {
  486.                 buyPortal()
  487.             }
  488.         }elseif( Say[2,string] == "timemachine") { // Numpad: 8 - (123.456.789)TimeMachine
  489.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  490.                 for(int I=0;I<Say[3,number];I++) {
  491.                     buyTimeMachine()
  492.                 }
  493.             } else {
  494.                 buyTimeMachine()
  495.             }
  496.         }elseif( Say[2,string] == "antimatter") { // Numpad: 9 - (3.999.999.999)Antimatter
  497.             if(Say[3,number]>= 1 && Say[3,int] <= MaxBuyCount) {
  498.                 for(int I=0;I<Say[3,number];I++) {
  499.                     buyAntimatter()
  500.                 }
  501.             } else {
  502.                 buyAntimatter()
  503.             }
  504.         }elseif( Say[2,string] == "prism") { // Numpad: , - (75.000.000.000)Prism
  505.             if(Say[3,number] >= 1 && Say[3,int] <= MaxBuyCount) {
  506.                 for(int I=0;I<Say[3,number];I++) {
  507.                     buyPrism()
  508.                 }
  509.             } else {
  510.                 buyPrism()
  511.             }
  512.         }
  513.        
  514.     }elseif(Say[1,string] == "upgrade")  {
  515.        
  516.     }elseif(Say[1,string] == "game") {
  517.              if(Say[2,string] == "reset") {
  518.             resetGame()
  519.         }elseif(Say[2,string] == "save") {
  520.             saveGame(Say[3,string])
  521.         }elseif(Say[2,string] == "load") {
  522.             loadGame(Say[3,string])
  523.         }
  524.        
  525.        
  526.     }
  527. }
  528.  
  529. event use(entity Player) {
  530.     Cookie++
  531. }
  532.  
  533. event shutdown() {
  534.     saveGame("autosave")
  535. }
  536.  
  537. timerCreate("gameTime",1,0,function() {gameTime()})
Advertisement
Add Comment
Please, Sign In to add comment