Jump to content
SubSpace Forum Network

Recommended Posts

Posted

As requested by L.C.

 

ShipRestrict 1.0

 

This plugin allows you to restrict some ships to people who

meet specified conditions.

 

Available conditions:

-Sysop only (Only checks bot op level for now; >= 4)

-Top scorer only

-Minimum X kills

-Minimum X points

 

You can customize the message sent to the players when they attempt to use an unavailable ship.

 

See shiprestrict.ini for more information about settings.

 

 

 

-----

This plugin could easily be expanded to add more conditions like freqs, maximum number of the same ship in the team, etc...

 

I tested it a bit, but there might be some stupid bugs, I've done this yesterday night while being very tired + finished it up in the last hours

 

Actually, the longest part was to code a replace function for strings blum.gif The only existing one I could find was with the 'string' class, and didn't seem to do what I really wanted it to.

ShipRestrict_1.0.zip

Posted

Hehe thanks Samapico! :D This is what I'm using for my shiprestrict.ini (just for no reason blum.gif ):

[Messages]
SysopOnly=Only zone SysOps are allowed to use the "SysOp Ship," or Shark (%ship%).
TopScoreOnly=You cannot use the Nightwasp (%ship%) because you are currently not the arena's highest scorer (points).
MinKills=You need at least %min% kills to use this ship
MinPoints=You need at least %min% points to use this ship

[Ship1]

[Ship2]

[Ship3]

[Ship4]

[Ship5]

[Ship6]

[Ship7]
TopScoreOnly=1

[Ship8]
SysopOnly=1

 

Going to try to debug the plugin though.

Posted

What it should do (in details)

 

When switching to a ship that is not available to you, it first checks if your older ship was available (in case you're not the top scorer anymore, for example, or just started the plugin), if it is available, switches you back to it. If not, it checks if any ship is available (from WB to Shark), it puts you in the first available ship it finds. If no ship is available, it puts you in warbird.

If you were in spec when trying to enter in a restricted ship, it puts you back in spec.

 

It should also work when entering arena. If the ship you're trying to enter arena with is not available for you, it switches you to warbird, or something like that (too lazy to check)

 

If there are more than one requirements you don't meet at one time, there will still be only 1 message.

Posted (edited)

I think instead of setting you as a Warbird if you had no previous ship, it should set you as Spectator mode. It would only make more logical sense, as there is an arena setting where it would have players in spectator mode by default.

 

You see, if the Warbird had restrictions and the player wasn't allowed to use it, then what ship would they be placed as? Spectator mode is always available and free for everyone to be a part of..

 

Oh, that just gave me an idea. That would be interesting if you could also set these options for Spectator mode. >:] For example, Sysops being the only ones allowed in Spectator mode, or being required to have a minimum of x points or kills to be allowed into Spectator mode. That could really motivate some people to play. :D

 

EDIT :: This plugin could easily be broken like this in its own mess. :\ It would be realli nice if spectator mode could be customized too, but then if you do that, you have to set some limits -- cause what if nobody met the standards or qualifications for anything? What if you had to be a sysop to do anything? (Hahaha.) Perhaps as a total failure option the bot could put the player on frequency 10000 or -1 (possible?) and let one of the bot operators know that their is a conflict in the ShipRestrict.ini.

Edited by L.C.
Posted

Yeah, I'm aware of that... but I doubt anyone needs to restrict all 8 ships... it would totally suck, wouldn't it? blum.gif If you don't want people to play in your arena, don't make an arena, simple as that. If someone is not allowed on any ship at one point, he will never be allowed in any ship by staying in spec.

 

Forcing people out of spec is kind of nazi lol... could be done... but what about people using chat clients? These go back in spec if you set them to a ship.

 

Yes these are pretty much the limits of the plugin, but I doubt anyone will ever need to go anywhere near that limit... if they do, well they'll contact me blum.gif

Posted
If you don't want people to play in your arena, don't make an arena, simple as that
Haha, good arguement.:D

 

Forcing people out of spec is kind of nazi lol... could be done...
But for the sake of potential and flexibility? :o

 

