PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: #jdslkfjals# on 29 December, 2004, 06:43:50

Title: a script that makes VIP only be avaible to download from operators
Post by: #jdslkfjals# on 29 December, 2004, 06:43:50
i need a simple script that makes VIP only be avaible to download from operators

is that possible ?
Title:
Post by: enema on 29 December, 2004, 07:17:43
I hope this one works:

function Main()
frmHub:EnableFullData(1)
Levels = {Master = "1",Operator = "1",VIP = "1",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 GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** Only VIPS are able to download from an OP")
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("*** Only VIPS are able to download from an OP")
       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
end
Title:
Post by: voy on 09 March, 2005, 23:01:46
Hi i cant run this script in 0.3.3.0.b16.05 please can any one help me

i got this Syntax ...s\VIP only be avaible to download from operators.lua:2: attempt to call method `EnableFullData' (a nil value))