PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Smulf on 17 February, 2004, 19:49:10

Title: Popup prob. for Mass
Post by: Smulf on 17 February, 2004, 19:49:10
Hi U guys...

I'm realy wondering. I have a mass message script. When I type 'mass ' in main chat, only a line like: "Private message from Mass MGS from [OP]Smulf: hi" is diplayed... Why??

Is it posible in anyway to config the script so it shows the mass message in a popup window to common user...???

This is the script I use:

--Mass Message bot made by SRJbb99 for the [?] network(?[?] Network Solutions 2003)

Bot = "Mass message"

function Main()
frmHub:RegBot(Bot)
end

function DataArrival(user, data)
if(user.bOperator and strsub(data, 1, strlen(user.sName)+8) == "<"..user.sName.."> mass ") then
SendPmToAll("Mass MGS from " ..user.sName, strsub(data, strlen(user.sName)+9))
end
end



I would be very glad if you guys out there could help me... Thanks...
Title:
Post by: pHaTTy on 17 February, 2004, 20:03:35
heres one i done earlier ;)


--Mass bot by Phatty
--13th December 2k3

function Main()
Bot = "Mass"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if (cmd=="!mass") then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
if message == nil then
user:SendData(Bot,"Please type !mass ")
else
SendPmToAll(Bot," "..user.sName..": "..message)
end
end
end
end
end

Title:
Post by: NightLitch on 17 February, 2004, 20:05:26
When you get that try unmark popups in client and OK and then mark it again and OK. hope you understand.

That Should work.
Title:
Post by: NightLitch on 17 February, 2004, 20:06:02
Gaaa... always a step behind... you ... you... ahh... forget it... ;-p to slow I guess
Title:
Post by: pHaTTy on 17 February, 2004, 20:06:26
here



--Mass bot by Phatty v2
--17th Feburary 2k4

function Main()
Bot = "Mass"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")

if (cmd=="!mass") and user.bOperator then
if message ~= nil then
SendPmToAll(Bot," "..user.sName..": "..message)
return 1
else
user:SendData(Bot,"Please type !mass ")
return 1
end
end
end
end

Title:
Post by: Smulf on 18 February, 2004, 16:03:44
Thanks you guys! Great script pH?tt?, very nice... It was just what I wanted!
Title: A small request if it's posible...
Post by: Smulf on 18 February, 2004, 18:11:25
pH?tt? is it posible to add, so only the Owner, Admin and Pro_OP can send '!mass '...?

Here is my iprofile:

0|Owner|11111111111111111111000000000000
1|Admin|11111100011111111111000000000000
2|Pro_OP|11110100011101111111000000000000
3|Reg|10000000000000000000000000000000
4|VIP|10000000000001111000000000000000
5|Nor_OP|11110100011101111100000000000000
Title:
Post by: kepp on 18 February, 2004, 18:13:36

--Mass bot by Phatty v2
--17th Feburary 2k4

function Main()
Bot = "Mass"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")

if (cmd=="!mass") and user.iProfile == 0 or user.iProfile == 1 or user.iProfile == 2 then
if message ~= nil then
SendPmToAll(Bot," "..user.sName..": "..message)
return 1
else
user:SendData(Bot,"Please type !mass ")
return 1
end
end
end
end

Title:
Post by: pHaTTy on 18 February, 2004, 18:13:46
yep np


--Mass bot by Phatty v2
--17th Feburary 2k4

function Main()
Bot = "Mass"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")

if user.iProfile == 0 or user.iProfile == 1 or user.iProfile == 2 then
if (cmd=="!mass") and user.bOperator then
if message ~= nil then
SendPmToAll(Bot," "..user.sName..": "..message)
return 1
else
user:SendData(Bot,"Please type !mass ")
return 1
end
end
end
end
end

Title:
Post by: pHaTTy on 18 February, 2004, 18:16:17
or


--Mass bot by Phatty v2.01
--17th Feburary 2k4

table = {"0","1","2"} -- profiles

function Main()
Bot = "Mass"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")


if (cmd=="!mass") then
for i,v in table do
if user.iProfile == v then
if message ~= nil then
SendPmToAll(Bot," "..user.sName..": "..message)
return 1
else
user:SendData(Bot,"Please type !mass ")
return 1
end
end
end
end
end
end

Title: Tiny small config:)
Post by: Smulf on 18 February, 2004, 18:45:39
Wow big thanks to you guys! I like fast replies:P
If I should aske one more question it would be: "What is the string for a user profile?", so it's not: SendPmToAll(Bot," ".[B].user.sName..": [/B]  "..message) with the username string, but instead - Owner or what profile the common OP has...

No more questions... Big thanks for the help guys!
Title:
Post by: pHaTTy on 18 February, 2004, 19:47:05
QuoteOriginally posted by Smulf
Wow big thanks to you guys! I like fast replies:P
If I should aske one more question it would be: "What is the string for a user profile?", so it's not: SendPmToAll(Bot," ".[B].user.sName..": [/B]  "..message) with the username string, but instead - Owner or what profile the common OP has...

No more questions... Big thanks for the help guys!

hmm i dont understand
Title: Like this
Post by: Smulf on 19 February, 2004, 17:06:53
Well, when an OP sends a mass, there would be written: "Mass Message [OP]Zzzz: TEXT",
but I would like this if it was posible: "Mass Message from Owner(Admin, Pro_OP, Nor_OP): TEXT"...
You see, if an Pro_OP sends the msg it would write: "Mass Message from Pro_OP: TEXT"...
Title:
Post by: pHaTTy on 19 February, 2004, 17:42:55

--Mass bot by Phatty v2.02
--17th Feburary 2k4

table = {"0","1","2"} -- profiles

function Main()
Bot = "Mass"
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")


if (cmd=="!mass") then
for i,v in table do
local TEMP = GetProfileIdx(user.iProfile)
if user.iProfile == v then
if message ~= nil then
SendPmToAll(Bot," from "..TEMP..": "..message)
return 1
else
user:SendData(Bot,"Please type !mass ")
return 1
end
end
end
end
end
end


Title:
Post by: Smulf on 21 February, 2004, 17:26:02
Sorry for the delay... pH?tt? the last script didn't work to well, can u get it to work? The prob. is when I try to type "!mass " nothing happens...