Author Topic: Help with this script, please  (Read 1805 times)

0 Members and 1 Guest are viewing this topic.

Offline popescuionut

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-4
Help with this script, please
« on: 22 October, 2011, 18:55:00 »
Hello! We tried to make small changes, because I want to show me just entering the hub, but it gives me some errors and I do not know. There is one problem: when entering the master admin, operator, VIP, do not you show absolutely no information and I would like to show to them. 0.4.1.1 and 0.4.1.2 ptokax use. Below is the script:

Code: [Select]
--[[

InfoBot 2.0 LUA 5.1x [Strict] [API 2]

By American Idiot 10/18/11

Requested by popescuionut


Maybe allready is o bot like this but I maid it because I wanted a script
to display custom profile names Master = Admin and User = Guest
And if anyone else need it , here it is :)
InfoBot.v1   - inspired from American Idiot's Auto-Block 1.0
16/07/2006  by CrAzZy_CaSpEr
Sends custom Userinfo prer profile

With this output:<--==VerliHub==-->
- [::]Your info:
- [::] Nick: User
- [::] Class : User Profile
- [::] IP: User Ip
- [::] Country Code: RO

~Converted to API2 By American Idiot 10/18/11

]]--

OnStartup = function()
-- Botname pulled from the hub
Bot = SetMan.GetString(21) -- or "BotName-Here"
end

UserConnected = function(user)
-- Custom Profile Names
Profiles = {
[-1] = "Guest (0)",
[2] = "VIP (2)",
[3] = "Registered (1)",
[5] = "Master (10)",
[6] = "Operator (3)",
[7] = "Admin (5)",
}
local p = Profiles[user.iProfile]
if p then
local cc = Core.GetUserValue(user,26):upper() or "OFFLINE"
local s = "\r\n- [::] Your Info:\r\n"..
"- [::] Nick: "..user.sNick.." \r\n"..
"- [::] Class: "..p.." \r\n"..
"- [::] IP: "..user.sIP.." \r\n"..
"- [::] Country Code: "..cc.." \r\n "..
                "\r\n- [::] Reg Information: \r\n"..
"- [::] Nick: "..user.sNick.." \r\n"..
"- [::] Class: "..p.." \r\n"..
                "- [::] Password set:Yes" " \r\n"..
                "- [::] Last IP: "..user.sIP.." \r\n"..
                "\r\n- [::] Protected: No \r\n"..
                "\r\n- [::] Hidden kicks: No \r\n"..
                "\r\n- [::] Hidden keys: No \r\n"..
                "\r\n- [::] Hidden share: No \r\n"..
                "\r\n- [::] Registered by: VerliHub \r\n"..
                "\r\n- [::] Alternate IP: "..user.sIP.."\r\n"..
             Core.SendToUser(user,"<"..Bot.."> "..s.."|")
end
end
MasterConnected,AdminConnected,OpConnected,VipConnected,RegConnected = UserConnected,UserConnected

So I want to show everyone when they join the hub:

Code: [Select]
- [::] Your Info:
- [::] Nick: Test
- [::] Class: Master (10)
- [::] IP: 188.xx.xxx.xxx
- [::] Country Code: ?
 
- [::] Reg Information:
- [::] Nick:Test
- [::] Class:  10
- [::] Password set:Yes
- [::] Last login: Wed Feb 13 01:56:05 2008
- [::] Last IP: 123.456.789.123
- [::] Last error: Wed Jan 23 14:52:02 2008
- [::] Error IP: 189.11.18.222
- [::] Login count: --
- [::] Login errors: 0
- [::] Protected: Yes
- [::] Hidden kicks: Yes
- [::] Hidden keys: Yes
- [::] Hidden share: Yes
- [::] Registered since: Fri Jan 11 09:55:56 2008
- [::] Registered by: VerliHub -->here I want to show who made the account, if possible.
- [::] Alternate IP: 123.456.789.123
I tried several versions but does not work. Thank you for your help

« Last Edit: 23 October, 2011, 22:06:24 by Psycho_Chihuahua »

PtokaX forum

Help with this script, please
« on: 22 October, 2011, 18:55:00 »

Offline popescuionut

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-4
Re: Help with this script, please
« Reply #1 on: 22 October, 2011, 23:31:37 »
I want to know if changes made after the script can display those things you get everyone on the hub. If I give suggestions to troubleshoot and eliminate errors would be ok. There is one problem: when entering the master admin, operator, VIP, do not you show absolutely no information and I would like to show to them. 0.4.1.1 and 0.4.1.2 ptokax use. Thank you!
This is the script with errors:


Code: [Select]
--[[

   InfoBot 2.0 LUA 5.1x [Strict] [API 2]

   By American Idiot   10/18/11

   Requested by popescuionut


Maybe allready is o bot like this but I maid it because I wanted a script
to display custom profile names Master = Admin and User = Guest
And if anyone else need it , here it is :)
InfoBot.v1   - inspired from American Idiot's Auto-Block 1.0
16/07/2006  by CrAzZy_CaSpEr
Sends custom Userinfo prer profile

With this output:<--==VerliHub==-->
- [::]Your info:
- [::] Nick: User
- [::] Class : User Profile
- [::] IP: User Ip
- [::] Country Code: RO

~Converted to API2 By American Idiot   10/18/11

]]--

OnStartup = function()
   -- Botname pulled from the hub
   Bot = SetMan.GetString(21) -- or "BotName-Here"
end

UserConnected = function(user)
   -- Custom Profile Names
   Profiles = {
   [-1] = "Guest (0)",
   [2] = "VIP (2)",
   [3] = "Registered (1)",
   [5] = "Master (10)",
   [6] = "Operator (3)",
   [7] = "Admin (5)",
   }
   local p = Profiles[user.iProfile]
   if p then
      local cc = Core.GetUserValue(user,26):upper() or "OFFLINE"
      local s = "\r\n- [::] Your Info:\r\n"..
      "- [::] Nick: "..user.sNick.." \r\n"..
      "- [::] Class: "..p.." \r\n"..
      "- [::] IP: "..user.sIP.." \r\n"..
      "- [::] Country Code: "..cc.." \r\n "..
                "\r\n- [::] Reg Information: \r\n"..
      "- [::] Nick: "..user.sNick.." \r\n"..
      "- [::] Class: "..p.." \r\n"..
                "- [::] Password set:Yes" " \r\n"..
                "- [::] Last IP: "..user.sIP.." \r\n"..
                "\r\n- [::] Protected: No \r\n"..
                "\r\n- [::] Hidden kicks: No \r\n"..
                "\r\n- [::] Hidden keys: No \r\n"..
                "\r\n- [::] Hidden share: No \r\n"..
                "\r\n- [::] Registered by: VerliHub \r\n"..
                "\r\n- [::] Alternate IP: "..user.sIP.."\r\n"..
               Core.SendToUser(user,"<"..Bot.."> "..s.."|")
   end
end
MasterConnected,AdminConnected,OpConnected,VipConnected,RegConnected = UserConnected,UserConnected
So when I look into someone hub. We made some changes, but I managed. I started taking some advice and would be more than welcome. Thank you

Code: [Select]
[::] Your Info:
- [::] Nick: Test
- [::] Class: Master (10)
- [::] IP: 188.xx.xxx.xxx
- [::] Country Code: ?
 
- [::] Reg Information:
- [::] Nick:Test
- [::] Class:  10
- [::] Password set:Yes
- [::] Last login: Wed Feb 13 01:56:05 2008
- [::] Last IP: 123.456.789.123
- [::] Last error: Wed Jan 23 14:52:02 2008
- [::] Error IP: 189.11.18.222
- [::] Login count: --
- [::] Login errors: 0
- [::] Protected: Yes
- [::] Hidden kicks: Yes
- [::] Hidden keys: Yes
- [::] Hidden share: Yes
- [::] Registered since: Fri Jan 11 09:55:56 2008
- [::] Registered by:
- [::] Alternate IP: 123.456.789.123
« Last Edit: 23 October, 2011, 22:05:53 by Psycho_Chihuahua »

PtokaX forum

Re: Help with this script, please
« Reply #1 on: 22 October, 2011, 23:31:37 »