PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: Optimus on 08 December, 2003, 12:49:36

Title: - MassMessage To Unregisterd_Users
Post by: Optimus on 08 December, 2003, 12:49:36
This 1 i made for some 1 else, but wanted to share it with you all.
It's a Mass_Message system, To send messages to Only Unregisterd users that are in the hub...

* WILL ONLY WORK CORRECTLY WHEN HUB IS RESTARTED...

Enjoy!

- DOWNLOAD HERE - (http://members.home.nl/jakootstra/unRegUsers.rar)

 ;)
Title: LoL !
Post by: Cp6uja on 14 June, 2004, 16:06:07
Optimus why you build this script !

Sorry 4 my ENGLISH  ;)
Title:
Post by: blackwings on 14 June, 2004, 18:06:59
QuoteOriginally posted by Cp6uja
Optimus why you build this script !

Sorry 4 my ENGLISH  ;)

So ops can sends mass message to unregged people and the already regged user, vips and ops doesn't need to see it.
Title:
Post by: Cid on 08 January, 2005, 16:11:48
any chance to make a script that sends a massmessage:

1. only to unregged users (or selectable profile)
2. timed, like every 60 minutes
3. reads message to send from a .txt file

???
Title:
Post by: piglja on 08 January, 2005, 19:18:20
Optimus, is there a chance that you put that script somewhere where it can be downloaded?
On the existing URL it says that it is not available :(
Title:
Post by: ??????Hawk?????? on 08 January, 2005, 19:39:19
heya peeps  


Click Here (http://www.plop.nl/ptokaxbots/Optimus/PmToUnregged_users.rar)


 :))  :))  :))  :))
Title:
Post by: piglja on 08 January, 2005, 19:41:50
tnx, Hawk!
Title:
Post by: Optimus on 08 January, 2005, 20:28:47
Hi Piglja girl  :D

Well that 1 was rather old hehe, wrote me a new 1 quickly. Only None regged users need to be added so be my guest.

This 1 is based on profiles, enjoy!

-- Mass-Message based on Profiles
-- Made by Optimus 8-1-2005

sBot = "-=Mass#System=-"

sCommands = {}

CmdPrefix = { ["!"]=1, ["?"]=1, ["+"]=1 }

Main = function()
frmHub:RegBot(sBot)
end

sCommands["massp"] = function(user, data)
local s,e,cmd,profile,message = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)")
if user.bOperator then
if profile and message then
local GetProfile = GetUsersByProfile(profile)
if GetProfileIdx(profile) ~= -1 then
local text = CreateMassText(user, message)
for a,b in GetProfile do
if b then
local vUser = GetItemByName(b)
if vUser then
vUser:SendPM(sBot, text)
end
end
end
else
user:SendMessage(sBot, "*** Profile is not available!")
end
else
user:SendMessage(sBot, "*** Usage: !massp profile message (profiles: netfounder, master, moderator, operator, vip, reg)")
end
end
return 1
end

CreateMassText = function(user, message)
if (strlen (message)*2/3+2) < 76 then
border = strrep ("-", strlen (message)*2/3+2)
else
border = strrep ("-", 75)
end
return "*** Mass-Message # From: "..user.sName.."\r\n\r\n"..border.."\r\n"..message.."\r\n"..border.."\r\n"
end

DataArrival = function(user, data)
if (strsub(data, 1, 1) == "<" ) then
user.SendMessage = user.SendData return GetCommands(user, data)
elseif (strsub(data, 1, 5) == "$To: ") then
user.SendMessage = user.SendPM return GetCommands(user, data)
end
end

GetCommands = function(user, data, cmd)
data=strsub(data,1,strlen(data)-1)
local s,e,prefix,cmd=strfind(data, "%b<>%s*(%S)(%S+)")
if prefix and CmdPrefix[prefix] then
if sCommands[cmd] then
return sCommands[cmd](user, data)
end
end
end
Title:
Post by: Optimus on 08 January, 2005, 20:33:06
Feel free to add more...

1. timed, like every 60 minutes
2. reads message to send from a .txt file
Title:
Post by: Cid on 13 January, 2005, 00:22:08
:)

so it can send massmessages now to all profiles except unregged users... lol. thats exactly the opposite of what i wanted :P

i just wanted a script that sends a massmessage to unregged users bugging them like all the time to reg for the hub.
Title:
Post by: Optimus on 13 January, 2005, 01:24:19
The other 1 is here.. - Download here -  (http://www.plop.nl/ptokaxbots/Optimus/PmToUnregged_users.rar)