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 2018-05-13 10:11:50

Nebula
Guest

[Suggestion] Magic Count Detector

Detects magic count from a user.

#2 2018-05-13 10:19:06

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Suggestion] Magic Count Detector

What do you mean by magic count?

Offline

Wooted by: (2)

#3 2018-05-13 15:17:36

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

Re: [Suggestion] Magic Count Detector

Amount of magic items a person got?

Over what timespan?
Ever? In your world while your bot was on? In any world while your bot is on?

Offline

Wooted by:

#4 2018-05-13 15:47:34

Offensive Ray
Formerly omarabdulhaq
From: Mars
Joined: 2016-03-22
Posts: 768

Re: [Suggestion] Magic Count Detector

why is that important?
I mean there's simply no reason to add it.

Offline

Wooted by: (2)

#5 2018-05-13 17:52:07

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,211

Re: [Suggestion] Magic Count Detector

I am really not sure what you mean.
What magic count? We don't record player's total magic count.

If you want to detect player getting magic you get get it from "info" message with "* MAGIC" prefix

Offline

#6 2018-05-15 20:23:12, last edited by Latif (2018-05-15 21:04:39)

Latif
Member
From: The Netherlands
Joined: 2015-03-13
Posts: 1,206

Re: [Suggestion] Magic Count Detector

I guess he means that Gosha, not sure too. I made an example how you can use info to detect magic:

if (m.Type == "info") //or case..
{
    if (m.GetString(0).StartsWith("* MAGIC"))
    {
        string username = m.GetString(1).Split(' ')[0]; //player who got magic, it's always the first word of the message
        //you can also check what the player got by checking the string
        if (m.GetString(1).Contains("magic brick"))
        {
            //player got magic brick
        }
        else if (m.GetString(1).Contains("10 total energy"))
        {
            //player got +10 energy
        }
        else if (m.GetString(1).Contains("a witch"))
        {
            //player got the witch smiley
        }
    }
}

If you mean getting someone's max energy you can use the database for that. It's one simple line:

int energy = Convert.ToInt32(database.Load("PlayerObjects", "simple1328100395885x61")["maxEnergy"]);

"simple1328100395885x61" is the unique id you can get from the "add" message. (it's my unique id btw)

If you want to access the database everywhere in your code (edit: I mean your class ofc) you have to add a public variable and define it when connecting your bot (just like client and connection):

public BigDB database;

//when connecting the bot add this line before sending "init"
database = client.BigDB;

11/10 quality post no thanks

Offline

Wooted by: (2)

#7 2018-05-17 05:23:43

Mait
Member
From: Estonia
Joined: 2015-08-10
Posts: 516

Re: [Suggestion] Magic Count Detector

I'm pretty sure he means how many people got magic in your world


Mait.jpg
Let's get to 5000.

Offline

#8 2018-05-17 22:09:20

Offensive Ray
Formerly omarabdulhaq
From: Mars
Joined: 2016-03-22
Posts: 768

Re: [Suggestion] Magic Count Detector

Mait wrote:

I'm pretty sure he means how many people got magic in your world

He means the sum of magic +energy the player has collected.

Offline

#9 2018-05-18 11:03:11

MartenM
Member
From: The Netherlands
Joined: 2016-03-31
Posts: 978
Website

Re: [Suggestion] Magic Count Detector

Oray wrote:
Mait wrote:

I'm pretty sure he means how many people got magic in your world

He means the sum of magic +energy the player has collected.

So, just count the magic smileys and blocks a player has?
You cannot get the amount of magic gotten from energy since you do not know if he got it by 1+, +10 or +15.


lm3hgg8.jpg

Ingame: marten22        My steam: MartenM

Offline

MartenM1526637791706743

Board footer

Powered by FluxBB

[ Started around 1733300493.2409 - Generated in 0.244 seconds, 13 queries executed - Memory usage: 1.46 MiB (Peak: 1.61 MiB) ]