Closed Thread
Page 1 of 8 123 ... LastLast
Results 1 to 10 of 74

Thread: MoonGate: New Version

  1. #1
    Wire Noob geniusz's Avatar
    Join Date
    Mar 2009
    Posts
    3

    Default MoonGate: New Version

    New MoonGate Chip

    We develop a new version of MoonGate.

    Original Version - BlackNecro
    This Release - kna_rus(He is my team)

    ChangeLog,WhatToDo and another items about MoonGate your can find on 2xAS ?€“ Russia Brainiac Blog(All in english!)

    Some info about MoonGate:
    Quote Originally Posted by BlackNecro
    I: What is the MoonGate?
    Well it's basically a wire chip that allows you to enter a lua script and it then executes the script like the expression gate or the cpu does.
    ( Incase you're interested why I called it MoonGate - lua/moon - lua chip - moon chip - moon gate - wordplay hah :S )

    II: Why should I use the MoonGate instead of the Expression Gate/CPU
    There are several reasons - It's syntax is way easier than zASM (maybe easier than expression gate for some but that depends on further scripting experience et cetera)
    and more powerful than CPU and Expression gate

    III: So if it's more powerful - what features does it got?
    It supports Basic Arithmetics, Trigonometry, Vectors, Angles, Strings and Tables (and Color In/Outputs but you won't be needed THAT much ;P)
    Besides those functions it also comes with default lua features like if statements, loops, functions et cetera.

    IV: Wait - If you can input lua and it can do that much stuff can't some skilled user fuck with my server?
    No he can't - The moongate code is locked in to a function enviroment that has a limited global table. Basicly they're not going to be able to access anything other than what's provided
    New features from as:
    • Added GLON
    • Added AddCode(String) (Read docs for more info about this function)
    • Added include(String) (Now your can include you others MoonGate files)
    • Added util.TableToKeyValues and util.KeyValuesToTable
    • Added ARRAY DataType
    • Fixed tables exploits
    • Replaced first three lines with SetChipInfo().
    • Added function GetConstrainedEntities() (Return the table) ( If you're admin on server type wire_moongate_restricted 1 to enable)
    • Closed exploits with Entities(Now people can use Entities DataType only as Chip Entity or constrained entities )
    • Added EGate2/GPU Editor
    • Added syntax highlight
    • Removed symbol limit (Old MoonGate Editor had symbol limit - ~9000~ )
    • Fixed DataTypes
    • Makes new menu for Storage and File Upload

    Some screenshots:

    Editor


    New Upload and Storage Menu


    This is beta, so there can be ANY bugs. Report them here.

    We have permission from BlackNecro for the development Another Version of his MoonGate.


    Your can download latest version of this addon from SVN
    Code:
    http://subversion.assembla.com/svn/physgun/moongate

    WARNING: DO NOT UPLOAD TO GARRYSMOD.ORG OR ANYWHERE ELSE!
    Last edited by BlackNecro; 09-24-2009 at 05:50 PM.

  2. #2
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: MoonGate: New Version

    neat. how about nailers though?
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    Lífið læðist lúmskt áfram

  3. #3
    kna
    kna is offline
    Wire Amateur kna's Avatar
    Join Date
    Jan 2008
    Posts
    30

    Default Re: MoonGate: New Version

    What do you mean?
    MoonGate can't create constraints.
    MoonGate really can get not your entity if it is nailed, but that is bug of propprotection/nailer. Grabber is fixed, why not do the same with nailer?

    How to use SetChipInfo(name, inputs, outputs):
    First argument is name of chip, it can be anything you want.
    SetChipInfo("Lol, it is moongate!") will set name of chip to that string.

    Second argument is inputs. Third argument is outputs. They can be table of strings (not tested) or one string. Inputs/outputs are separated by ' ' ',' '|' or '!'. You can specify type of input or output by adding one of suffixes to input/output name.

    Suffix - DataType:
    :V - Vector
    :S - String
    :T - Table
    :R - Array (E2 support, array and table are the same in lua)
    :C - Color
    :E - Entity - admin-only
    :N - Normal - Note this is optional

    SetChipInfo(nil,"Table:T Pos:V Teleport",{"done", "stringpos:S"}) will leave name of gate as it was before calling function, create 3 inputs: Table of type TABLE, Pos of type VECTOR and Teleport of type NORMAL (number), and 2 outputs. Note lowercase names, this is also possible in Lua.


    Notes on syntax highlighting: if something is colored as function, it does not mean that that function exists in moongate environment, and vice versa.


    List of Usable Libraries, Global Functions and Custom Functions:
    math
    string
    table
    glon
    constraint *
    ents *
    file *
    filex *
    game *
    gmod *
    player *
    sql *
    team *
    util **
    Global Functions:
    Angle
    Color
    CurTime
    LerpAngle
    LerpVector
    Matrix
    Vector
    tonumber
    tostring
    type
    EffectData *
    ValidEntity *

    * Only usable if you're an admin on the server.
    ** Only some parts of library.

    Custom Functions:

    GetAng( entindex number )
    Returns an Angle of the entity with the given entindex or if entindex is nil own Angle

    GetAngVel( entindex number )
    Returns a Vector of the anglevelocity of the entity with the given entindex or if
    entindex is nil own Angle

    GetColor( entindex number )
    Returns a Color table of the entity with the given entindex or if entindex is nil own
    Angle

    GetPos( entindex number )
    Returns a Vector the position of the entity with the given entindex or if entindex is
    nil own Angle

    GetVel( entindex number )
    Returns a Vector of the entity with the given entindex or if entindex is nil own Angle

    LocalToWorld(entindex number, position Vector)
    Returns a Vector of the world position of the local input Vector to ent of given
    entindex (assumes self if entindex is nil)

    WorldToLocal(entindex number, position Vector)
    Returns a Vector of the local position to ent of given entindex of input world Vector
    (assumes self if entindex is nil)

    print( Data, ... )
    Customized print function that prints at the owner's console.


    InputTriggered( Input string )
    Returns Boolean/String
    Returns true if Input was triggered between current call and last call.
    If Input is nil it will return the last triggered input.
    If Input is true it will return the last triggered input and reset last triggered input.
    If no Input was triggered yet or last triggered input was reset it returns nil.

    TriggerOutput( Output string, value )
    Returns Boolean
    Triggers the output before the end of a function call returns true on success false on
    failure (caused for example by wrong output name)

    GetGlobal( Name )
    Returns Variable Datatype
    Returns a variable shared between all MoonGates of the same Owner

    SetGlobal( Name, Value )
    Sets a variable shared between all MoonGates of the same Owner

    GetMemory( Address number )
    Hi-speed support:
    Get memory value at given address
    Address < 65536 will access it's own memory
    Address > 65536 will access external memory

    SetMemory( Address number, Value number )
    Hi-speed support:
    Sets memory at given address to value
    Address < 65536 will access it's own memory
    Address > 65536 will access external memory

    NextThink( Delay number )
    The script will be called again in the amount of seconds you provide.
    This allows you to create fully automated scripts that require no inputs to be triggered.

    TriggerOnInput( Enabled boolean )
    If this is set to false the script won't get called by input changes.
    Use this if you want your script only to be called by NextThink

    TriggerOnInput( Enabled boolean )
    If this is set to false the script won't get called by input changes.
    Use this if you want your script only to be called by NextThink

    GetConstrainedEntities( )
    Returns table of entities constrained to chip. Table is filtered so you can get only your non-wire entities with type "Entity" (no vehicles/weapons/players). Returns nil if disabled.

    AddCode( Code string )
    Returns function with code, similar to RunString() in gmod lua. Returns nil or false on error.

    include( File string )
    Returns function with code taken from file. File is located in moongate server directory, so you need to upload it first. Specify name without "moongate/" and ".txt". Prints message to console on error.

    SetChipInfo() - look above

    Documentation of libraries and functions can be found at gmod wiki in Lua section.
    Last edited by kna; 07-23-2009 at 07:05 AM.

  4. #4
    billywitchdoctor.com Schilcote's Avatar
    Join Date
    Jan 2009
    Location
    There.
    Posts
    2,006

    Default Re: MoonGate: New Version

    Maybe we can just leave the nailer as it is. I haven't gotten minged with it, and it dosn't seem to be easy enough to use for a minge to use it anyway.

  5. #5
    Wirererer adadr's Avatar
    Join Date
    Jan 2009
    Location
    South Dakota, USA
    Posts
    303
    Blog Entries
    3

    Default Re: MoonGate: New Version

    awesome! ive been practicing some lua codes lately, but since im not that good at it i cant make much, only some sweps. this would be a perfect way for me to do lua syntax a little.

  6. #6
    Wirererer warrior08's Avatar
    Join Date
    Feb 2009
    Posts
    218

    Default Re: MoonGate: New Version

    Awesome! Good job

  7. #7
    Banned Nicolai1's Avatar
    Join Date
    Nov 2008
    Location
    Denmark.
    Posts
    1,251

    Default Re: MoonGate: New Version

    That's cool, makes me wanna learn Lua :P

  8. #8
    Wire Noob geniusz's Avatar
    Join Date
    Mar 2009
    Posts
    3

    Default Re: MoonGate: New Version

    Quote Originally Posted by Schilcote View Post
    Maybe we can just leave the nailer as it is. I haven't gotten minged with it, and it dosn't seem to be easy enough to use for a minge to use it anyway.
    No Way (Only if developer of nailer fix it)
    (Your not have this bug, if your use UPS(U Prop Share), it's a module from ULX)

  9. #9
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: MoonGate: New Version

    ok let me rephrase:
    what about nails?

    you're doing owner checks in addition to constraint checks?
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    L&#237;fi&#240; l&#230;&#240;ist l&#250;mskt &#225;fram

  10. #10
    kna
    kna is offline
    Wire Amateur kna's Avatar
    Join Date
    Jan 2008
    Posts
    30

    Default Re: MoonGate: New Version

    There are no owner checks. If entity is constrained, you can do anything with it.
    In last versions you can use only non-wire normal entities. No vehicles/players/weapons.
    And you can access ANY of entity functions. This is potentially dangerous, so it is restricted to non wire normal entities. You can't do Vehicle:GetDriver():SetUserGroup("admin") or similar.
    Maybe I'll add ConVar to enable/disable GetConstrainedEntities().

Closed Thread
Page 1 of 8 123 ... LastLast

Similar Threads

  1. Moongate Documentation
    By BlackNecro in forum Wiremod Addons & Coding
    Replies: 24
    Last Post: 04-22-2009, 01:32 AM
  2. I need the latest version.
    By Electroclan in forum Installation and Malfunctions Support
    Replies: 6
    Last Post: 11-20-2008, 07:22 AM
  3. nil version
    By Ergzay in forum Bug Reports
    Replies: 2
    Last Post: 06-09-2008, 08:26 AM
  4. version
    By zeroth in forum Installation and Malfunctions Support
    Replies: 7
    Last Post: 06-04-2007, 05:25 PM
  5. version
    By zeroth in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 06-04-2007, 03:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots