What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

How to know if I'm the target of someone

LordManzana

New Member
Joined
May 2, 2015
Messages
207
Reaction score
0
Hello!

I want to know if it's possible to know if I'm targeted by someone around me. I checked the events, and exist one named onTargetChanged, but means the target of my target.

In settings exist the option "Play sound when someone target you" so, how can I reproduce it?

Thanks!
 
Hello!

I want to know if it's possible to know if I'm targeted by someone around me. I checked the events, and exist one named onTargetChanged, but means the target of my target.

In settings exist the option "Play sound when someone target you" so, how can I reproduce it?

Thanks!

Hey! I don't think there's a direct way of doing that, you could do though -> Get nearby players -> Check their targets -> If anyone's target's you // do

Hope that helps :)
 
Hey! I don't think there's a direct way of doing that, you could do though -> Get nearby players -> Check their targets -> If anyone's target's you // do

Hope that helps :)

I'm trying to find how get near player in API, filtering by "player" but 0 results found. Know the exactly function?
 
I'm trying to find how get near player in API, filtering by "player" but 0 results found. Know the exactly function?

This is how you can do it:

getCreatures().FindAll(d => d.type == BotTypes.Player);
 
onTargetChanged
Occurs when obj1 change target for obj2 (or for null)

So you can easly check that obj1 change target for obj2 == me
Code:
if (obj1.type == BotTypes.Players && obj2 == me)
 PlayAlarm();
 
Thank you very much as this saved me from writing the same exact post as LordManzana posed. However I have an extension of his question. If someone is targeting you can you detect if he is casting the skill "Report: Unauthorized Program"?
 
You think that would be more effective than scanning for players nearby such like...

Code:
while (GetGroupStatus("Anti-Bot Detection"))
            {
                List<Creature> players = getCreatures().Where(c => c.type == BotTypes.Player && c.target == me && c.isCasting).ToList();

                foreach (Player p in players)
                {
                    if(getSkill(p.castSkillId).name.Contains("Report"))
                    {
                        Log("Detecting player reporting you. Terminating Client.");
                        TerminateGameClient();
                        SetGroupStatus("Anti-Bot Detection", false);
                    }
                }
            }



EDIT: This will not work. The report skill is instant cast, so basically even OnSkillCasted will probably not work. I think the best option is to just automatically go remove the debuff afterwards.
 
Last edited:
You think that would be more effective than scanning for players nearby such like...

Code:
while (GetGroupStatus("Anti-Bot Detection"))
            {
                List<Creature> players = getCreatures().Where(c => c.type == BotTypes.Player && c.target == me && c.isCasting).ToList();

                foreach (Player p in players)
                {
                    if(getSkill(p.castSkillId).name.Contains("Report"))
                    {
                        Log("Detecting player reporting you. Terminating Client.");
                        TerminateGameClient();
                        SetGroupStatus("Anti-Bot Detection", false);
                    }
                }
            }



EDIT: This will not work. The report skill is instant cast, so basically even OnSkillCasted will probably not work. I think the best option is to just automatically go remove the debuff afterwards.

This your code there is pretty much no chance you detect an instant cast. Try the event instead.
 
Back
Top