Hey guys,
Once again im in need of your expert advice/help.
Im looking for a script that will do the following:
Send a PM or private msg in the hub when a user with the following specs enters
1) Not regged in hub
2) Not an Op
3) Have xx GB or more
I know that there is scripts out there that will do parts of this, but as my lua skills are limited I have not yet succeded in this.
I would prefer that the msg is called from a txt file and that the msg could be both triggered and send as adefault msg.
Any help will be great :)
/Snooze
Hi,
Hope it helps....
-- Requested by Snooze
-- Made by nErBoS
Bot = "PMmer"
bshare = "bshare.txt" -- In script folder
BigShare = 8 -- In GB
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user)
if not(GetProfileName(user.iProfile) == "Reg" or GetProfileName(user.iProfile) == "Vip") then
s,e,share = strfind(user.sMyInfoString, "$MyINFO $ALL [^$]+$ $[^$]*$[^$]*$([^$]+)")
share = share / (1024*1024*1024)
if (share >= BigShare) then
Readtextfile(user, bshare)
end
end
end
function Readtextfile(user, file)
local filecontents = ""
local handle = openfile(file, "r")
if (handle ~= nil) then
local line = read(handle)
while line do
filecontents = filecontents..line.."\r\n"
line = read(handle)
end
closefile(handle)
user:SendPM(Bot, filecontents)
end
end
Best regards, nErBoS
Thanks nErBoS !
Thats just the help i needed :) I'll just add a trigger section to this one and it will be perfect :D
Thanks again,
/Snooze
Thnx nErBoS! greatz script:D Just what I needed...
Hey nErBoS,
I've now been running this script for a few days, and just wanted to let you know that its working perfectly !!
Thanks again :-)
**Snooze
Hi,
Don't need to thanks i'm here to help where i can :)
Best regards, nErBoS