So you may have seen my previous thread about creating a Auto-targeting Bashing system? This post is me asking for help from others to enlighten me on what I'm messing up on.
First I want to explain what I'm trying to do. I am trying to create a targeting system that picks its targets from IH and clears the room of denizens if no other player is around.
My first attempt at scripting this went like this. Moving into a new room sent the IH command and from that IH command it triggered a script which killed the target. It worked well until I realized there are multiple targets in the same room but with different IDs needed to attack. At first I thought it wouldn't be a problem BUT after scripting a bunch areas and each target having its own trigger instead of sharing one RegEx it took me way longer than expected. So I opted for putting every target in the area on the same RegEx but soon I realized the I couldn't make it attack every single target on the RegEx due to having different IDs so no way around it. To make it worse I didn't save and losing most of my work I couldn't do every step over one by one again.
Then I thought of another way with the help of many people on how to do this.
When using IH it needs to compare what's in the room with a table. The table consist of descriptions of all denizens that you can kill. If something was not on the list it wouldn't get attacked and if it is it will be!
So what I need help with!
How do I use gmcp to check if there is a player in the room or not to activate the IH script?
How can I make IH compare what's in a room with the table?
The rest I believe I can handle...I think but if not I'll ask once more for help.
Please don't judge and say things like useless, don't need, and other things of the sort
I'm creating this on HTML5 because I feel there is a need for it and want to help other novices with it.
So if you can help it would be greatly appreciated. I'm new to HTML5 so I've been diligently working non stop trying to make things work and they did for a moment but now I realized how overly complicated it was and I'm asking the community to help me simplify it. I want to say thanks ahead of time and I appreciate any help and criticism because no matter what anyone says this is something I really want to accomplish.https://www.dropbox.com/s/fw63yi4z5t94s3g/AutoTargetSystem(Complicated).js?dl=0
a link to as what I was trying to do and you can see what I mean by overly complicated.