PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Danutz on 11 November, 2005, 21:01:44

Title: pls help
Post by: Danutz on 11 November, 2005, 21:01:44
-- Editable Settings --

-- 1=on / 0=off
SendTo = {
[user.iProfile]==1) then
      GetRightClickComs(user)
      user:SendData("Hehehe!")
   end
end

function NewUserConnected(user)
      customCMDs(user)
   if (SendTo[user.iProfile]==1) then
      GetRightClickComs(user)
      user:SendData("Hehehe!")
   end
end

function GetRightClickComs(user)
   TCopy={}
   for cmd,_ in LevelCheck do
   if LevelCheck[cmd][user.iProfile] == 1 then
   for value,command in RightClick do
   if cmd == value then
   tinsert(TCopy,{value,command})
   end end end end

   sort(TCopy,function(a,b) return (a[1] < b[1]) end)
   for t = 1, getn(TCopy) do
   if TCopy[t] then user:SendData(TCopy[t][2])
   end end TCopy={} collectgarbage() flush()
end

function customCMDs(user)    
user:SendData("$UserCommand 1 3 \comenzi email\\inbox$<%[mynick]> !inbox %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi email\\citeste mesaj$<%[mynick]> !readmsg %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi email\\sterge mesaj$<%[mynick]> !delmsg %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi email\\trimite mesaj$<%[mynick]> !postmsg %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi trivia\\Intra in joc$<%[mynick]> joc %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi trivia\\Indiciu$<%[mynick]> indiciu %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi trivia\\Intrebarea curenta$<%[mynick]> curent %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi trivia\\Top 20$<%[mynick]> top20 %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi trivia\\Punctele tale$<%[mynick]> puncte %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi trivia\\Paraseste jocul$<%[mynick]> nujoc %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi zile de nastere\\Lista cu userii inscrisi$<%[mynick]> !birthdays %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi zile de nastere\\Adauga ziua ta$<%[mynick]> !mybirthday %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi zile de nastere\\Varsta ta exacta$<%[mynick]> !myage %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi zile de nastere\\Cine este nascut odata cu tine$<%[mynick]> !bornon %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi diverse\\Regulile hubului$<%[mynick]> !reguli %[nick]||")
user:SendData("$UserCommand 1 3 \comenzi diverse\\Noutatzile hubului$<%[mynick]> !news %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi diverse\\Programul hubului$<%[mynick]> !program %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi diverse\\Links$<%[mynick]> !links %[nick]||")   
user:SendData("$UserCommand 1 3 \comenzi diverse\\Bancul zilei$<%[mynick]> !banc %[nick]||")   

end







can any 1 tell me why i'm getiing this error:
Syntax Error: `for' table must be a table  
???????? :(
Title: winamp script ? is this posible ?
Post by: Danutz on 12 November, 2005, 00:40:15
Does any 1 has a script that shows you what you are listening on winamp ? i mean when a user is tiping "/winamp" or "/w", just like in rmDC++, a message in main will be send showing what that user is listening in winamp! pls help me....... :D
Title:
Post by: DJ Bert on 12 November, 2005, 00:48:48
Quote
Originally posted by Danutz
Does any 1 has a script that shows you what you are listening on winamp ? i mean when a user is tiping "/winamp" or "/w", just like in rmDC++, a message in main will be send showing what that user is listening in winamp! pls help me....... :D

Search the forum, there is a script around here.

Your fist question, i don't see a table. Maybe i'm dump, but is that all you have about that script?
Title:
Post by: Danutz on 12 November, 2005, 01:06:50
so where in the forum can i get that script DJ Bert ? can you just copy here the script :)))) ......thanks for help
Title:
Post by: Danutz on 12 November, 2005, 01:15:08
That script where you have to run Clever and bla bla doesn't work!
Title:
Post by: DJ Bert on 12 November, 2005, 18:31:35
You right Mutor, best option is to use clients like DCDM, RMDC etc. They have all support to write in main the song you playing in winamp


Grtzzz

DJ Bert
Title:
Post by: Danutz on 12 November, 2005, 20:48:21
k....thanks for help  :D