Jump to content

Recommended Posts

Posted

Hello everyone,

I need help with a script I found on the internet for auto target. It's working fine, but it targets any player in PvP, and I want to block certain classes. I added the condition and not ((User.ClassID = 27) or (User.ClassID = 103)) to the script, but after that, it doesn't target any class at all. I want it to target only specific classes defined in the script.

 

        if (user.DistTo(Char2) < radius_max)
        and not (char2.ismember)
        and not (char2.dead)
        and not (user.clanid = char2.clanid)
        and not ((User.ClassID = 27) or (User.ClassID = 103))
        and (char2.pvp) then 
        begin

Posted
if (user.DistTo(Char2) < radius_max)
and not (char2.ismember)
and not (char2.dead)
and not (user.clanid = char2.clanid)
and not ((char2.ClassID = 27) or (char2.ClassID = 103))  // Changed from User to char2
and (char2.pvp) then 
begin
    // Your code to target char2
end;

 

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


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock