For all u LUA nut nuts

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
Paul_Don
Posts: 146
Joined: 2003-01-29 06:41
Location: uk
Contact:

For all u LUA nut nuts

Post by Paul_Don » 2003-04-18 21:16

i was wondering if anyoen would be sooo kind as to conver this standard vbs into lua :) these are part takin from a script that i run i wont post the whole thing as its bloody long and got other features in that i dont really need, from these parts u should generally get the idea

Code: Select all

case "addgarage"
           lPos = InStr(1, sData, "> ")
	    sFresh = Mid(sData, lPos + 12)

	    Set oDat = CreateObject("Scripting.FileSystemObject")
      		If Not(oDat.FileExists("Scripts\garage.txt")) Then
         		oDat.CreateTextFile "Scripts\garage.txt"
			Set sDatAdd = oDat.OpenTextFile("Scripts\garage.txt", add)
	    		sDatAdd.WriteLine CStr(" [uF] UK Garage ")
			sDatAdd.WriteLine
			sDatAdd.WriteLine CStr("[" & User.sName & "]   "  & sFresh) 
      		End If
      	    Set sDatAdd = oDat.OpenTextFile("Scripts\garage.txt", add)
	    sDatAdd.WriteLine CStr("   <" & date() & "> "+vbTab+" >  " & sFresh)
      	    sDatAdd.Close
from that any op can write say "addgarage MJ Cole - Crazy Love
then..............

Code: Select all

Case "+garage"
	    Set oDat = CreateObject("Scripting.FileSystemObject")
            Set sDatAdd = oDat.OpenTextFile("Scripts\garage.txt", read)    
           
          
            Do While sDatAdd.AtEndOfStream <> True                
                  sFresh = sFresh & vbNewLine & sDatAdd.ReadLine                     
            Loop
            sDatAdd.Close
	    SendPrivate User, sBotName, CStr(sFresh)
which will then call the txt file into a pm and which music that is added with the addgarage xxxxxxxxx will then be writtin into a list that is called from +garage
for example u would seee
  • <[uF]>

    [uF] UK Garage

    <4/10/2003> > Qualifide - Give it Up
    <4/10/2003> > Qualifide - My Living
    <4/10/2003> > Qualifide - Think
    <4/10/2003> > Robert Reives Ft Chaundria Brown - Always (Goldfinger Remix)
    <4/10/2003> > Robert Reives Ft Chaundria Brown - Always (Studio Gangsters Mix)
    <4/10/2003> > Storm - Mr Major Fool (On My Todd Remix)
i ask for this as i wanna switch to ptokax and i havent found any other scripts in lua like this as me and ade have bundled together aswelll as various peeeps from here what scripts i use for nmdc

Locked