Luapad - In-game scripting environment with syntax highlighting

**


This is an old release! The code can be messy or not as effective as it could be!

**

This is an in-game scripting environment with dynamically updating syntax highlighting for Lua. It basically means that if the server has WireMod installed, it also highlights the WireMod functions for you. Same goes with every mod you have installed (or the server). Please note, that if the server doesn’t have Luapad, you’ll only have cached server-side syntax highlighting, with only some basic serverside functions. However, this doesn’t affect the syntax highlighting of client-side functions.

This ‘script’ can be used to code in-game, save the code, load it later, and most importantly: run it client-, and serverside. You can upload code in order to run it on the server, but only if the server has Luapad, and you’re an admin. It currently only supports text-files inside the data-folder, because of your security. Maybe I’ll add the support of direct Lua-files later, with rawio (Optional feature in v1.10).

It probably has some bugs, so tell me about them and I’ll try to fix them. And yes, you can code an aimbot, or a wallhack in-game.

Type luapad to console in order to open it.

Credits go to the following persons:

Andreas “Syranide” Svensson for Wire Expression 2 Editor, which I heavily modified to work with Lua-syntax.
Narkaleptic for the VTF silk-icons used in this pack.

DarKSunrise (me) for scripting.
Levybreak for updating it (from v.1.11), as I didn’t have time for this project.

Media:
[img_thumb]http://img38.imageshack.us/img38/8199/736201.jpg[/img_thumb]

Known bugs:
No syntax-highlighting for multi-line comments (I’ll see if I can do these)
Lua-folder has files that are not really there, but instead in addons/AddonName/lua, and therefore making them unable to load (I’m open for suggestions here)

Planned features:
Sidebar remembering it’s position
Autocomplete for functions
Using GZip or something to compress cache-files for syntax highlighting
Customizable colors on syntax highlighting

Downloads:

SVN: http://lua-pad.googlecode.com/svn/trunk/ (thanks Levybreak)
garrysmod.org: http://www.garrysmod.org/downloads/?a=view&id=78065

YOU NEED GM_RAWIO MODULE IF YOU WANT TO EDIT LUA-FILES, IT’S NOT INCLUDED FOR SECURITY REASONS

Looks cool, you should have mentioned that the Original Editor was already made half a year ago and you just customized the Layout / Editor :wink:

Original one: http://lua-deloper-window.googlecode.com/svn/trunk

Nice.
I’m also suggesting to add a clientside module in order to write to any folder in /garrysmod so you can code on everything ingame.

Anyway, got my download :slight_smile:

huh blurred things WHAT ARE YOU HIDING

Hax! :V

€dit: you forgot to require(“datastream”) which makes the whole server-client stuff useless / unuseable :stuck_out_tongue:

This was already noticed, maybe an hour ago at the earliest.

Although I missed it when I first read the thread too.

I took the screenshot :v:

The first blurred out item is “clientcrash xd.txt”

second one looks like “modelbox.txt” or “nudebox.txt”

Corrrrrrrect.

that ape

Excellent, I’ve wanted something like this for a while. Definitely include rawio support so I can modify actual scripts.
Incidentally, there’s an error with your code in that screenshot. :v:

Honestly, I didn’t even know that there were one already. And I built this completely from scratch, except for the actual editor (which was made by Syanide for WireMod, and then heavily modified by me to work with Lua-syntax).

Ah, that was what I was missing, thanks. I’ll have it fixed in the next release.

Ah, yeah. That LocalPlayer() on the server-code was obviously a mistake. I’ll fix that too.

:ssh:

This will make HUD making 90 times easier, really cool.

Nice work DarKSunrise.

Wouldn’t that be a big security risk?

Or let me ask this question, do you have any ideas on how that could be implemented but not abused by other clientside scripts?

I’ve added a Rawio-support to the next version, but it’s fully optional and only works if you have it installed. This way you could use Rawio while coding safely in singleplayer.

So downloading right now, great job.

Nice Work, but if i Code sth. 640x480 Singleplayer winwowed and bind j gamemode_reload
nvm, Good work

New version has been released.

Changelog:
Fixed client-to-server uploading
Fixed typo in the sample code
Fixed not loading files with dots on the filename
Fixed something else
Added optional rawio-support ( you need to have the module installed in order to use )
Removed 990 useless silk-icons from the download

http://www.garrysmod.org/img/?t=dll&id=73746

Yes, it would. Of course. Limiting to /garrysmod and .lua files could decrease the possibility of adding shit outside of GMod but in fact it’s a security hole, yes.
It should ONLY be optional, but if installed available for people to use.

[editline]07:27PM[/editline]

Thank you!

[editline]07:39PM[/editline]

Could you make the sidebar remember the last opened folder? It’s annoying to scroll back to the last position everytime.