Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2015-04-25 05:10:43

Psychocrysma
Member
Joined: 2015-02-26
Posts: 46

Get Private Message data/Filter "say" to get private messages

Well, I kinda feel awful after realizing this after such a long time, but how do you get private messages and how do you distinguish them from normal chat messages? Is that even possible?

Also, if another person logged a bot in, will he be able to receive the message?

Offline

Wooted by:

#2 2015-04-25 05:15:56

Freckleface
Member
Joined: 2015-04-02
Posts: 1,364

Re: Get Private Message data/Filter "say" to get private messages

Normal messages will be like: name: message
Pms will be like: name > you: msg
Also there is a /r command that replays to latest pm
With boys you and the bot will get it. But since the bot is a... Bot, you will get it. And if u do not know how to pm I think you do it's /pm name message

You are welcome


F

Offline

Wooted by:

#3 2015-04-25 05:56:25

Psychocrysma
Member
Joined: 2015-02-26
Posts: 46

Re: Get Private Message data/Filter "say" to get private messages

Freckleface wrote:

Normal messages will be like: name: message
Pms will be like: name > you: msg
Also there is a /r command that replays to latest pm
With boys you and the bot will get it. But since the bot is a... Bot, you will get it. And if u do not know how to pm I think you do it's /pm name message

You are welcome

That's just obvious things. I'm talking about bot programming. There's nobody to thank here. If you are trying to be helpful, then you just failed.

Offline

Wooted by:

#4 2015-04-25 06:06:48

darkblades
Member
From: New MLG City/Weed Town
Joined: 2015-03-21
Posts: 122

Re: Get Private Message data/Filter "say" to get private messages

Pms are from case "write":
your m.GetString(0) = name > you
your m.GetString(1) = "some text"


Sample Text.

Doritos/Mountain Dew eater.
420 No scoping 69 scrubs per day
Always smoke weed everyday.

Known for: #getrekt Bot (possible revive with new stuff?)

Offline

Wooted by:

#5 2015-04-25 06:15:44, last edited by Psychocrysma (2015-04-25 06:16:44)

Psychocrysma
Member
Joined: 2015-02-26
Posts: 46

Re: Get Private Message data/Filter "say" to get private messages

darkblades wrote:

Pms are from case "write":
your m.GetString(0) = name > you
your m.GetString(1) = "some text"

If I understand correctly, m.GetString(0) contains the person's name and the " > you". Is that right?
Also, do bots with a different username than the PMed one receive the message from the server?

Offline

Wooted by:

#6 2015-04-25 08:26:13

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: Get Private Message data/Filter "say" to get private messages

Psychocrysma wrote:
darkblades wrote:

Pms are from case "write":
your m.GetString(0) = name > you
your m.GetString(1) = "some text"

If I understand correctly, m.GetString(0) contains the person's name and the " > you". Is that right?
Also, do bots with a different username than the PMed one receive the message from the server?

I don't think so, but if it does, it is ridiculous.


http://i.imgur.com/bjvgH5L.png?1

Offline

Wooted by:

#7 2015-04-25 10:55:50

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Get Private Message data/Filter "say" to get private messages

No, they don't.
And I usually use

if (e.GetString(0).Contains(" " + playerName + " "))
//...

Offline

Wooted by:

#8 2015-04-25 15:41:06

darkblades
Member
From: New MLG City/Weed Town
Joined: 2015-03-21
Posts: 122

Re: Get Private Message data/Filter "say" to get private messages

marcoantonimsantos wrote:
Psychocrysma wrote:
darkblades wrote:

Pms are from case "write":
your m.GetString(0) = name > you
your m.GetString(1) = "some text"

If I understand correctly, m.GetString(0) contains the person's name and the " > you". Is that right?
Also, do bots with a different username than the PMed one receive the message from the server?

I don't think so, but if it does, it is ridiculous.

It does, it has both name and you or you and name. its just like *system, *magic


Sample Text.

Doritos/Mountain Dew eater.
420 No scoping 69 scrubs per day
Always smoke weed everyday.

Known for: #getrekt Bot (possible revive with new stuff?)

Offline

Wooted by:

#9 2015-04-25 19:15:17

Psychocrysma
Member
Joined: 2015-02-26
Posts: 46

Re: Get Private Message data/Filter "say" to get private messages

Well, I'll just try it.

Offline

Wooted by:

#10 2015-04-25 19:58:07

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Get Private Message data/Filter "say" to get private messages

If den3107 were to pm the bot the message "Hello", the bot will receive "* den3107 > you: Hello" through the write event type thingy.

Offline

Wooted by: (2)

#11 2015-04-26 10:50:33, last edited by DarkDragon4900 (2015-04-26 10:51:02)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Get Private Message data/Filter "say" to get private messages

case "write":
    string playername = PlayerName(m);
    break;

public string PlayerName(PlayerIOClient.Message e)
{
    return e.GetString(0).Split(' ')[1];
}

Not sure if it works.

Offline

Wooted by:

#12 2015-04-26 12:16:53

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Get Private Message data/Filter "say" to get private messages

DarkDragon4900 wrote:
case "write":
    string playername = PlayerName(m);
    break;

public string PlayerName(PlayerIOClient.Message e)
{
    return e.GetString(0).Split(' ')[1];
}

Not sure if it works.

Try it out.
Though I think it should work.

Offline

Wooted by:
den31071430047013498879

Board footer

Powered by FluxBB

[ Started around 1732539735.757 - Generated in 0.061 seconds, 12 queries executed - Memory usage: 1.53 MiB (Peak: 1.7 MiB) ]