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.
Pages: 1
Detects magic count from a user.
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
why is that important?
I mean there's simply no reason to add it.
Offline
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
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
Offline
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
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.
Ingame: marten22 My steam: MartenM
Offline
Pages: 1
[ Started around 1733340104.8286 - Generated in 0.055 seconds, 12 queries executed - Memory usage: 1.46 MiB (Peak: 1.61 MiB) ]