PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Spudman on 06 January, 2004, 23:48:51

Title: HELP - With PMs
Post by: Spudman on 06 January, 2004, 23:48:51
Anyone know this one, got me stuck.....

I am running a script that sends a PM on entering hub, now I know this works as I have been in a test hub running same software and was sent the PM, however in my hub the PM comes up in main, not a new window, I figure it must be in my settings somewhere (Ptokax) but cant find anything anywhere??

Does anyone know how to solve this problem?

Thanks

Spud
Title:
Post by: BlazeXxX on 06 January, 2004, 23:57:10
Its not in ptokax, its in ur client ! Tick this option or smilar one and it shud give it in private window..

"Popup Private messages from users who are not online"

Something smilar will do... If it still doesn't work, then try my script..

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

function NewUserConnected(curUser)
readfrom("Welcome.txt")
local message = ""
while 1 do
local line = read()
if (line == nil) then break else
message = message..line.."\r\n"
end
end
curUser:SendPM(Bot,message)
end

--You need to have a txt file called Welcome.txt in the scripts dir
Title:
Post by: Spudman on 07 January, 2004, 09:35:10
Thanks BlazeXxX

But why would it work in one hub, but not the other, when using the same client for both?

Also I would use the script, but this only gets sent to unregged, so is alot of hassle to change =)

Thanks anyway

Spud
Title:
Post by: B@B? on 07 January, 2004, 09:45:10
QuoteOriginally posted by BlazeXxX
Its not in ptokax, its in ur client !

Tick this option or smilar one and it shud give it in private window..

"Popup Private messages from users who are not online"

Plz excuse my english but isn?t:

The answere in the text above?...!  ;)
Title:
Post by: c h i l l a on 07 January, 2004, 09:57:47
if you have your bot regged and your client is set to pop up PM's and still the PM comes in Main then

the only reason is that when your script sends the PM on UserConnect it doesn't see the bot.
To bypass that problem, send either a $Hello |
to the client, or a $MyINFO  of the bot to the client on Connect before you send the PM that way you make sure, the client, sees the bot, before getting its message.
Title:
Post by: Spudman on 07 January, 2004, 14:38:41
Thanks alot Chilla,

But can ya explain to me a bit more, not sure I understand you...

Bot is regged, I think, have entered Bot name in Ptokax to reg at start of serving......

And the PM comes up in main, then I am lost =P

Spud
Title:
Post by: pHaTTy on 07 January, 2004, 14:41:21
try adding something like

Bot = frmHub:GetBotName()

and if reg from the hub that shud work if i understand correctly
Title:
Post by: c h i l l a on 07 January, 2004, 15:07:04
well.. thing is, I don't know how ptokax does it, but,

a user connects after finishing the login, that is after I think sending the MyInfoString.

okey but when the hub is full..  or not full dunno,

well anyways I think ptokax sends a the oplist, and in that list there are the bots, but sometimes it happens the client gets the PM of the bot before th OP list, so then is doesn't see the bot as client, and alsways shows its message in main.
and when, you send Myinfo or a Hello to the client, before the PM you only make sure that the client, sees the bot , before he gets the PM.

so you could also send a $OPList  or something.
Title:
Post by: Spudman on 07 January, 2004, 18:08:39
Ok, thanks for ya help but you have confused me =S

But I have passed it on to someone who can make sense of it all =D

Thanks alot

Spud
Title:
Post by: BlazeXxX on 08 January, 2004, 03:30:51
No prob spudman ! If u can explain a bit on which hubsofts using and the unreg bit.

The script i posted sends to everyone except ops and above... It works fine for me in all hubs.

Please let me know what version of ptokax u using in both hub?

If u need furthur help on this, i will help ya :)