but what about people using chat clients?
Subchat requires VIP access at the minimum. Starlight is unique though, because it has no *tinfo (or *info) and a MacID of 1 or something. To prevent having to update the bot plugin constantly over time, it should be definable through ShipRestrict.ini so that that file could be modified over time as Subchat/Starlight changes. Basically a whitelist; regardless of status (ie. being sysop or just a regular player) and score these kind of people will be exempt.

 

Somehow a whitelist should be developed in this case. Do Starlight users appear as ships if they were taken out of spectator mode? O_o

Posted

Starlight users put themselves back in spec after a split second.

 

But I still don't see how you'd recognize chat client users

 

It's not worth it :D

Posted (edited)
It's not worth it wink.gif
But not every zone has chat clients. Again, being able to do stuff to spectator mode is just an additional feature and flexibility. For anyone that could find an excellent use of it, they should at least be allowed to do so and be the least limited by opinions that influence the plugin from being as flexible as possible. blum.gif

 

EDIT :: In that case, Snrub and Admiral Kirk/Freak should add a sort of identifier. For example, if you private message that client something like ?cversion (and plainly, any text or spaces after it would omit it from being a command) could return a "Yes" or something. If that could be programmed into both chat clients, then it could make certain development easier.

 

By the way, irrelevant to that -- Sysops only, is that Zone and Bot Sysops or is it only Bot Sysops or only Zone Sysops? (Could be another thing you could add. blum.gif In that case, you could have something for the Bot and the Zone. For both, you can set it as a number: 0 for regular player, 1 for VIP, 2 for Moderator, 3 for Super Moderator, 4 for Sysop, 5 for Arena Owner; and 0 through 12 for Bot operator access levels).

 

MinBotAccess=4 (I think that's Sysop atleast)

MinZoneAccess=4

Edited by L.C.
Posted
EDIT :: In that case, Snrub and Admiral Kirk/Freak should add a sort of identifier. For example, if you private message that client something like ?cversion (and plainly, any text or spaces after it would omit it from being a command) could return a "Yes" or something. If that could be programmed into both chat clients, then it could make certain development easier.
So every normal player would receive these weird text commands? blum.gif

 

For now, for simplicity's sake I just made it so SysopOnly means 'those with sysop-level bot access'

 

And I won't do that spectator thing until someone asks for it... I gave the source, if someone wants to add stuff, have fun. But I have plenty of other projects blum.gif

Posted
So every normal player would receive these weird text commands? tongue.gif
Remember, that was partially an irrelevant thought. :D If Chat clients could be filtered out, then zone owners whose standards are foolishly too high when it comes to which people should be playing wouldn't have to worry about it. I certainly don't worry too much about it.

 

For now, for simplicity's sake I just made it so SysopOnly means 'those with sysop-level bot access'
Well it would be nice, because I completely disagree with the idea that all zone sysops should also have bot operator access. Only the people that actually need it should have bot operator status. You see, some sysops are irresponsible enough that giving them bot operator access would be a bad idea, even though they are at least responsible enough to be a zone sysop.

 

 

And I won't do that spectator thing until someone asks for it... I gave the source, if someone wants to add stuff, have fun. But I have plenty of other projects tongue.gif
Is it that hard, honestly? blum.gif

 

And if you do bring this up, you would be right Samapico. You didn't have to make this plugin -- not at all. You probably (from my point of view) did it out of some love for Subspace and some sheer boredom. For that reason, I cannot require or force you to do anything of the above. Thank you for making the plugin, Samapico. smile.gif That will be all.

Posted

It wouldn't be hard at all, no, but I have a lot of work to do for 17th Parallel, and have several unfinished projects that I would prefer spending time on. I encourage any other developer to expand this plugin, though... The code should be clear enough to be understood by anyone. I agree that it would be much better if it read the sysop.txt file, but then again, it's a bit more complicated. Also, the plugin lacks an interface to read/change settings in the .ini from ingame... I might make a general template for an interface like this later, and at that point I might apply it to the plugin, but for now it's no priority.

 

Enjoy smile.gif

Guest
This topic is now closed to further replies.
×
×
  • Create New...