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.

Advertisement

Hello, visitor! These forums are run off of the revenue generated from these ads. If you'd like to support us, please whitelist us or consider donating:

#1 2018-05-13 10:11:50

Subzero
Member
From: hhgregg
Joined: 2018-04-25
Posts: 3,948

[Suggestion] Magic Count Detector

Detects magic count from a user.


diff merge my 4k posts already

Offline

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

LukeM
Formerly destroyer123
From: England
Joined: 2016-06-03
Posts: 1,838
Website

Re: [Suggestion] Magic Count Detector

What do you mean by magic count?


- Luke Miles

Offline

Wooted by:

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

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 942

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?


Current project: Thinking of/finding/requesting projects...
?type=registered&name=den3107     ?type=itemsbought&name=den3107
user.php?id=den3107&hideoffline=true    user.php?id=den3107bot&hideoffline=true

Offline

Wooted by:

HG

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

Oray
Formerly omarabdulhaq
From: Mars
Joined: 2016-03-22
Posts: 698

Re: [Suggestion] Magic Count Detector

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

Offline

Wooted by:

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

Gosha
Dev Team
From: Russia
Joined: 2015-03-15
Posts: 5,137

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

Latif
Member
From: The Netherlands
Joined: 2015-03-13
Posts: 978

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

Last edited by Latif (2018-05-15 21:04:39)

Offline

Wooted by:

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

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

Re: [Suggestion] Magic Count Detector

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


Mait.jpg

Boi i really like bears

Offline

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

Oray
Formerly omarabdulhaq
From: Mars
Joined: 2016-03-22
Posts: 698

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: 756
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 1526948361.8579 - Generated in 0.050 seconds, 12 queries executed - Memory usage: 1.25 MiB (Peak: 1.39 MiB) ]