Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name YCMDS V3
- @persist ShieldOn CloakOn Destination:string [Beamtovec,Beamtopads,NotFound]:normal Collector:entity [Collector2,Water,Warpcore,Transporter,Energy,Cloak,Shield]:wirelink
- @model models/medicdevicedestiny.mdl
- #@outputs ShieldOn CloakOn Destination:string Beamtopads NotFound
- Shield["Activate",normal] = ShieldOn
- Cloak["Activate",normal] = CloakOn
- if(Beamtovec){
- Transporter["Beam to vector", normal] = 1
- Beamtovec = 0
- }
- else{Transporter["Beam to vector", normal] = 0}
- if(Beamtopads){
- Transporter["Beam to pads", normal] = 1
- Beamtopads = 0
- }
- else{Transporter["Beam to pads", normal] = 0}
- if(dupefinished()){reset()}
- #Wiring Setup#
- if(first()){
- findIncludePlayerProps(owner())
- if(findByClass("quantum_slipstream_drive")){
- Warpcore = find():wirelink()
- print("Found Quantum Slipstream")}
- if(findByClass("ship_drive")){
- Warpcore = find():wirelink()
- print("Found ship drive")}
- if(findByClass("transporter_pad")){
- Transporter = find():wirelink()
- print("Found TSCM transporter")}
- if(findByClass("stargazer_energy_core")){
- Energy = find():wirelink()
- }
- if(findByClass("st_shield_emitter")){
- Shield = find():wirelink()
- print("Found TSCM shield")}
- if(findByClass("st_cloaking_device")){
- Cloak = find():wirelink()
- print("Found TSCM cloak")}
- if(findByClass("stargazer_water_core")){
- Water = find():wirelink()
- }
- Energy["Activate",normal] = 1
- Energy["Mute",normal] = 1
- }
- if(first()){print("Welcome to YCMDS V3, how may I help you?")
- print("(Type /help for commands)")
- }
- interval(100)
- runOnChat(1)
- if(chatClk(owner())){
- Command = owner():lastSaid():lower():explode(" ")
- FirstWord = Command:shiftString()
- SecondWord = Command:shiftString()
- ThirdWord = Command:shiftString()
- FourthWord = Command:shiftString()
- function vector getPos(Destination:string){
- if(Destination == "shak"){
- print(" Shakuras")
- return vec(-5123.916504, -5737.004395, 7781.928223)
- }
- else{
- if(Destination == "hii"){
- print(" Hiigara")
- return vec(8910.822266, 8233.191406, -4888.260742)
- }
- else{
- if(Destination == "earth"){
- print(" Earth")
- return vec(731.850891, 10365.407227, 8714.040039)
- }
- else{
- if(Destination == "desert"){
- print(" Desert")
- return vec(12717.458984, -10323.308594, -8486.469727)
- }
- else{
- if(Destination == "moon"){
- print(" Moon")
- return vec(-4550.467285, 13761.375000, 10484.055664)
- }
- else{
- if(Destination == "shakuras"){
- print(" Shakuras")
- return vec(-5123.916504, -5737.004395, 7781.928223)
- }
- else{
- if(Destination == "hiigara"){
- print(" Hiigara")
- return vec(8910.822266, 8233.191406, -4888.260742)
- }
- else{
- if(Destination == "station"){
- print(" Station")
- return vec(4950.279297, -6809.163086, 8897.023438)
- }
- else{
- if(Destination == "pegasus"){
- print(" the Pegasus System")
- return vec(766.279297, -9589.005859, 8849.352539)
- }
- else{
- if(Destination == "universe"){
- print(" the Universe System")
- return vec(7418.365723, -2342.522461, -10817.677734)
- }
- else{
- if(Destination == "milkyway"){
- print(" the Milkyway System")
- return vec(-11642.699219, 5558.858887, 8551.136719)
- }
- else{
- if(Destination == "build"){
- print(" Build")
- return vec(13353.520508, 13611.589844, -15462.566406)
- }
- else{
- if(Destination == "secret"){
- print(" Seeeeeeecret")
- return vec(-655.479736 -150.708206 -15430.270508)
- }
- else{
- if(Destination == "water"){
- print(" Water")
- return vec(-2.854739, 8135.880859, 8314.55273)
- }
- else{print("Not found")}
- NotFound = 1
- return entity():pos()
- }}}}}}}}}}}}}
- }
- if(FirstWord == "/w"){
- print("Warping to")
- Warpcore["Destination", vector] = getPos(SecondWord)
- Warpcore["Activate", normal] = 1
- timer("Delay",1000)
- if(clk("Delay")){Warpcore["Activate", normal] = 0}
- }
- #Warp#
- #Beam#
- if(FirstWord == "/beam"){
- if(SecondWord == "me"){Transporter["Target1", entity] = owner()}
- elseif(SecondWord == "that"){Transporter["Target1", entity] = owner():aimEntity()}
- else{Transporter["Target1", entity] = findPlayerByName(SecondWord)}
- if(ThirdWord == "up"){Beamtopads = 1
- print("Beaming to the pad")}}
- if(ThirdWord == "to"){
- print("Beaming to")
- if(findPlayerByName(FourthWord)){
- Transporter["TargetLocation", vector] = findPlayerByName(FourthWord):pos()
- print(findPlayerByName(FourthWord):name())
- Beamtovec = 1
- }
- else{
- Transporter["TargetLocation", vector] = getPos(FourthWord)
- Beamtovec = 1
- }
- }
- #Beam#
- #Shields and cloaking#
- if(FirstWord == "/shield"){
- if(ShieldOn == 1){
- ShieldOn = 0
- print("Lowering Shields")
- }
- else{
- CloakOn = 0
- ShieldOn = 1
- print("Raising Shields")
- }
- }
- if(FirstWord == "/cloak"){
- if(CloakOn == 1){
- CloakOn = 0
- print("Cloaking...")
- }
- else{
- ShieldOn = 0
- CloakOn = 1
- print("Decloaking...")
- }
- }
- #Shields and Cloaking#
- if(FirstWord == "/reset"){
- reset()
- }
- if(FirstWord == "/water"){
- Water["Spawn Collector",normal] = 1
- timer("Spawn Collector",100)
- }
- if(FirstWord == "/help"){
- print("Commands are:")
- print("Warp : /w")
- print("Beaming /beam (me/username) (up/to) (location)")
- print("Shields: /shield")
- print("Cloak: /cloak")
- print("Deploy water collector: /water")
- }
- #Ze final bracket#
- }
- #Ze final bracket#
- if(clk("Spawn Collector")){
- Water["Spawn Collector",normal] = 0
- if(findByClass("stargazer_water_core_collector")){
- Collector = find()
- Collector2 = Collector:wirelink()
- print("Found collector")
- Collector:setPos(getPos("water") - vec(0,0,350))
- timer("Activate Collector",100)
- }}
- if(clk("Activate Collector")){Collector2["Activate",normal] = 1}
Advertisement
Add Comment
Please, Sign In to add comment