Jump to content

Attack a player in a minigame


Recommended Posts

Posted

I want to make a castle wars script that can attack any nearby players from the opposite team. Is this supported? I can only find the "attack nearest player" in the wilderness menu but that doesn't work for me in the castlewars game. 

Does "interact with player" / "Attack" work for this? If so what would I put as name/ID? 

Has anyone made an LMS script where the same principle applies?

Posted

"*" works, however it will try to attack anyone including members of my team. 

Any idea how to make it only attack members of the opposite team? I've managed to make a boolean to identify whether I have a sara or zamorak cape based on the cape ID numbers, however I can't find out how to make it only attack a player with a certain team cape. Thanks for helping

Posted
On 10/28/2023 at 5:00 AM, bogo said:

"*" works, however it will try to attack anyone including members of my team. 

Any idea how to make it only attack members of the opposite team? I've managed to make a boolean to identify whether I have a sara or zamorak cape based on the cape ID numbers, however I can't find out how to make it only attack a player with a certain team cape. Thanks for helping

I don't know jack about scripting, just a lurking man with a bit of logical knowledge.

 

Seems like you need the bolean to check for the cape first. Does player have Zammy cape? If No, search again, if Yes, Go-to Attack player action

Posted

I've set up a boolean to determine which team i'm in based on my cape. The script then recognises if there is a player in the area with the opposite team cape -> if yes, Attack nearest player.

Only problem is, if there are multiple players in the area and the closest player is from my own team then it will try to attack my own team.

Any suggestions? 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...