!tday <artist> <song> - Sends a PM to everyone at the hub is it possib
 

!tday - Sends a PM to everyone at the hub is it possib

Started by Me?alCas?le?, 28 November, 2003, 17:50:04

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Me?alCas?le?

!tday - Sends a PM to everyone at the hub is it possible ???

and the should be like this :





  ????????????-^-=PureMe?al-Net=-^-????????????

                  ?-^-=Music Tip Off The Day=-^-?
                  ??????????????????????????
                              -

  ????????????-^-=PureMe?al-Net=-^-????????????


And if some one has some script as can send Hubreboot in PM to users in the hub and read from a text file ??

*Sorry for my english*
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

kepp

#1
help = "txt/help.txt"
brd = "????????????-^-=PureMe?al-Net=-^-????????????"
brd2 = "?-^-=Music Tip Off The Day=-^-?"
sBot = "Juk?box"
    
     function DataArrival(user, data)
          if (strsub(data,1,1) == "<") then
                data=strsub(data,1,strlen(data)-1)
                      s,e,cmd = strfind(data,"%b<>%s(%S+)")
                             if user.bOperator then
     if (cmd=="+reboot") or (cmd=="?reboot") then
          DoShowReboot(user, data)
               return 1
     elseif (cmd=="+tday") or (cmd=="?tday") then
         s,e,cmd,artist,song = strfind(data,"%b<>%s(%S+)%s(.)%s(.)")
                         SendPmToAll(sBot, "\r\n\r\n"..brd.."\r\n"..brd2.."\r\n"..artist.." -- "..song.."\r\n"..brd)
                  end
            end
      end
end     



              function DoShowReboot(user, data)
                       readfrom(help,"a")
                       message = ""
             while 1 do
                       line = read()
                              if line == nil then break
                else
                       message = message..line.."\r\n"
           end
end
                       user:SendData(BotName, "\r\n"..message)
                       readfrom()
        return 1;
end

I have not tested it...
Good luck :)
Guarding    

Me?alCas?le?

Thanks i will try now :-DDDDDD
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

Me?alCas?le?

Thanks soo mutch but +reboot dident work even i did put it like txt/help.text   has i done something wrong and that is wy it dosent work ?

and one question is it possible to do command +tday like this with out ----> _   +tday Iron maiden number of the beast    im sorry but i dident think about that when i did a request on this script :-S

But I im wery happy about this script :-P
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

kepp

#4
oh yes, that dosen't work... hmm, can't figure it out :S

And you probably noticed that the output of all those signs looked like shit ... :(
i don't think the client allow such
Guarding    

Me?alCas?le?

well aftersom im soo bad on english will i show you wath i mean :-D

if i write like this:
+tday iron maiden the number of the best

it will be like this:

????????????-^-=PureMe?al-Net=-^-????????????
?-^-=Music Tip Off The Day=-^-?
iron maiden the number of the -- beast
????????????-^-=PureMe?al-Net=-^-????????????

but if i could remove  --  and then write like this:
+tday iron maiden - the number of the beast
then would it be very nice :-DD

soo the commands should look like this:
+tday
doo you understand waht i mean i hope soo :-D

*sorry for my English*
PS and if it cant be fixed with the command +reboot can we remove it ?
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

plop

give this 1 a try.
help = "txt/help.txt"
brd = "????????????-^-=PureMe?al-Net=-^-????????????"
brd2 = "?-^-=Music Tip Off The Day=-^-?"
Bot = "Juk?box"
 
function DataArrival(user, data)
   if (strsub(data,1,1) == "<") then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s(%S+)")
      if user.bOperator then
         if (cmd=="+reboot") or (cmd=="?reboot") then
            DoShowReboot(user, data)
            return 1
         elseif (cmd=="+tday") or (cmd=="?tday") then
            s,e,artist,song = strfind(data,"%b<>%s%S+%s(.+)%s%-%s(.+)")
            SendPmToAll(Bot, "\r\n\r\n"..brd.."\r\n"..brd2.."\r\n"..artist.." -- "..song.."\r\n"..brd)
         end
      end
   end
end     

function DoShowReboot(user, data)
   readfrom(help)
   message = "\r\n\r\n"
   while 1 do
      line = read()
      if line == nil then 
         break
      else
         message = message..line.."\r\n"
      end
   end
   SendPmToAll(Bot, message.."|")
   readfrom()
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

kepp

#7
brd = "????????????-^-=PureMe?al-Net=-^-????????????"
brd2 = "?-^-=Music Tip Off The Day=-^-?"
sBot = "Juk?box"
    
     function DataArrival(user, data)
          if (strsub(data,1,1) == "<") then
                data=strsub(data,1,strlen(data)-1)                             if user.bOperator then
          if (cmd=="+tday") or (cmd=="?tday") then
         s,e,cmd,arg = strfind(data,"%b<>%s(%S+)%s(.*)")
                         SendPmToAll(sBot, "\r\n\r\n"..brd.."\r\n\r\n"..brd2.."\r\n\r\n"..arg.."\r\n\r\n"..brd) return 1
                 end
           end
      end
end

Ok that is done...
Commands:
?tday
+tday

i removed the reboot for now...
i will add another thing into it..
i thought of +show
so a normal user can check what the latest song is :D
Guarding    

kepp

Guarding    

Me?alCas?le?

#9
Syntax error: attempt to concat global `song' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 16 [file `...ax
Happends on:     give this 1 a try.
But +reboot works Great   :DDD

and the latest script any thing happends
when i try +tday but i like the idea of it :-DD
and if you would put:

i thought of +show
so a normal user can check what the latest song is :D

into it would be nice like hell :-DDDDD

Thanks For The Help :-DDDDDDDDDDDDD

*Sorry For My Englis*
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

Me?alCas?le?

Thanks for the help and support with this script

kepp and plop

if you have any ideas or improvements of the script
I would be very happy :-DDDD

Many Regards From

MetalCastle


*Sorry For My English*
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

Snoris

QuoteOriginally posted by Me?alCas?le?
Thanks for the help and support with this script

kepp and plop

if you have any ideas or improvements of the script
I would be very happy :-DDDD

Many Regards From

MetalCastle


*Sorry For My English*

Me?alCas?le? u little n00b...Learn how to script ur self ur little looser *smiles* :]

Cya at haninge  :P

Me?alCas?le?

Yes Snoris i will when i only have some time my Fri?nd
:-DDD
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

kepp

Det ?r l?tt n?r man l?r sig ;)
Guarding    

Snoris

QuoteOriginally posted by kepp
Det ?r l?tt n?r man l?r sig ;)

Jo men de beror ?x? p? VEM som f?rs?ker l?ra sig *ler lite mot metals h?ll*

(english translation)

QuoteOriginally posted by kepp
Det ?r l?tt n?r man l?r sig ;)
=Its easy when ur learning ;)

Yes but it depends WHO'S learning
*Smiling at metals direction*

Me?alCas?le?

*LoL*
I think i must learn me Lua fast now :-D
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

SMF spam blocked by CleanTalk