Jump to content

Attack a player in a minigame


bogo

Recommended Posts

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?

Link to comment
Share on other sites

"*" 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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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