Author Topic: Expanding on the 2nd param for Can Target.  (Read 2157 times)

0 Members and 1 Guest are viewing this topic.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Expanding on the 2nd param for Can Target.
« on: June 20, 2013, 11:20:19 PM »
As stated in this thread: http://forums.ulyssesmod.net/index.php/topic,5346.0.html

You can add a 2nd parameter for targeting groups.

What I want is: Superadmins can target Superadmin and all under superadmin. Superadmins can not Target the Owner (higher rank) and can not target themself.

So I did this: " ulx setgroupcantarget superadmin !%owner,!^ "

The "^" stands for the person who wrote the command
The "!" stands for not
"!^" means for me: NOT me

It does not work so can someone help me out in this please?

As stated in that post you can not do the following ulx setgroupcantarget superadmin !%owner,!^.

How ever I was thinking would you be able to do this ulx setgroupcantarget superadmin !%superadmin assuming that owner is above superadmin by inheritance. Thus effectively making it so superadmins can not target them selves or the owner?

In addition to my previous statement assuming that your ranks are set like so user, respected, operator, admin, superadmin, owner by order of inheritance.

Would you be able to do this ulx setgroupcantarget operator !%respected,#admin to make the group able to target users and admins only?

I think ULX needs a symbol to be able to connect things as and maybe a + sign? So that admins can simply do ulx setgroupcantarget superadmin !%owner+!^.

If the above seems confusing, that's because I was confused when writing it.
« Last Edit: June 21, 2013, 12:40:33 AM by HeLLFox_15 »
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Expanding on the 2nd param for Can Target.
« Reply #1 on: June 23, 2013, 08:33:13 AM »
As stated there, the comma is a union operator, so you can't allow a group to target others in the group but not themselves. You're proposing the addition of an intersection operator. But again, it would require creating a parser with associated grammar and order of operations (in other words, way too much overhead for this feature).

Why is a parser required? Well, what does #admin,#operator+^ mean? Does it allow the targeting of admins and yourself as long as you're an operator, or does it allow the targeting of yourself as long as you're an admin or an operator? Parsers are responsible for resolving these ambiguities.
Experiencing God's grace one day at a time.