neat. how about nailers though?
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:
New features from as:Originally Posted by BlackNecro
- 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.
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
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.
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.
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.
That's cool, makes me wanna learn Lua :P
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ífið læðist lúmskt áfram
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().
Bookmarks