Iam running this script along with RoboCop 7:a to stop users from downloading from ops if they are not registered VIPs.
All of a sudden I noticed that a users managed to connect and take.
Can someone pleezz check the script out.
I want it to now apply a block on not only OP but VIP and Master aswell plus the possibility to turn off the block on each profile(Master,Op,VIP) when I wish by using a command such as
M1=on M0=off
O1=on O0=off
V1=on V0=off
Thanks for all the help so far, been with Lua pretty long and support all ur work and sweat, well done !!!
---------------------------------------------------------------------------
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(curUser, data)
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** You must get registered to be able to download from an OP or Admin, contact an Operator or [G-T-E]:I:N:F:O:R:C:E:R:? to get Registered")
return 1
end
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** You must get registered to be able to download from an OP or Admin, contact an Operator or [G-T-E]:I:N:F:O:R:C:E:R:? to get Registered")
return 1
end
end
end
--------------------------------------------------------------------------
Pleezzzz I need help on the thread I posted above .
-- Fixed for [G-T-E]Gate? by Pur 7 may 04
function Main()
frmHub:EnableFullData(1)
Levels = {
Master = "1",
Operator = "0",
VIP = "0",
Reg = "0",
Default = "0"
}
end
function DataArrival(curUser, data)
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then
curUser:SendData("*** This profile is protected")
end
return 1
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then
curUser:SendData("*** This profile is protected")
end
return 1
end
end
function isEnabled(profile)
ret = "0"
if profile then
for i, v in Levels do
if ( i == profile ) then
ret = v
end
end
end
return ret
end
Purrrr
Thanks loads for ur relpy and appreciate the time u put for assisting me. Will give it a go.
Have a nice weekend.
G8
yw, if it doesn't work i hear from you again :)
i had some trouble passive active thing so couldn't test it properly
Works like a charm "Grand Smile"
One thing, I have remote to my server, (Hub Software) so If I want to change from 1 to 0 on a profile then I have to remotely do it. Can u , if not to much trouble fix the script so that I can just write a cmd in main chat (unseenable by others) to activate or deactivaite the said proflie, ie.. M1=on M0=off , O1=on O0=off V1=on V0=off.
Thanks again
-- Fixed for [G-T-E]Gate? by Pur 7 may 04
-- Added some commands 8may 04 pur
function Main()
frmHub:EnableFullData(1)
Levels = {
Master = "0",
Operator = "0",
VIP = "0",
Reg = "0",
Default = "0"
}
end
function DataArrival(curUser, data)
ddata=strsub(data,1,strlen(data)-1)
_,_,cmd, arg = strfind(ddata,"%b<>%s+(%S+)%s+(%S+)")
if (curUser.bOperator) then
if (cmd=="!Master") then
if (arg=="on") then
Levels.Master = "1"
elseif (arg=="off") then
Levels.Master = "0"
end
end
if (cmd=="!Operator") then
if (arg=="on") then
Levels.Operator = "1"
elseif (arg=="off") then
Levels.Operator = "0"
end
end
if (cmd=="!VIP") then
if (arg=="on") then
Levels.VIP = "1"
elseif (arg=="off") then
Levels.VIP = "0"
end
end
if (cmd=="!Reg") then
if (arg=="on") then
Levels.Reg = "1"
elseif (arg=="off") then
Levels.Reg = "0"
end
end
end
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then
curUser:SendData("*** This profile is protected")
end
return 1
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then
curUser:SendData("*** This profile is protected")
end
return 1
end
end
function isEnabled(profile)
ret = "0"
if profile then
for i, v in Levels do
if ( i == profile ) then
ret = v
end
end
end
return ret
end
not tested
-pur
Seems that joy cant last to long ,
Receiving errors on the script I got made from Purr, see below;
Any tips or better still, solutions Pleezzz
----------------------------------------------------------------------------
No syntax errors in script file RoboCopv7.0a.lua
No syntax errors in script file MessTimes.lua
No syntax errors in script file TexterBot.lua
No syntax errors in script file RightClicker v3.0.lua
No syntax errors in script file IP=Security.lua
No syntax errors in script file DwnldBlkByPur4G8.lua
Syntax error: attempt to index a nil value
stack traceback:
1: function `DataArrival' at line 20 [file `...kaX-0.330.TD4 RCv7\scripts\DwnldBlkByPur4G8.lua']
Syntax error: attempt to index a nil value
stack traceback:
1: function `DataArrival' at line 20 [file `...kaX-0.330.TD4 RCv7\scripts\DwnldBlkByPur4G8.lua']
Syntax error: attempt to index a nil value
stack traceback:
1: function `DataArrival' at line 29 [file `...kaX-0.330.TD4 RCv7\scripts\DwnldBlkByPur4G8.lua']
Syntax error: attempt to index a nil value
stack traceback:
1: function `DataArrival' at line 29 [file `...kaX-0.330.TD4 RCv7\scripts\DwnldBlkByPur4G8.lua']
Syntax error: attempt to index a nil value
stack traceback:
1: function `DataArrival' at line 20 [file `...kaX-0.330.TD4 RCv7\scripts\DwnldBlkByPur4G8.lua']
Syntax error: attempt to index a nil value
stack traceback:
1: function `DataArrival' at line 20 [file `...kaX-0.330.TD4 RCv7\scripts\DwnldBlkByPur4G8.lua']
----------------------------------------------------------------------------
Script is as follows;
-----------------------------------------------------------------------------
function Main()
frmHub:EnableFullData(1)
Levels = {
Master = "1",
Operator = "1",
VIP = "0",
Reg = "0",
Default = "0"
}
end
function DataArrival(curUser, data)
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then
curUser:SendData("*** You must get registered to be able to download from Me contact an Operator or [G-T-E]:I:N:F:O:R:C:E:R:? to get Registered")
end
return 1
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then
curUser:SendData("*** You must get registered to be able to download from Me contact an Operator or [G-T-E]:I:N:F:O:R:C:E:R:? to get Registered")
end
return 1
end
end
function isEnabled(profile)
ret = "0"
if profile then
for i, v in Levels do
if ( i == profile ) then
ret = v
end
end
end
return ret
end
----------------------------------------------------------------------------
Here's some more info to assisst solutioner on my problem ;
[G-T-E]:I:N:F:O:R:C:E:R:? has Profile as Master ,
It seems that after a while (1hr or so ) I notice that users manage to get a slot off of me even though the script is activated.
Profile.dat TD4
0|Master|11111111111111111111111000000001
1|Operator|11111100011001111111111000000001
2|VIP|10000000000001111000000000000000
3|Reg|10000000000000000000000000000000
-----------------------------------------------------------------------------
What does that right clicker script do?
I saw that in your message.
QuoteNo syntax errors in script file RightClicker v3.0.lua
So can you give me that script?
Anyone can do a check on the script problem mentioned above,
Iam haveing to reastart the scripts every 45 minutes.
Thanks in Advance
Gate
Still Looking for a solution on mentioned script above,
is the userstats of ptokax activated ?
No the userstats of ptokax is not activated ..