Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --GAME VARIABLES--
- win=0
- ep1=""
- ep2=""
- ep3=""
- ep4=""
- name=readline ("Please type your name:")
- salary=0
- money=0
- purity=1
- worth=10
- day=1
- cooks=0
- distrs=0
- resrs=0
- locs=0
- tired=0
- b1="|Available]"
- b2="|Available]"
- b3="|Available]"
- b4="|Available]"
- rsc=0
- rs1=0
- rs2=0
- rs3=0
- rs4=0
- rs5=0
- rs6=0
- hc1=0
- hc2=0
- hc3=0
- hd1=0
- hd2=0
- hd3=0
- hr1=0
- hr2=0
- hr3=0
- mhc1=0
- mhc2=0
- mhc3=0
- meth=0
- methd1=0
- methd2=0
- methd3=0
- meths1=0
- meths2=0
- meths3=0
- rr1=hr1*0.1
- rr2=hr2*0.2
- rr3=hr3*0.3
- rrate=rr1+rr2+rr3
- if name=="Winner" then purity=100 end
- if name=="Heisenberg" then purity=100 end
- if name=="Walter White" then purity=50 end
- if name=="Jesse Pinkman" then purity=25 end
- if name=="Gus Fring" then
- rs5=1
- rs6=1
- rsc=96
- money=15000
- end
- --GAME AND WORKERS LOGIC--
- function CheckResearchers()
- rr1=hr1*0.1
- rr2=hr2*0.2
- rr3=hr3*0.3
- rrate=rr1+rr2+rr3
- end
- function CheckCooks()
- if cooks>0 then
- if distrs>=cooks then
- salary=distrs*20
- end
- end
- end
- function Research()
- if resrs>0 then
- purity=purity+rrate
- end
- end
- function CheckPurity()
- if purity>100 then
- purity=100
- end
- end
- function CheckLocations()
- locs=rs1+rs2+rs3+rs4+rs5+rs6
- end
- function CheckWorkers()
- cooks=hc1+hc2+hc3
- distrs=hd1+hd2+hd3
- resrs=hr1+hr2+hr3
- end
- function CheckSalary()
- if distrs>=cooks then
- mhc1=hc1
- mhc2=hc2*2
- mhc3=hc3*3
- meth=mhc1+mhc2+mhc3
- if hd2==0 and hd3==0 then
- methd1=meth
- elseif hd1==0 and hd3==0 then
- methd2=meth
- elseif hd1==0 and hd2==0 then
- methd3=meth
- elseif hd1==0 then
- methd2=meth/2
- methd3=meth/2
- elseif hd2==0 then
- methd1=meth/2
- methd3=meth/2
- elseif hd3==0 then
- methd1=meth/2
- methd2=meth/2
- else
- methd1=meth/3
- methd2=meth/3
- methd3=meth/3
- end
- meths1=methd1*25
- meths2=methd2*50
- meths3=methd3*100
- salary=meths1+meths2+meths3
- end
- end
- function WinGame()
- if purity==100 and name~="Heisenberg" then
- win=1
- print("!! YOU WIN !!","Congratulations! You have reached 100% purity and won the game in "..day.." days.")
- exit()
- end
- end
- function CheckWorth()
- if purity<11 and purity<20 then
- worth=20
- elseif purity<21 and purity<50 then
- worth=40
- elseif purity<31 and purity<75 then
- worth=50
- elseif purity<51 and purity<90 then
- worth=75
- elseif purity<90 then
- worth=100
- elseif purity<91 then
- worth=125
- elseif purity<92 then
- worth=150
- elseif purity<93 then
- worth=200
- elseif purity<94 then
- worth=250
- elseif purity<95 then
- worth=250
- elseif purity<96 then
- worth=300
- elseif purity<97 then
- worth=350
- elseif purity<98 then
- worth=400
- elseif purity<99 then
- worth=450
- elseif purity<100 then
- worth=500
- elseif purity==100 then
- worth=1000
- end
- end
- --TUTORIAL--
- print("WELCOME","Welcome to Cartel Simulator. The basics of the game is this.. cook meth to get money and use that money to hire more cooks, distributors, researchers, etc to make the most money you can. Throughout the menus you will be asked questions of what you want to do. Your options will be in CAPS and you will input the CAPS option after you press Done. Note that these inputs are NOT case sensitive. Also keep in mind that you can leave any input option blank to return to the main menu.\n\nExpansions(ignore this)\n-------------\n"..ep1.."\n"..ep2.."\n"..ep3.."\n"..ep4.."")
- --GAME MENU--
- function m()
- CheckResearchers()
- CheckWorkers()
- CheckPurity()
- CheckWorth()
- CheckCooks()
- CheckLocations()
- CheckSalary()
- print("MENU","Hello "..name..". It is Day "..day..". You currently have $"..money.." and make $"..salary.." a day. Your meth purity is "..purity.."%. You have "..cooks.." cooks, "..distrs.." distributors, and "..resrs.." researchers all at "..locs.." different locations, which all have "..rsc.." staff slots combined. You own "..rs1.." shacks, "..rs2.." treehouses, "..rs3.." apartments, "..rs4.." houses, "..rs5.." commercial buildings, and "..rs6.." industrial buildings.")
- WinGame()
- print("MENU","What would you like to do? BUY equipment, HIRE workers, check REAL ESTATE, COOK a batch of meth, or SLEEP for the night?\n\n\n\n\n\nDEBUG for debug menu")
- manage=readline("manage")
- end
- --MENU OPTIONS--
- function o()
- if strlower(manage)=="sleep" then
- print("SLEEP","You sleep for the night")
- day=day+1
- money=money+salary
- tired=0
- Research()
- end
- if strlower(manage)=="cook" then
- if tired>=5 then
- print("NOPE","You are too tired! You need to sleep.")
- else
- print("COOK","You cook a batch for $"..worth.."!")
- money=money+worth
- tired=tired+1
- end
- end
- if strlower(manage)=="buy" then
- print("BUY","Welcome to the equipment shop! From here you can buy equipment that will raise your purity level. Here are your options...")
- print("BUY","[OP1|Extra lab equipment|$100"..b1.."\n\n[OP2|Uncle Jim's chemistry kit|$500"..b2.."\n\n[OP3|ServX Chemical Purifier|$1,500"..b3.."\n\n[OP4|Shady underground lab contruction deal|$10,000"..b4..".")
- bc=readline("Which do you want to buy?")
- if strlower(bc)=="op1" then
- if b1=="|Available]" then
- if money>=100 then
- money=money-100
- b1="|Purchased"
- purity=purity+5
- print("PURCHASED","You have bought some extra lab equipment")
- elseif money<100 then
- print("INVALID","You dont have enough money")
- end
- end
- if b1=="|Purchased]" then
- print("","You already bought that")
- end
- end
- if strlower(bc)=="op2" then
- if b2=="|Available]" then
- if money>=500 then
- money=money-500
- b2="|Purchased]"
- purity=purity+10
- print("PURCHASED","You have bought Uncle Jim's lab kit")
- elseif money<500 then
- print("INVALID","You dont have enough money")
- end
- elseif b2=="|Purchased]" then
- print("","You already bought that")
- end
- end
- if strlower(bc)=="op3" then
- if b3=="|Available]" then
- if money>=1500 then
- money=money-1500
- b3="|Purchased"
- purity=purity+15
- print("PURCHASED","You have bought a chemical purifier")
- elseif money<1500 then
- print("INVALID","You dont have enough money")
- end
- elseif b3=="|Purchased]" then
- print("","You already bought that")
- end
- end
- if strlower(bc)=="op4" then
- if b4=="|Available]" then
- if money>=10000 then
- money=money-10000
- b4="|Purchased"
- purity=purity+20
- print("PURCHASED","You have constructed an underground lab")
- elseif money<10000 then
- print("INVALID","You dont have enough money")
- end
- elseif b4=="|Purchased]" then
- print("","You already bought that")
- end
- end
- end
- if strlower(manage)=="real estate" then
- print("REAL ESTATE","Welcome to the real estate menu! From here you can purchase additional buildings to hide your cartel staff in. Here are your options...")
- print("REAL ESTATE","[OP1|Backyard shack|$100|Fits 2 people]\n\n[OP2|Treehouse|$250|Fits 5 people]\n\n[OP3|Apartment|$600|Fits 8 people]\n\n[OP4|House|$1800|Fits 19 people]\n\n[OP5|Commercial building|$5600|Fits 32]\n\n[OP6|Industrial building|$10400|Fits 64]")
- rc=readline("Which do you want to buy?")
- if strlower(rc)=="op1" then
- if money>=100 then
- print("","You bought a backyard shack")
- rs1=rs1+1
- rsc=rsc+2
- money=money-100
- elseif money<100 then
- print("You dont have enough money")
- end
- end
- if strlower(rc)=="op2" then
- if money>=250 then
- print("","You bought a treehouse")
- rs2=rs2+1
- rsc=rsc+5
- money=money-250
- elseif money<250 then
- print("You dont have enough money")
- end
- end
- if strlower(rc)=="op3" then
- if money>=600 then
- print("","You bought an apartment")
- rs3=rs3+1
- rsc=rsc+8
- money=money-600
- elseif money<600 then
- print("You dont have enough money")
- end
- end
- if strlower(rc)=="op4" then
- if money>=1800 then
- print("","You bought a house")
- rs4=rs4+1
- rsc=rsc+19
- money=money-1800
- elseif money<1800 then
- print("You dont have enough money")
- end
- end
- if strlower(rc)=="op5" then
- if money>=5600 then
- print("","You bought a commercial building")
- rs5=rs5+1
- rsc=rsc+32
- money=money-5600
- elseif money<5600 then
- print("You dont have enough money")
- end
- end
- if strlower(rc)=="op6" then
- if money>=10400 then
- print("","You bought an industrial building")
- rs6=rs6+1
- rsc=rsc+64
- money=money-10400
- elseif money<10400 then
- print("You dont have enough money")
- end
- end
- end
- if strlower(manage)=="hire" then
- print("WORKERS","Welcome to the hire menu. Here you can hire illegal immigrants of different skill levels to do different things. Cooks automatically cook batches of meth each day, distributors sell the meth that the cooks produce, and researches add percentage to your purity level each day. Keep in mind that cooks can only get their meth sold if you have an equal amount of distributors! Here are your options...")
- print("WORKERS","[C1|Low-skill meth cook|$200]\n\n[C2|Medium-skill meth cook|$450]\n\n[C3|High-skill meth cook|$1000]\n\n[D1|Low-skill distributor|$100]\n\n[D2|Medium-skill distributor|$300]\n\n[D3|High-skill distributor|$600]\n\n[R1|Low-skill researcher|$500]\n\n[R2|Medium-skill researcher|$1000]\n\n[R3|High-skill researcher|$2000]")
- hc=readline("Which would you like to hire?")
- if strlower(hc)=="c1" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=200 then
- print("","You hired a low skill cook")
- hc1=hc1+1
- money=money-200
- rsc=rsc-1
- elseif money<200 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="c2" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=450 then
- print("","You hired a medium skill cook")
- hc2=hc2+1
- money=money-450
- rsc=rsc-1
- elseif money<450 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="c3" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=1000 then
- print("","You hired a high skill cook")
- hc3=hc3+1
- money=money-1000
- rsc=rsc-1
- elseif money<1000 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="d1" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=100 then
- print("","You hired a low skill distributor")
- hd1=hd1+1
- money=money-100
- rsc=rsc-1
- elseif money<100 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="d2" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=300 then
- print("","You hired a medium skill distributor")
- hd2=hd2+1
- money=money-300
- rsc=rsc-1
- elseif money<300 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="d3" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=600 then
- print("","You hired a high skill distributor")
- hd3=hd3+1
- money=money-600
- rsc=rsc-1
- elseif money<600 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="r1" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=500 then
- print("","You hired a low skill researcher")
- hr1=hr1+1
- money=money-500
- rsc=rsc-1
- elseif money<500 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="r2" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=1000 then
- print("","You hired a medium skill researcher")
- hr2=hr2+1
- money=money-1000
- rsc=rsc-1
- elseif money<1000 then
- print("","You do not have enough money")
- end
- end
- if strlower(hc)=="r3" then
- if rsc==0 then
- print("","You do not have any open staff slots")
- elseif money>=1000 then
- print("","You hired a high skill researcher")
- hr3=hr3+1
- money=money-2000
- rsc=rsc-1
- elseif money<2000 then
- print("","You do not have enough money")
- end
- end
- end
- end
- --LOOPER--
- while win==0 do
- m()
- o()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement