User:=FF=im2good4u: Difference between revisions
m fixed spelling bugs in VarPrint() |
added ETProStuffPlug and DebugLib |
||
| Line 11: | Line 11: | ||
**''#=FF=Clan'' - [http://www.ffclan.net =FF=Clan] Clan channel on quakenet<br>[[irc://irc.quakenet.org:6667/=FF=Clan]] | **''#=FF=Clan'' - [http://www.ffclan.net =FF=Clan] Clan channel on quakenet<br>[[irc://irc.quakenet.org:6667/=FF=Clan]] | ||
</td></tr></table> | </td></tr></table> | ||
---- | |||
==ETPro/Lua libraries, modules and examples== | ==ETPro/Lua libraries, modules and examples== | ||
;Follow the link to the source code for more detailed information about each item. | ;Follow the link to the source code for more detailed information about each item. | ||
*[http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.lua ETProStuffPlug.lua] ''one lua mod to rules them all !''<br> | |||
http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.lua ETProStuffPlug] offers the following functions/command | |||
'''etprostuffplug''' - C/S - Shows some info about ETProStuffPlug<br> | |||
'''cheaterdump ''<player id>'' ''<file>'' - S - Will dump the IAC output code for ''<player id>'' to ''<file>''<br> | |||
'''dumpuserid''' ''<player id>'' - S - Will dump the userinfo of ''<player id>'' instead of using a playername<br> | |||
'''iplist''' - S/C* - Prints out players whit thier ip's (handy for semiadmins)<br> | |||
'''statuslist''' - S/C* - Prints a players his abilties like Referee* , Schoutcaster* , Semiadmin*#*<br> | |||
'''referee''' / '''unreferee''' ''<player id>'' - S - gives / removes referee status of ''<player id>''<br> | |||
'''shoutcast''' / '''unshoutcast''' ''<player id>'' - S - gives / removes shoutcast status of ''<player id>''<br> | |||
'''semiadmin''' / '''unsemiadmin''' ''<player id>'' ''level'' 'hidden' - S - gives / removes semiadmin status of ''<player id>'', the 'hidden' paramter is optionaly to make the login not broadcast the logged in message<br> | |||
'''semiadminenable''' / '''semiadmindisable''' - S - enables or diesables the client semiadmin,sa,semiadminlogin,sal commands<br> | |||
'''revereeenable''' / '''revereedisable''' - S - enables or diesables the client ref command<br> | |||
'''semiadminlogout''' / '''salo''' - C - will log u out of semiadmin (handy if u let someone else play ay your pc<br> | |||
'''semiadminlogin''' / '''sal''' ''<password>'' 'hidden'* - C - new optional parameter to login whitout the broadcast message | |||
the items marked whit a * can be turned on or off by the configfile | |||
[http://home.zonnet.nl/westhof99/lua/ETProStuffPlugConfig.cfg ETProStuffPlugConfig.cfg] | |||
to instal [http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.lua ETProStuffPlug.lua] simpely dl http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.zip ETProStuffPlug.zip] and unzip it in your /[[etpro]]/ directory.<br> | |||
Then add [http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.lua ETProStuffPlug.lua] to your lua_modules "" cvar<br> | |||
also u might first wana config your [http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.lua ETProStuffPlug.lua] by editing your [http://home.zonnet.nl/westhof99/lua/ETProStuffPlugConfig.cfg ETProStuffPlugConfig.cfg] | |||
NOTICE! [http://home.zonnet.nl/westhof99/lua/DebugLibDisabled.lua DebugLibDisabled.lua] is required | |||
NOTICE! ... is required | |||
*[http://home.zonnet.nl/westhof99/lua/VarPrint.lua VarPrint.lua] A simple function that converts varialbes into strings so u can even print nils,booleans,functions and tables whitout getting an error | *[http://home.zonnet.nl/westhof99/lua/VarPrint.lua VarPrint.lua] A simple function that converts varialbes into strings so u can even print nils,booleans,functions and tables whitout getting an error | ||
''useage:'' '''string''' = VarPrint( '''(variable)''' ) | ''useage:'' '''string''' = VarPrint( '''(variable)''' ) | ||
*[http://home.zonnet.nl/westhof99/lua/DebugLib.lua DebugLib.lua] A lua library that provides a special debug | ---- | ||
*[http://home.zonnet.nl/westhof99/lua/DebugLib.lua DebugLib.lua] A lua library that provides a special a debug print function. that can automagicly print the function - sub function - executing time - a message - and any variable u want (so even tables , functions , nils or true / false. | |||
to implent http://home.zonnet.nl/westhof99/lua/DebugLib.lua DebugLib.lua] use '''require('DebugLib')''' | |||
then at the start of function do<br> | |||
Debug.SetFunction( '''fuctionname'''', '''true/false''', '''timeroffset''')<br> | |||
'''functionname''' is a string that will show up in the ''debug.Print'' this does not affect '''subfunctionname'''<br> | |||
'''true/false''' will start the timer or leave it at 0 ''this paremeter can de ignored''<br> | |||
'''timeroffset''' this is the offset at witch the timer willstart ''this paremeter can de ignored''<br> | |||
now when u enter special section if your code u can use<br> | |||
Debug.SetSubFunction( '''subfuctionname''' )<br> | |||
'''subfunctionname''' is a string that will show up in the ''debug.Print'' this diesnt affect '''functionname'''<br> | |||
now when u wana print debugging info u would use<br> | |||
Debug.Print( '''message''' , '''vars...''' )<br> | |||
'''message''' is a string that can be anything u want | |||
'''vars''' are a list of variables seperated by a , ''they can be of any type whitout giving an error'' | |||
''Debug.Print()'' also print the time in ms (if timwer was started) | |||
other Debug.funcions / variables | |||
Debug.TimerStart( '''timeroffset''' )<br> | |||
this works like true,'''timeroffset''' in ''Debug.SetFunction()''<br> | |||
it stats the timer whit an starting offset of '''timeroffset''' | |||
Debug.TimerGet()<br> | |||
this will print out the timer aswel as the ''other stuff'' as decribed in ''Debug.Print()'' | |||
Debug.Starttime = <br> | |||
the gametime in ms at witch the timer was started | |||
Debug.Function = <br> | |||
the '''functionname''' as set by ''Debug.SetFunction'' | |||
Debug.SubFunction = <br> | |||
the '''subfunctionname''' as set by ''Debug.SetSubFunction'' | |||
Debug.Version = <br> | |||
the version of [http://home.zonnet.nl/westhof99/lua/DebugLib.lua DebugLib.lua] | |||
[http://home.zonnet.nl/westhof99/lua/DebugLib.lua DebugLib] has the abilety to simpely disable all debug by including [http://home.zonnet.nl/westhof99/lua/DebugLibDisabled.lua DebugLibDisabled.lua]. this has the same function only they dont do anything | |||
---- | |||
[[Category:ETPro:Mods]] | [[Category:ETPro:Mods]] | ||
Revision as of 00:34, 18 November 2005
| http://news.bbc.co.uk/olmedia/1750000/images/_1752807_wolfen-activi150.jpg |
Contact |
ETPro/Lua libraries, modules and examples
- Follow the link to the source code for more detailed information about each item.
- ETProStuffPlug.lua one lua mod to rules them all !
http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.lua ETProStuffPlug] offers the following functions/command
etprostuffplug - C/S - Shows some info about ETProStuffPlug
cheaterdump <player id> <file> - S - Will dump the IAC output code for <player id> to <file>
dumpuserid <player id> - S - Will dump the userinfo of <player id> instead of using a playername
iplist - S/C* - Prints out players whit thier ip's (handy for semiadmins)
statuslist - S/C* - Prints a players his abilties like Referee* , Schoutcaster* , Semiadmin*#*
referee / unreferee <player id> - S - gives / removes referee status of <player id>
shoutcast / unshoutcast <player id> - S - gives / removes shoutcast status of <player id>
semiadmin / unsemiadmin <player id> level 'hidden' - S - gives / removes semiadmin status of <player id>, the 'hidden' paramter is optionaly to make the login not broadcast the logged in message
semiadminenable / semiadmindisable - S - enables or diesables the client semiadmin,sa,semiadminlogin,sal commands
revereeenable / revereedisable - S - enables or diesables the client ref command
semiadminlogout / salo - C - will log u out of semiadmin (handy if u let someone else play ay your pc
semiadminlogin / sal <password> 'hidden'* - C - new optional parameter to login whitout the broadcast message
the items marked whit a * can be turned on or off by the configfile ETProStuffPlugConfig.cfg
to instal ETProStuffPlug.lua simpely dl http://home.zonnet.nl/westhof99/lua/ETProStuffPlug.zip ETProStuffPlug.zip] and unzip it in your /etpro/ directory.
Then add ETProStuffPlug.lua to your lua_modules "" cvar
also u might first wana config your ETProStuffPlug.lua by editing your ETProStuffPlugConfig.cfg
NOTICE! DebugLibDisabled.lua is required NOTICE! ... is required
- VarPrint.lua A simple function that converts varialbes into strings so u can even print nils,booleans,functions and tables whitout getting an error
useage: string = VarPrint( (variable) )
- DebugLib.lua A lua library that provides a special a debug print function. that can automagicly print the function - sub function - executing time - a message - and any variable u want (so even tables , functions , nils or true / false.
to implent http://home.zonnet.nl/westhof99/lua/DebugLib.lua DebugLib.lua] use require('DebugLib')
then at the start of function do
Debug.SetFunction( fuctionname', true/false, timeroffset)
functionname is a string that will show up in the debug.Print this does not affect subfunctionname
true/false will start the timer or leave it at 0 this paremeter can de ignored
timeroffset this is the offset at witch the timer willstart this paremeter can de ignored
now when u enter special section if your code u can use
Debug.SetSubFunction( subfuctionname )
subfunctionname is a string that will show up in the debug.Print this diesnt affect functionname
now when u wana print debugging info u would use
Debug.Print( message , vars... )
message is a string that can be anything u want
vars are a list of variables seperated by a , they can be of any type whitout giving an error
Debug.Print() also print the time in ms (if timwer was started)
other Debug.funcions / variables
Debug.TimerStart( timeroffset )
this works like true,timeroffset in Debug.SetFunction()
it stats the timer whit an starting offset of timeroffset
Debug.TimerGet()
this will print out the timer aswel as the other stuff as decribed in Debug.Print()
Debug.Starttime =
the gametime in ms at witch the timer was started
Debug.Function =
the functionname as set by Debug.SetFunction
Debug.SubFunction =
the subfunctionname as set by Debug.SetSubFunction
Debug.Version =
the version of DebugLib.lua
DebugLib has the abilety to simpely disable all debug by including DebugLibDisabled.lua. this has the same function only they dont do anything