| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| zyrain screenshot https://mail.black-squirrel.com/viewtopic.php?f=15&t=30434 |
Page 1 of 1 |
| Author: | the reverend [ Tue Oct 12, 2010 1:02 pm ] |
| Post subject: | zyrain screenshot |
Attachment: zyrain.gif [ 36.03 KiB | Viewed 6049 times ] |
|
| Author: | Parrothead [ Tue Oct 12, 2010 9:00 pm ] |
| Post subject: | Re: zyrain screenshot |
a sysop helper? |
|
| Author: | the reverend [ Tue Oct 12, 2010 10:13 pm ] |
| Post subject: | Re: zyrain screenshot |
Parrothead wrote: a sysop helper? no. it's a twx-like helper. there are a bunch of sysop-like commands there but they're mainly for controlling who can connect to your proxy and who can't. black list is for people that should just get rejected without asking, white list is for people that are approved, and gray list is for people who tried to connect and are waiting to be put in the black or white list. other than that, it can run LUA scripts, support multiple connections to the proxy (like twx), and it keeps an extensive game database. i'm still working on basic stuff right now. the database part is working fine, but i'm not parsing as much as i'd like to be. the proxy itself is working great; just need to work out a few nuances. the script engine is what i'm working on now. i have a proof of concept working, but haven't rolled it into the proxy itself yet. i'm thinking we should have an alpha release ready around christmas. |
|
| Author: | Parrothead [ Fri Oct 15, 2010 2:44 pm ] |
| Post subject: | Re: zyrain screenshot |
Twx (Esc) key puts out the same code as cntrl + G on my machine. Is this normal? Escape and Data Link Escape are the same for telnet...or is me. |
|
| Author: | the reverend [ Sat Oct 16, 2010 11:11 pm ] |
| Post subject: | Re: zyrain screenshot |
update : lua scripts are working in zyrain. here is a sample script that i've been using to test: Code: z:createTrigger(1, "Type sub-space message") z:setTriggerReply(1, "hi") -- replies work whether or not the trigger is enabled --z:enableTrigger(1) z:createTrigger(2, "Sub-space comm-link terminated") z:enableTrigger(2) z:createTrigger(3, "(?=Help)? : Q") z:enableTrigger(3) repeat ans = z:waitForAnyTrigger(500) -- 500 ms timeout if ans == 1 then z:write("!yay") -- should never hit this because trigger 1 is not enabled elseif ans == 2 then z:send("/") elseif ans == 3 then break -- elseif ans == 0 then z:write("!!!timeout") -- elseif ans == -1 then z:write("!!!abort") elseif ans == -2 then z:write("!!!badindex") elseif ans == -3 then z:write("!!!nop") elseif ans == -4 then z:write("!!!fail") -- else z:write("!!!wtf") end until ans < 0 z:deleteTrigger(1) z:deleteTrigger(2) z:deleteTrigger(3) comments start with -- and the rest is pretty much self explanatory i think. oh - z:send() sends text to twgs and z:write sends text to your local client. this is just basic stuff. i'll be adding a lot more features over time. i'm just psyched that this is finally working. to be honest i never really hoped that i'd have scripts in this helper; i was going to just let people do all their scripting with twx, but lua makes embedding scripts in C/C++ code pretty accessible. i guess that's why blizzard uses it in WOW. |
|
| Author: | Parrothead [ Sun Oct 17, 2010 2:35 am ] |
| Post subject: | Re: zyrain screenshot |
Is there a web link for a full explanation of the code for LUA? |
|
| Author: | the reverend [ Sun Oct 17, 2010 7:29 am ] |
| Post subject: | Re: zyrain screenshot |
Parrothead wrote: Is there a web link for a full explanation of the code for LUA? lua is a standard scripting language that you can extend within your application. so i just added a few functions to it for zyrain and shazzam we're golden. check out lua here: http://www.lua.org/. |
|
| Author: | the reverend [ Sun Oct 17, 2010 8:38 pm ] |
| Post subject: | Re: zyrain screenshot |
here is a script to do an in-game ping: Code: timeout = 5000 z:createTrigger( 1, "S:" ) z:enableTrigger( 1 ) z:send( "'\r" ) z:waitForTrigger( 1, timeout ) z:deleteTrigger( 1 ) z:createTrigger( 2, "S: ping" ) z:enableTrigger( 2 ) count = 4 c = 0 min = timeout max = 0 t0 = z.tick z:send( "ping" ) t1 = t0 repeat ans = z:waitForTrigger( 2, timeout ) c = c + 1 t2 = z.tick delta = t2 - t1 min = math.min( min, delta ) max = math.max( max, delta ) t1 = t2 z:send( string.format( " : %d ms\rping", delta ) ) until ans < 1 or c >= count z:disableTrigger( 2 ) z:send( string.format( " : count=%d : min=%d : avg=%d : max=%d\r\r", c, min, ( t2 - t0 ) / c, max ) ) z:deleteTrigger( 2 ) Attachment: Untitled.gif [ 22 KiB | Viewed 5922 times ] |
|
| Author: | Stein [ Mon Oct 18, 2010 1:37 am ] |
| Post subject: | Re: zyrain screenshot |
Yes, LUA is a nice and simple script language. I plan on adding support for it in SWATH as an alternative way of writing SWATH scripts. Also works well for quick queries in the SWATH console. |
|
| Author: | Parrothead [ Mon Oct 18, 2010 2:38 am ] |
| Post subject: | Re: zyrain screenshot |
Anything cool in this helper? |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|