Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
charlesthepenguin

Aunis Stargate Dialing program and destinations

Recommended Posts

Iv thrown together what i would call an enchanced version of Kevlaris Control System

2 programs, the message program and the dialing program.

These 2 programs can dial a number of gates that you can add yourself, or if you want to dial manually and type in your adress to the computer.

Both programs can be run on the same rack (but on different servers, just make sure the dialing program can receive messages from the message program). With just a monitor attached for the message program, preferrably near your stargate.

 

Message program

message.thumb.png.78039ca884a3d495fcecf43e0b1c0970.png

(yes im aware i misspelled nether)

Pretty simple. Sends a command to the dialing program depending on what you wanna do.

1. If you wanna add more destinations just copy and paste the highlighted code under itself. Like this

    if num == "1" then
        print("Dialing Spawn.")
        modem.broadcast(port, "dial1")
        print("Address sent to gate computer.")
  os.sleep(5)

    elseif num == "2" then
        print("Dialing Nether.")
        modem.broadcast(port, "dial2")
        print("Address sent to gate computer.")
  os.sleep(5)

2. Change the "if num == "2" then" to a number of your choosing. (as you can see in the image, 1,2,3,4 are currently being used, so in this case im gonna type 5, but it can be any number you want.)

    elseif num == "5" then
        print("Dialing Nether.")
        modem.broadcast(port, "dial2")
        print("Address sent to gate computer.")
  os.sleep(5)

3. Edit the "print("Dialing Nether.")" to whatever you want it to say.

    elseif num == "5" then
        print("Dialing Beach.")
        modem.broadcast(port, "dial2")
        print("Address sent to gate computer.")
  os.sleep(5)

4. Edit the "modem.broadcast(port, "dial2")" to something you will remember, you will need it later when we edit the dialing program.

   elseif num == "5" then
        print("Dialing Nether.")
        modem.broadcast(port, "dial3")
        print("Address sent to gate computer.")
  os.sleep(5)

5. Now go to the very bottom of the program and find "elseif num ~= "1" or num ~= "2" or num ~= "3" or num ~= "4" then". You will need to add whatever number you typed in step 2.

elseif num ~= "1" or num ~= "2" or num ~= "3" or num ~= "4" or num ~= "5" then

And we are done with the message program! Now on to the dialing program!

 

Dialing program

dialing.thumb.png.45a1319d6746c0fb5bc04535e5b7c0ec.png

 

The computer/server running this program needs to be connected to the stargate before startup. Otherwise the program crashes.

Also pretty simple, receiving message from the message computer and then do what you wanna do.

 

You need to change your adress to the one you have ingame. To do that and to even add a whole new adress please follow this step by step tutorial.

The dialing program is where you can get lost in code, just follow step by step and you will be fine.

1. Same as in the message program, copy and paste the following code under itself. This code is long, prepare to scroll...

 

    elseif raw == "dial1" then
        print()
        address = {"Sextans", "Corona Australis", "Andromeda", "Perseus", "Leo", "Aries", "Point of Origin"}
        os.sleep(0.5)
        print("Dialing")
        for i,v in ipairs(address) do print(i,v) end
        print()

        function dialNext(dialed)
            glyph = address[dialed + 1]
            print("Engaging "..glyph.."... ")

            sg.engageSymbol(glyph)
        end

        eventID = event.listen("stargate_spin_chevron_engaged", function(evname, address, caller, num, lock, glyph)    
            os.sleep(2)
        
            if lock then
                if (event.cancel(eventID)) then
                    print("Event cancelled successfully")
                end
        
                os.sleep(2)
        
                print("Engaging...")
                sg.engageGate()
                doing = false
                os.sleep(5) print("30")
                os.sleep(1) print("29")
                os.sleep(1) print("28")
                os.sleep(1) print("27")
                os.sleep(1) print("26")
                os.sleep(1) print("25")
                os.sleep(1) print("24")
                os.sleep(1) print("23")
                os.sleep(1) print("22")
                os.sleep(1) print("21")
                os.sleep(1) print("20")
                os.sleep(1) print("19")
                os.sleep(1) print("18")
                os.sleep(1) print("17")
                os.sleep(1) print("16")
                os.sleep(1) print("15")
                os.sleep(1) print("14")
                os.sleep(1) print("13")
                os.sleep(1) print("12")
                os.sleep(1) print("11")
                os.sleep(1) print("10")
                os.sleep(1) print("9")
                os.sleep(1) print("8")
                os.sleep(1) print("7")
                os.sleep(1) print("6")
                os.sleep(1) print("5")
                os.sleep(1) print("4")
                os.sleep(1) print("3")
                os.sleep(1) print("2")
                os.sleep(1) print("1")
                os.sleep(1) print("Stargate Shutdown")
                sg.disengageGate()
                os.sleep(1)
            else
                dialNext(num)
            end
        end)

        dialNext(0)
        doing = true
        print()
        while doing do os.sleep(0.1) end

-------------------------------------------------------------------------------------------------------------------------------------------------------------

    elseif raw == "dial1" then
        print()
        address = {"Sextans", "Corona Australis", "Andromeda", "Perseus", "Leo", "Aries", "Point of Origin"}
        os.sleep(0.5)
        print("Dialing")
        for i,v in ipairs(address) do print(i,v) end
        print()

        function dialNext(dialed)
            glyph = address[dialed + 1]
            print("Engaging "..glyph.."... ")

            sg.engageSymbol(glyph)
        end

        eventID = event.listen("stargate_spin_chevron_engaged", function(evname, address, caller, num, lock, glyph)    
            os.sleep(2)
        
            if lock then
                if (event.cancel(eventID)) then
                    print("Event cancelled successfully")
                end
        
                os.sleep(2)
        
                print("Engaging...")
                sg.engageGate()
                doing = false
                os.sleep(5) print("30")
                os.sleep(1) print("29")
                os.sleep(1) print("28")
                os.sleep(1) print("27")
                os.sleep(1) print("26")
                os.sleep(1) print("25")
                os.sleep(1) print("24")
                os.sleep(1) print("23")
                os.sleep(1) print("22")
                os.sleep(1) print("21")
                os.sleep(1) print("20")
                os.sleep(1) print("19")
                os.sleep(1) print("18")
                os.sleep(1) print("17")
                os.sleep(1) print("16")
                os.sleep(1) print("15")
                os.sleep(1) print("14")
                os.sleep(1) print("13")
                os.sleep(1) print("12")
                os.sleep(1) print("11")
                os.sleep(1) print("10")
                os.sleep(1) print("9")
                os.sleep(1) print("8")
                os.sleep(1) print("7")
                os.sleep(1) print("6")
                os.sleep(1) print("5")
                os.sleep(1) print("4")
                os.sleep(1) print("3")
                os.sleep(1) print("2")
                os.sleep(1) print("1")
                os.sleep(1) print("Stargate Shutdown")
                sg.disengageGate()
                os.sleep(1)
            else
                dialNext(num)
            end
        end)

        dialNext(0)
        doing = true
        print()
        while doing do os.sleep(0.1) end

2. Edit the elseif raw == "dial2" then to the message we remembered from the message program. (or dont, depending if you just want to change your adress)

elseif raw == "dial3" then

3. Edit your adress, the adress is your stargate adress. Just type it in word by word the exact adress you have ingame. 

address = {"Sextans", "Corona Australis", "Andromeda", "Perseus", "Leo", "Aries", "Point of Origin"}   ------> address = {"Crater", "Monoceros", "Scorpius", "Serpens Caput", "Aries", "Leo", "Point of Origin"}

If you wanna type a 8 or 9 chevron adress, just add in the last word/words. 

address = {"Crater", "Monoceros", "Scorpius", "Serpens Caput", "Aries", "Leo", "Perseus", "Point of Origin"}

4And we are done!

Enjoy!

 

Pastebin for message program.

Pastebin for dialing program.

They are also attached to this post.

 

 

 

startdialing.lua startmessage.lua

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.