Teambot help
 

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

Teambot help

Started by ?[-?Genius?-]?, 11 January, 2007, 13:34:56

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

?[-?Genius?-]?

i need help in one script.

This script have a error.

This is original
SendTo = {
[0] = 1, -- Masters
[1] = 1, -- Operators

[2] = 0, -- Vips
[3] = 0, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[6] = 1, -- Owner
[7] = 1, -- Misstress
[-1] = 0, -- Unregistered
}



and i make this for this
SendTo = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[6] = 1, -- Owner
[7] = 1, -- Misstress
[-1] = 1, -- Unregistered
}



Script dont work

full script

--------------------------------------------

---TeamBot Update by Mozzilla?
---Description - Allows hub users to see a full list of members by profile or full lists of individual profiles
---Original author: Mutor, original source: LUA4
---comands: !listreg / !listvip / !listop / !listmod / !listmaster / !listfounder / !listall
--// Update To Lua 5.1.1 by 6Marilyn6Manson6 27/07/2006
--// Change commands: !listreg / !listvip / !listope / !listmod / !listmas / !listntf / !listall
--// Thanks bastya_elvtars for small help with return commands :) 16/08/2006

--// Changes made By Mozzilla? - 09/11/2006
--// Added command: !listown
--// Added Owner profile, just in case it is part of your hub soft
--// Added Owner to UseCMD
--// Added Right Click
--// Changed order in which !listall is displayed
--// Added - 10 November 2006
--// Message from the bot now shows HubName in end result
--// Change(s) made - 09 January 2007
--// Bot will now show whether users are online or offline (Thanks to Mutor (I think)) LOL

----------------------------------------------------
----------------------------------------------------
Prefix = "!" -- ! + # ? -
sBotName = "BotName-Of-Your-Choice" -- or frmHub:GetHubBotName(),
sHubName = frmHub:GetHubName()
----------------------------------------------------
UseCMD = { -- What profile you want blocked 1/yes 0/no
[0] = 1, -- Master
[1] = 1, -- Operator
[2] = 0, -- VIP
[3] = 0, -- Registered
[4] = 1, -- Moderator
[5] = 1, -- Netfounder
[6] = 1, -- Owner
[7] = 1, -- Misstress
[-1] = 0, -- Unregistered
}
----------------------------------------------------
SendTo = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 0, -- Vips
[3] = 0, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[6] = 1, -- Owner
[7] = 1, -- Misstress
[-1] = 0, -- Unregistered
}
----------------------------------------------------
function NewUserConnected(user)
if SendTo [user.iProfile] > 0 then
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Owners$<%[mynick]> !listown||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Network Founders$<%[mynick]> !listntf||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Masters$<%[mynick]> !listmas||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Operators$<%[mynick]> !listope||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Moderators$<%[mynick]> !listmod||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All VIP's$<%[mynick]> !listvip||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Registered Users$<%[mynick]> !listreg||";)
user:SendData("$UserCommand 1 3 "..sBotName.."\\List All Hub Members$<%[mynick]> !listall||";)
end
end
OpConnected = NewUserConnected
----------------------------------------------------
tCommands = {
["listreg"] = function(user)
Show(user, "Reg";)
end,
["listvip"] = function(user)
Show(user, "VIP";)
end,
["listope"] = function(user)
Show(user, "Operator";)
end,
["listmod"] = function(user)
Show(user, "Moderator";)
end,
["listmas"] = function(user)
Show(user, "Master";)
end,
["listmis"] = function(user)
Show(user, "Misstress";)
end,
["listntf"] = function(user)
Show(user, "NetFounder";)
end,
["listown"] = function(user)
Show(user, "Owner";)
end,
["listall"] = function(user)
Show(user,"Owner";)
Show(user,"NetFounder";)
Show(user,"Master";)
Show(user,"Misstress";)
Show(user,"Operator";)
Show(user,"Moderator";)
Show(user,"VIP";)
Show(user,"Reg";)
end,
}

function ChatArrival(user,data)
if user.bOperator and UseCMD[user.iProfile]==1 then
local _,_,pref,cmd = string.find(data, "%b<>%s+(%p)(%S+)%|";)
if pref == Prefix and tCommands[cmd] ~= nil then
tCommands[cmd](user)
return 1
end
end
end
----------------------------------------------------
function Show(user,which)
user:SendPM(sBotName,"";)
user:SendPM(sBotName,"";)
user:SendPM(sBotName,"\t---<>-----------------------------------------------------------------<>--";)
user:SendPM(sBotName,"\t\tList of Current "..which.."s";)
user:SendPM(sBotName,"\t\tIn "..sHubName)
user:SendPM(sBotName,"\t---<>-----------------------------------------------------------------<>--";)
local aux,usr
for aux, usr in pairs(GetUsersByProfile(which)) do
local tOnline = frmHub:GetOnlineUsers(GetProfileIdx(which))
local bisOnline = 0
for k in pairs(tOnline) do
if tOnline[k].sName == usr then bisOnline = 1 end
end
if bisOnline == 1 then
user:SendPM(sBotName,"\t\t"..usr.." \t\t[IS ONLINE]";)
else
user:SendPM(sBotName,"\t\t"..usr.." \t\t[IS OFFLINE]";)
end
end
user:SendPM(sBotName,"";)
user:SendPM(sBotName,"";)
end
----------------------------------------------------
--// 6Marilyn6Manson6




Sory about my bad inglish



?[-?Genius?-]?

Hi

Sory i have another question.

Its possible modify this script for another profiles?

Master
Operator
vip
reg

Tankx

CrazyGuy

hmm, please search this board for that script as I have worked on it before.
Version in that post is working as tested

bastya_elvtars

Please create informative topic titles.
*sigh* we need to create forum rules...
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk