TMN:Aseco Plugin Automatic Challenge Randomizer

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

Post Reply
User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

TMN:Aseco Plugin Automatic Challenge Randomizer

Post by mcm » 29 Sep 2007 16:11

It takes all challenges from the folder challenges\acr (which you have to create and fill with tracks) and generates new challengelists with some option settings (admin command /acr)
ingame help with "/acr help"
default settings (can be configured in plugin by dokumentation)
tracklist of 50 tracks will rotate 5 times only tracks with authortime <45 sec.

thx to
steffi.miric for basic idea
_milllan_ for advanced functions request

grabit at -> http://www.mcmweb.de/plugin/acr.zip

what to do:
go to your default tracks folder, create folder "challenges\acr",
copy all tracks you want to rotate in there, should be more than 150 to take effekt
, start aseco, go ingame, type /acr help to get information about finetuning,
make a new challengelist with /acr go
(i have set the atm to erase tracks with bad karma so after a while
there will be only good tracks in tracklists)
Last edited by mcm on 30 Sep 2007 10:24, edited 1 time in total.

User avatar
XXX.MAX
smooth traffic navigator
smooth traffic navigator
Posts: 191
Joined: 26 Jun 2006 12:23
Owned TM-games: TMS, TMN, TMU, TMH
Manialink(s): xxx
Location: WALES
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by XXX.MAX » 30 Sep 2007 08:59

Nice. Messed about with a little last night.
Now to explaing to admins what to do :roll:
Image
XXX Team Site: http://WALESXXX.awardspace.com
Stats site only on when I remember to fire it up

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by jouko100 » 18 Nov 2007 19:11

I like this plugin,but why /acr go in not admin command.It is not funny if you have spesial tracklist and someone mix it with /acr go

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by mcm » 19 Nov 2007 06:40

jouko100 wrote:I like this plugin,but why /acr go in not admin command.It is not funny if you have spesial tracklist and someone mix it with /acr go
/acr is a general admin command, all parameters bind to this command, that means that /acr go can be used only by an admin so if it mixes up the tracks the command was used by an admin or the automatic is enabled (by default enabled to generate new tracklists after all tracks are played 5 times)
if you dont want that, disable the acr after start ingame with /acr off (you can still generate new ones with /acr go)

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by Xymph » 19 Nov 2007 11:32

mcm wrote:
jouko100 wrote:I like this plugin,but why /acr go in not admin command.It is not funny if you have spesial tracklist and someone mix it with /acr go
/acr is a general admin command, all parameters bind to this command, that means that /acr go can be used only by an admin so if it mixes up the tracks the command was used by an admin or the automatic is enabled (by default enabled to generate new tracklists after all tracks are played 5 times)
if you dont want that, disable the acr after start ingame with /acr off (you can still generate new ones with /acr go)
I think what jouko100 means is that there's no check within the /acr command that the player executing it is an admin, so any player can run it and mess things up.

But this is easy to solve with the tiered admin system in v0.88+:

In adminops.xml after each of the <chat_jfreu> lines, add this line:

Code: Select all

<chat_acr>false</chat_acr>
And in plugin.acr.mcm.php after line 174, add this:

Code: Select all

  // check if chat command was allowed for admin
  if (!$aseco->allowAbility($login, 'chat_acr'))
  {
    // writes warning in console
    $aseco->console($login . ' tried to use /acr chat command (no permission!): ' . $command['params']);

    // sends chat message
    $aseco->client->query("ChatSendToLogin", $aseco->formatColors('{#error}You don\'t have the required admin rights to do that!'), $login);
    return false;
  }
Now only the masteradmin can run /acr (and admins too if you set their chat_acr ability to true). Hope that helps,
Xymph
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by mcm » 19 Nov 2007 12:03

Xymph wrote: I think what jouko100 means is that there's no check within the /acr command that the player executing it is an admin, so any player can run it and mess things up.
strange! i thought that the definition of the chatcommand itself declares it as an admin command (or did i missunderstand the manual)
thats the chatcommand:
Aseco::addChatCommand('acr', 'Automatic Challenge Randomizer /acr help for details', true);

the ",true" should declare it as an admin command (so it was in v.0.61b, dont know what it does in v.0.8+ because i dont play aseco anymore)

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by Xymph » 19 Nov 2007 12:27

mcm wrote:
Xymph wrote: I think what jouko100 means is that there's no check within the /acr command that the player executing it is an admin, so any player can run it and mess things up.
strange! i thought that the definition of the chatcommand itself declares it as an admin command (or did i missunderstand the manual)
thats the chatcommand:
Aseco::addChatCommand('acr', 'Automatic Challenge Randomizer /acr help for details', true);

the ",true" should declare it as an admin command (so it was in v.0.61b, dont know what it does in v.0.8+ because i dont play aseco anymore)
It means the same thing in v0.61 and the v0.8+ series: that the command is shown in the /admin help list instead of the /help list with user commands. It doesn't have anything to do with a player's ability to invoke a command, that's why at the beginning of the chat_admin function (in both v0.61 and v0.8+) there is a test what status the player has before being allowed to run the /admin command. A similar test now happens in v0.88+ anywhere an admin has special abilities that users don't.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by mcm » 19 Nov 2007 15:29

jouko100 wrote:I like this plugin,but why /acr go in not admin command.It is not funny if you have spesial tracklist and someone mix it with /acr go
ok thanks to xymph :lol: i have updated the plugin to be admin only :lol: download a fresh copy and hf.

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by jouko100 » 19 Nov 2007 19:28

Thanks it is working now.Is it possible to include this plugin to aseco 0.8x

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by Xymph » 19 Nov 2007 21:13

jouko100 wrote:Thanks it is working now.Is it possible to include this plugin to aseco 0.8x
No, as mentioned twice in the v0.84 thread and again in the v0.88 thread, I can't do that. :P
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Automatic Challenge Randomizer

Post by Xymph » 19 Nov 2007 21:19

mcm wrote:
jouko100 wrote:I like this plugin,but why /acr go in not admin command.It is not funny if you have spesial tracklist and someone mix it with /acr go
ok thanks to xymph :lol: i have updated the plugin to be admin only :lol: download a fresh copy and hf.
Warning: the way you did it will work fine in pre-v0.88 releases, but with the tiered admin system in v0.88+ the masteradmin will not be able to use the command unless he's also included in the admins list. That's because the $aseco->isAdmin() function strictly checks for admins only, and to check for masteradmins you need to use the $aseco->isMasterAdmin() function too. Eg:

Code: Select all

if (!$aseco->isMasterAdmin($admin->login) && !$aseco->isAdmin($admin->login)) {
Or alternatively use the code I provided earlier, based on $aseco->allowAbility() and an extra adminsops.xml entry to make it fully compliant with the tiered admin system.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Post Reply