I'll not the timer just the message ones.. would u plz help me
:D:D
Quote from: osse on 16 October, 2006, 22:59:49
I'll not the timer just the message ones.. would u plz help me
Please? :o
yes plzzzzzzzzzzzz... Please I write plz if u see....:D:D ;D
I am lost now.
There is a Timed mass message and i want it not timed just send a mass message to unreg ..when they are login
please..plz...thnx 4 ur help.... ;D
Quote from: osse on 17 October, 2006, 16:14:51
please..plz...thnx 4 ur help.... ;D
So you want a script to send the unregs a PM when they eenter the hub?
Yes. plz..like timed mass message but just 1 time..not more-- ;D ;D ;D
function NewUserConnected(curUser)
if not curUser.bRegistered then
curUser:SendData(frmHub:GetHubBotName(),"This is an example message to unregistered users.")
end
end
:(
The message is with a file text like timed mass massage not a simple mess..
look this mass mess med text ( file ) but not with a timer ..
----------------------------------------------------------------------
--Lua 5 By Dessamator(added message To Profile)
-- cleanup/optimization by bastya_elvtars
-- timed mass message from text by ?~??o?Hawk?o??~?
-- create a massmessage.txt file in the scripts directory
-- containing your message
CanDo =
{
- = 1, -- Master
[1] = 1, -- Operator
[2] = 1, -- VIP
[3] = 1, -- Reg
[4] = 1, -- Moderator
[5] = 1, -- Netfounder
[-1] =0, -- User
}
SendEvery = 1 ---- time in Mins
textfile = "massmessage.txt"
bot = frmHub:GetHubBotName()
hrs = 1000 * 60 * SendEvery
-------------------------------------------------------------
-------------------------------------------------------------
function Main()
SetTimer(hrs)
StartTimer()
end
function OnTimer()
local handle = io.open(textfile, "r")
if handle then
Temptimerfile = "\r\n"..string.gsub(handle:read("*a"),string.char(10), "\r\n")
for _,user in ipairs (frmHub:GetOnlineUsers()) do
if CanDo[user.iProfile]==1 then
user:SendPM(bot, Temptimerfile)
end
end
handle:close()
end
end
Then ->click here<- (http://forum.ptokax.org/index.php?topic=6313.0)
If u look the script above. I want something like that. But without timer ...
plz..
textfile = "unreg.txt" -- put the file into the scripts folder
function NewUserConnected(curUser)
if not curUser.bRegistered then
local f = io.open(textfile, "r")
if f then
local contents = "\r\n"..string.gsub(f:read("*a"),string.char(10), "\r\n")
curUser:SendPM(frmHub:GetHubBotName(), contents)
f:close()
end
end
end
That's all ;)
I hope this does what you want:)
--[[
Masser v1.0
???????????
CREDITS:
????????
Hungarista : for the Reading part of this script
RECENT CHANGELOG:
?????????????????
- None
]]--
Settings = {
["Botname"] = "Masser",
["Botdescription"] = "Masser script v1.0 by Newbie",
["Botemail"] = "Masser",
}
Textfile = "Mass.txt" -- The file wich will be send
function Main()
frmHub:RegBot(Settings["Botname"], 1, Settings["Botdescription"], Settings["Botemail"])
end
function NewUserConnected(User)
if not User.bRegistered then
local f = io.open(Textfile, "r")
if f then
local contents = "\r\n"..string.gsub(f:read("*a"),string.char(10), "\r\n")
User:SendPM(Settings["Botname"], contents)
f:close()
end
end
end
Quote from: Hungarista on 18 October, 2006, 20:01:14
textfile = "unreg.txt" -- put the file into the scripts folder
function NewUserConnected(curUser)
if not curUser.bRegistered then
local f = io.open(textfile, "r")
if f then
local contents = "\r\n"..string.gsub(f:read("*a"),string.char(10), "\r\n")
curUser:SendPM(frmHub:GetHubBotName(), contents)
f:close()
end
end
end
That's all ;)
Thnx ..:D
that the one I wnat it..
if I wanna send the messs in main ???
where I change it ??
curUser:SendPM(frmHub:GetHubBotName(), contents) .....to curUser:???
Quote from: osse on 19 October, 2006, 15:47:46
Thnx ..:D
that the one I wnat it..
if I wanna send the messs in main ???
where I change it ??
curUser:SendPM(frmHub:GetHubBotName(), contents) .....to curUser:???
Try to change it with : SendToAll(frmHub:GetHubBotName(), contents) -- Sends it to all users
or you can try to change it to : curUser:sendData(frmHub:GetHubBotName(), contents) -- Sends it to the user who connects
curUser:sendData(frmHub:GetHubBotName(), contents) -- Sends it to the user who connects
if I use the above commandline i got this message
Syntax ...0061016_1\ptokax\scripts\unregmess1.lua:16: attempt to call method 'sendData' (a nil value)
If you don't know the API, your best friend is the PtokaXwiki. Check this:
http://ptxwiki.psycho-chihuahua.net/doku.php/scriptinghelp/ptokaxapi#senddata_fromnick_data
So, you have to use curUser:SendData, because it is case-sensitive.
Quote from: Hungarista on 19 October, 2006, 18:42:15
If you don't know the API, your best friend is the PtokaXwiki. Check this:
http://ptxwiki.psycho-chihuahua.net/doku.php/scriptinghelp/ptokaxapi#senddata_fromnick_data
So, you have to use curUser:SendData, because it is case-sensitive.
I do not know..just wanna know how to send data in main....I got the answer how to send data in PM
Thnx for ur help
// B
Quote from: osse on 19 October, 2006, 19:27:57
I do not know..just wanna know how to send data in main....I got the answer how to send data in PM
Thnx for ur help
// B
You took the answer for the sending in main too .. look again at the post of Hungarista.
textfile = "unreg.txt" -- put the file into the scripts folder
function NewUserConnected(curUser)
if not curUser.bRegistered then
local f = io.open(textfile, "r")
if f then
local contents = "\r\n"..string.gsub(f:read("*a"),string.char(10), "\r\n")
curUser:SendData(frmHub:GetHubBotName(), contents)
f:close()
end
end
end
This works for me ;)
THNX it working now..
:D:D:D:D