ULX

Author Topic: Script Manager - Easy opening of scripts and SWEPS  (Read 9415 times)

0 Members and 1 Guest are viewing this topic.

Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Script Manager - Easy opening of scripts and SWEPS
« on: June 14, 2006, 03:21:09 PM »
Simply something I made out of lazyness, I got tired of having to type out
lua _PlayerGiveSWEP(1,"rocketlauncher.lua") and lua_openscript emine.lua
It also eliminates the need to figure out whos playerid is whos.
So, I simplified it.

This script makes it so that if you want to give player bob: "Weapons/Golden-Death/p90.lua", you type in chat:

!gun bob golden-death/p90

Or, if you want to give a player bob: "pushstick.lua" (Not in weapons directory), type

!gun bob pushstick

Alternatively, ulx_gun in console.

For opening scripts, if I wanted to open script "emine.lua" I type

!script emine

and it'l open up that script. (Alternatively ulx_sopen in console) Enjoy!

http://ulyssesmod.net/gd/sm.html



Don't include quotes, .lua, or weapons/ when giving a weapon, it is not needed



Version 2 Changes
You can now give guns to teams, using !gun TEAM weapon
Teams are:
teamspectator
teamunassigned
teamred
teamblue
teamgreen
teamyellow

An example would be
!gun teamred pushstick

You can now see what options are available by using ulx_list.
This will list all the files in lua/ and lua/weapons.
You can also give it a directory, like so:
ulx_list weapons/BobsSweps
and it will list all the files in there.
You can also add directorys that are protected from listing in the top of the file. The init folder is protected by default.

To see examples, look at my post below!
« Last Edit: December 18, 2006, 06:58:34 PM by Golden-Death »


Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #1 on: June 14, 2006, 04:22:03 PM »
How about add an all players or team feature? Also, instead of having people specify directory, you could just use a recursive directory search.

Good work! You lazy bum.
Experiencing God's grace one day at a time.

Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #2 on: June 14, 2006, 04:51:47 PM »
Good thing I have no idea how to do the second one!
Fixed it from obeying immunity


Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #3 on: June 17, 2006, 01:51:47 PM »
Examples of ulx_list:
Code: [Select]

] ulx_list
------------------------
No specific directory was entered. Showing defaults. To check a specific directory, enter it after ulx_list.
EX ulx_list weapo


Lua files in lua/
Be aware that not all these are necissarily weapon files

1.lua
a.lua
a2.lua
a3.lua
ab.lua
access.lua
am2.lua
arm.lua
automine.lua
blade.lua
bombmode.lua
bombwep.lua
carpetbomb.lua
drawer.lua
emine.lua
epi.lua
eSWEPmenu.lua
findtexture.lua
fireex.lua
fly.lua
gd.lua
gdmods.lua
gdtmp.lua
gf.lua
help.lua
hh.lua
hismine.lua
ig.lua
is.lua
jetpack.lua
label.lua
mine.lua
minegun.lua
minetest.lua
minetest2.lua
modelmanip.lua
modspawn.lua
morttest.lua
mrl.lua
noclip.lua
orbit.lua
orbitalcannon.lua
pt.lua
push.lua
r.lua
Radar.lua
ray.lua
resp.lua
restartlua.lua
rewind.lua
rollerheal.lua
rollerhurt.lua
rollerpilot.lua
sam.lua
sg.lua
ship.lua
smokegrenade.lua
SpamGunFiles.lua
spawndoll.lua
stun.lua
table.lua
tehmortar.lua
teslanade.lua
test.lua
testw.lua
ulx_fun.lua
vmfloader.lua
weapon_implosiongrenade.lua
weapon_soundgun.lua
wepadmin.lua
wepadminlist.lua


Lua files in lua/weapons
Be aware that not all these are necissarily weapon files

weapons/base.lua
weapons/ca.lua
weapons/checkadmin.lua
weapons/gd_kbgun.lua
weapons/gunadmins.lua
weapons/weapon_physgun_le.lua
weapons/weapon_tornado.lua

End List
Script and Weapon Manager by Golden-Death
------------------------
] ulx_list weapons
------------------------


Lua files in weapons
Be aware that not all these are necissarily weapon files

weapons/base.lua
weapons/ca.lua
weapons/checkadmin.lua
weapons/gd_kbgun.lua
weapons/gunadmins.lua
weapons/weapon_physgun_le.lua
weapons/weapon_tornado.lua

End List
Script and Weapon Manager by Golden-Death
------------------------
] ulx_list init
------------------------
You are not permitted to search the init folder.
------------------------


Offline Bob

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #4 on: June 17, 2006, 03:33:11 PM »
...
bob

Offline Griff

  • Newbie
  • *
  • Posts: 40
  • Karma: 3
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #5 on: June 22, 2006, 06:09:45 AM »
lmao! i say a ulx_kill bob command would be cool, bye bye bob :)

Offline Silver

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #6 on: August 02, 2006, 04:01:50 PM »
This simplifies things ALOT! This is a great help. Even though I already have a swep menu, this is good for quick and easy SwEp gathering!!  ::)

Offline JINX

  • Newbie
  • *
  • Posts: 11
  • Karma: -2
Re: Script Manager - Easy opening of scripts and SWEPS
« Reply #7 on: August 04, 2006, 12:19:56 PM »
now i can bomb those hippies with headcrab canisters!! even faster!! YAYmore killen