Untitled
unknown
plain_text
2 years ago
3.0 kB
3
Indexable
@name Referance Arrays @inputs @outputs Target:vector @persist Pos1:vector Pos2:vector Printers:array Blue Red Green Vip Supervip Totalprinters @persist ToggleSwitch Locations:array I ##Commands## #!pos1 sets the location of the first corner# #!pos2 sets the location of the secound corner# #!pos Gives you a rounded vertion of the location of pos1 and pos2# #!printers show you how many of each printer type you have# event chat(Player:entity, Message:string, Length:number) { #Stops the function if it's not BenisMan typing# if (Player != owner()) { exit() } Args = Message:explode(" ") if(Args[1, string] == "!pos1") { Pos1=owner():aimPos() print("Position One Has Been Set") } if(Args[1, string] == "!pos2") { Pos2=owner():aimPos() print("Position Two Has Been Set") } if(Args[1, string] == "!pos") { print("Position One: " + round(Pos1):toString() + "Position Two " + round(Pos2):toString()) } if(Args[1, string] == "!printers") { print("Blue: " + Blue ) print("Red: " + Red ) print("Greeen: " + Green ) print("Vip: " + Vip ) print("Supervip: " + Supervip ) } if(Args[1, string] == "!start") { ToggleSwitch = 1 } if(Args[1, string] == "!stop") { ToggleSwitch = 0 } } if(first() || dupefinished()){ #Sets Array filter# findIncludeClass("boost_printer") #Blue Printer# findIncludeClass("boost_printer_red") #Red Printer# findIncludeClass("boost_printer_green") #Green Printer# findIncludeClass("boost_printer_yellow") #Vip Printer# findIncludeClass("boost_printer_purple") #SuperVip Printer# Blue = 0 Red = 0 Green = 0 Vip = 0 Supervip = 0 Totalprinters = 0 ToggleSwitch = 0 } if(ToggleSwitch == 1){ timer("T1", 6000) findInBox(Pos1, Pos2) Printers = findToArray() } if(clk("T1") == 1){ for(I=1, Printers:count()){ Target=Locations = Printers[I,entity] } } #Counts how many printers of each kind there are# for(I=1, Printers:count()){ Check = Printers[I,entity] Blue = 0 Red = 0 Green = 0 Vip = 0 Supervip = 0 Totalprinters = 0 if(Check:type()=="boost_printer"){Blue = 0 Blue++} if(Check:type()=="boost_printer_red"){Red++} if(Check:type()=="boost_printer_green"){Green++} if(Check:type()=="boost_printer_yellow"){Vip++} if(Check:type()=="boost_printer_purple"){Supervip++} Totalprinters = Printers:count() } if(ToggleSwitch == 1){ timer("T1", 6000) findInBox(Pos1, Pos2) Printers = findToArray() } if(clk("T1") == 1){ for(I=1, Printers:count()){ Target=Locations = Printers[I,entity] } }
Editor is loading...