help with the script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

help with the script

Started by ghostnet, 07 June, 2015, 00:26:54

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ghostnet

i wanted a rules bot which shows rules in the main on user entry. therefore i edited the rules bot found here . but it does not work. there is no error with the script but it does not do the intended task.please help. thanks .
code starts from below:
-- "Botname" [Add as you wish]
bot = "rules"

-- Profile permission as per new ptokax
tProfile = {
      [-1] = 1,   -- Unregistered Users
      
  • = 1,   -- Masters
          [1] = 1,   -- Operators
          [2] = 1,   -- VIP
          [3] = 1,   -- Registered
    }

    ------------------------------------------------------------------------------------------
    --OnStartup Function
    ------------------------------------------------------------------------------------------

    ChatArrival = function(usr)
       
       
             local Msg,border = "\r\n",string.rep("-",15)..string.rep("=",100)..string.rep("-",15)
             Msg = Msg .. "\r\n                     "
             Msg = Msg .. "\r\n "..border..""
             Msg = Msg .. "\r\n         "..SetMan.GetString(0).." Rules That must be followed By all Users             "
             Msg = Msg .. "\r\n "..border..""
             Msg = Msg .. "\r\n "
             Msg = Msg .. "\r\n\t\t 1 . By Entering this hub you are agree to the following. If not, please exit immediately :\n"
             Msg = Msg .. "\r\n\t\t 2 . The Owner of this hub does not take any responsibility of what all stuff the users are sharing .\n"
             Msg = Msg .. "\r\n\t\t 3 . Any user found passless in this hub will be warned .\n"
             Msg = Msg .. "\r\n\t\t 4 . Advertising is allowed in this hub .\n"
             Msg = Msg .. "\r\n\t\t 5 . Any user who has registered himself in this hub has to put the registered nickname and password in favourite hub properties .\n"
             Msg = Msg .. "\r\n\t\t 6 . Do not disconnect users uploading from you.\n"
             Msg = Msg .. "\r\n\t\t 7 . Hub users should not to share incomplete download files. \n"
             Msg = Msg .. "\r\n\t\t 8 . The users should not flood in main chat or PM . \n"
             Msg = Msg .. "\r\n\t\t 9 . Repeated violations of these rules will get your IP banned .\n"
             Msg = Msg .. "\r\n\t\t 10. Users should not spam the message board or any other boards with multiple messages . \n"
             Msg = Msg .. "\r\n\t\t 11. Users should reply to PMs instantly. \n"
             Msg = Msg .. "\r\n\t\t 12. If the users are away from their pc theys should go to away mode by typing +away <message> in the main chat . \n"
             Msg = Msg .. "\r\n\t\t 13. Users should never go offline when others are uploading from them . \n"
             Msg = Msg .. "\r\n\t\t 14. Type +help for commands available for your profile. \n"
             Msg = Msg .. "\r\n\t\t 15. Your share must be minimum 5 GB to login in this hub . \n"
                   Msg = Msg .. "\r\n ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
             Msg = Msg .. "\r\n\r\n "
          Core.SendToall(usr,bot,Msg)
             return true


    end

    ToArrival=ChatArrival
             

PPK

Quote from: ghostnet on 07 June, 2015, 00:26:54
i wanted a rules bot which shows rules in the main on user entry.
That is what is MOTD for. You don't need script or bot for that.
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

ghostnet

thanks. :P
can i change the color of MOTD to some other color like green or blue?

the-master

keep on sharing :)

SMF spam blocked by CleanTalk