Author Topic: help with the script  (Read 2173 times)

0 Members and 1 Guest are viewing this topic.

Offline ghostnet

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
help with the script
« on: 07 June, 2015, 00:26:54 »
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
             
« Last Edit: 07 June, 2015, 00:28:41 by ghostnet »

PtokaX forum

help with the script
« on: 07 June, 2015, 00:26:54 »

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: help with the script
« Reply #1 on: 07 June, 2015, 01:06:34 »
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

Offline ghostnet

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: help with the script
« Reply #2 on: 07 June, 2015, 21:21:08 »
thanks. :P
 can i change the color of MOTD to some other color like green or blue?

Offline the-master

  • Triple Ace
  • **
  • Posts: 217
  • Karma: +10/-15
Re: help with the script
« Reply #3 on: 07 June, 2015, 21:53:27 »
easy one.. NO
keep on sharing :)
dchub://kickincountryhub.no-ip.org

PtokaX forum

Re: help with the script
« Reply #3 on: 07 June, 2015, 21:53:27 »