Jump to content
Eternal Lands Official Forums
Sign in to follow this  
LabRat

sending multiple send_pm at once

Recommended Posts

I have tested something that occured to me - I can send multiline PMs in one go :pickaxe:

 

My only concern ius whether the server will see such things as spam or not.

 

pseudocode concept:

 

playername1 = "labrat"

message1 = "hiya Labby"

 

playername2 = "labrat"

message1 = "this is the second message"

 

send_to_server(SEND_PM + playername1 + message1 + SEND_PM + playername2 + message2)

 

really quite straightforward, and you aren't limited to 160 bytes for the combined messages (I think it will be 1024 max for all iirc)

 

Using multiline messaging would mean a substantial speed improvement when it comes to tasks such as inventory listings - sending 6 or more lines at once without the 1/7th second delay would make the bot appear much more fluid and less likely to get inventory listings broken up with spurious channel and/or local chat.

 

Is it acceptable to do this and if so what is the max packet length I can send to the server?

Share this post


Link to post
Share on other sites

I have tested something that occured to me - I can send multiline PMs in one go :)

 

My only concern ius whether the server will see such things as spam or not.

 

pseudocode concept:

 

playername1 = "labrat"

message1 = "hiya Labby"

 

playername2 = "labrat"

message1 = "this is the second message"

 

send_to_server(SEND_PM + playername1 + message1 + SEND_PM + playername2 + message2)

 

really quite straightforward, and you aren't limited to 160 bytes for the combined messages (I think it will be 1024 max for all iirc)

 

Using multiline messaging would mean a substantial speed improvement when it comes to tasks such as inventory listings - sending 6 or more lines at once without the 1/7th second delay would make the bot appear much more fluid and less likely to get inventory listings broken up with spurious channel and/or local chat.

 

Is it acceptable to do this and if so what is the max packet length I can send to the server?

The server should still boot you out for spamming even if you send only one tcp packet because it will still see the multiple PM's. The anti spamming feature is still needed for bots (people have broken their bots by accidents before).

Share this post


Link to post
Share on other sites

What is the specifics on the bot spam protection you just mentioned?

Is it possible to send 2-4 in one shot and then wait a moment and send 2-5 more?

 

Can we send other commands in batches like that?

I need to send multiple commands to get inventory item text to verify items for my bot. It seems buggy though. Kind of like the server is ignoring some of them.

Share this post


Link to post
Share on other sites

What is the specifics on the bot spam protection you just mentioned?

Is it possible to send 2-4 in one shot and then wait a moment and send 2-5 more?

 

Can we send other commands in batches like that?

I need to send multiple commands to get inventory item text to verify items for my bot. It seems buggy though. Kind of like the server is ignoring some of them.

Specifics aren't available.

 

The method I use to send inventory etc for my bots is any PM is added to a list, then at regular intervals I pull one PM from the list and send it. That way I don't have to worry about sending too much at once, and I just adjusted the send interval to a reasonable rate.

Share this post


Link to post
Share on other sites

I just (yesterday as it happens) rewrote my bot code to send all PMs in a separate thread, which is called every 150ms. From my experience the server doesn't like more than 7 messages a second from a client.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×