[XAseco] Lottery Plugin

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Dr. Kaputnik
cyclist
cyclist
Posts: 49
Joined: 24 Sep 2007 21:05
Owned TM-games: TMO, TMS, TMNF, TMUF

[XAseco] Lottery Plugin

Post by Dr. Kaputnik » 22 May 2009 16:22

Hi all,

I just finished a lottery-plugin for XAseco. It is based on Mistrals lottery and will select a random player at the end of the race. It will only pay to players who finished the track at least once. The more often a player finishes, the higher his/her winning chance will be.

You can set a minimum number of finishes and/or players needed for the lottery to pay, so no single player alone can take all of your server coppers.

There's also a possibility to exclude players from being paid out, this is meant especially for admins who don't want to win at their own lottery.

Download the plugin here.
(tested under XAseco v1.06)

For installation and configuration details, please take a look at the readme.txt in the zip-file.

Note:
Lottery will automatically pay amounts which are dividable by 5. The minimum amount that will be paid is 5 coppers.

Pesky
smooth traffic navigator
smooth traffic navigator
Posts: 262
Joined: 19 Mar 2008 16:25
Owned TM-games: TMN, TMUF
Manialink(s): rrmania
Contact:

Re: [XAseco] Lottery Plugin

Post by Pesky » 23 May 2009 08:08

testing it on one of our Server. Seems to work fine so far.

User avatar
ЭΛ GAS〄SőŁのเē尺
sunday driver
sunday driver
Posts: 55
Joined: 17 Jul 2009 17:37
Owned TM-games: TMU, TMO, TMS ,TMNF
Manialink(s): elteam,or elt for the bored people :P:P

Re: [XAseco] Lottery Plugin

Post by ЭΛ GAS〄SőŁのเē尺 » 18 Jul 2009 07:08

Nice!
Image
ЭΛTEAM SERVERS:
ЭΛ UNITED 80-100K
ЭΛ UNITED PRO 60-90K
ЭΛ CLASSICO 0-60K
ЭΛ MINI RPG 0-50K
ЭΛ PARANIA RPG 0-50k
ЭΛ PRIVE 0-50k (LOCKED)
Enjoy our servers and also visit our Site : http://elteam.ath.cx

vineeth.h
happy cruiser
happy cruiser
Posts: 116
Joined: 09 Mar 2009 09:47
Owned TM-games: TMUF

Re: [XAseco] Lottery Plugin

Post by vineeth.h » 18 Jul 2009 12:39

Excellent work! Thanks man!
Owner of lllllNASCAR 80K
Join my server : NASCAR 80K

Image
Image

raszkolnyikov
cyclist
cyclist
Posts: 31
Joined: 20 Mar 2009 22:44
Owned TM-games: 2x TMU, TMUF, TM2

Re: [XAseco] Lottery Plugin

Post by raszkolnyikov » 25 Jul 2009 12:12

Very nice plugin.

Pls help how to set it to pay 10-30 coppers!

I thought i set it well but it keep paying the max value every time.

So if i have 20000 coppers, then i have to set the winpercentage to 0?

dago
sunday driver
sunday driver
Posts: 61
Joined: 20 Feb 2009 18:43
Owned TM-games: tmuf

Re: [XAseco] Lottery Plugin

Post by dago » 25 Jul 2009 13:24

From the txt file that comes with the plugin

<winpercentage>2</winpercentage>
Determines how much percent(%) of your server coppers can be won each race. Values from 0 to 100 should be used here^^.

<maxwin>100</maxwin>
You can limit the amount of coppers that can be won each race.

<minwin>30</minwin>
Yan can also set a minimum amount.

<payalways>2000</payalways>
If your server has enough coppers available, the lottery will be paid after every race.
This setting will determine from which server coppers amount the lottery will always pay.

<pay50chance>1000</pay50chance>
If the coppers are getting low, there will be a 50% chance for the lottery to pay. If it's getting even lower, the chance will decrease to 25%.
50% chance will take effect when your server coppers amount is between the values for <payalways> and <pay50chance>.
25% chance will take effect below the <pay50chance> value.

<finishminplayers>16</finishminplayers>
This will set the minimum number of finishes needed for the lottery to pay. During a race a player finishes more than once, often up to four times or more, depending on the time limit or the number of rounds (and the map of course).
Use higher values here if you want the players to work harder for their coppers ;)
Players finishing more often during a race will have a higher change of winning the lottery.

<onlineminplayers>4</onlineminplayers>
Set the minimum number of players that need to be on your server for the lottery to pay.
join VITAMINEC
Servermania V 0.98
xaseco 1.10

raszkolnyikov
cyclist
cyclist
Posts: 31
Joined: 20 Mar 2009 22:44
Owned TM-games: 2x TMU, TMUF, TM2

Re: [XAseco] Lottery Plugin

Post by raszkolnyikov » 25 Jul 2009 18:41

Ive already read that :roflol:

Seader
road tourist
road tourist
Posts: 104
Joined: 30 May 2007 12:28
Owned TM-games: TM, TMS, TMUF

Re: [XAseco] Lottery Plugin

Post by Seader » 25 Jul 2009 19:11

then, what's the problem? :D use maxpay 30 and minpay 10; you could set percentage to 50% in my behalf :D these two settings will limit the payout.

raszkolnyikov
cyclist
cyclist
Posts: 31
Joined: 20 Mar 2009 22:44
Owned TM-games: 2x TMU, TMUF, TM2

Re: [XAseco] Lottery Plugin

Post by raszkolnyikov » 25 Jul 2009 19:44

Maybe i misunderstood the readme. Soo:

Is winpercantage is the first way to set how many coppers I want to be paid and minmax is the second?

I let the percentage on 2. I read it as if this value would be the max copperpay counted from the total amount of available coppers. So, im lame, but i'll try with 50 and see what happens^^

But if u have a more detailed suggestion feel free to share it with me^^ :1

actual setting:

Code: Select all

<winpercentage>2</winpercentage>
	<maxwin>30</maxwin>
	<minwin>10</minwin>
	<payalways>2000</payalways>
	<pay50chance>1000</pay50chance>
	<finishminplayers>16</finishminplayers>
	<onlineminplayers>4</onlineminplayers>
	<ignoredplayers>
		<ignoredlogin>player1</ignoredlogin>
		<ignoredlogin>player2</ignoredlogin>
		<ignoredlogin>playerx</ignoredlogin>
	</ignoredplayers>
	<ignoredretries>5</ignoredretries>

dago
sunday driver
sunday driver
Posts: 61
Joined: 20 Feb 2009 18:43
Owned TM-games: tmuf

Re: [XAseco] Lottery Plugin

Post by dago » 26 Jul 2009 11:54

The way i understand it is;

The lottery will pay <maxwin>30</maxwin>
until <winpercentage>2</winpercentage> is less than 30
ie 1400 coppers in server * 2% = 28, so 25 will be payed
until <minwin>10</minwin> is reach.

also <payalways>2000</payalways> if the server has over 2000 coppers lottery will pay every race and if <pay50chance>1000</pay50chance there is less than 2000 coppers in server lottery will pay 50% of races and less than 1000 coppers im server will pay 25% of races

Dan
join VITAMINEC
Servermania V 0.98
xaseco 1.10

Dr. Kaputnik
cyclist
cyclist
Posts: 49
Joined: 24 Sep 2007 21:05
Owned TM-games: TMO, TMS, TMNF, TMUF

Re: [XAseco] Lottery Plugin

Post by Dr. Kaputnik » 27 Jul 2009 12:48

Yes dago, that's how it works.

@raszkolnyikov:
<minwin> will override the <winpercentage> if <winpercentage> is set too low.
e.g.: <winpercentage> is 1%, servercoppers is 2000 -> lottery will pay 20 coppers
if you set <minwin> to 30, lottery will pay 30 coppers (<maxwin> must then be set to 30 or higher to make sense^^)

Panther107th
wheelbarrow operator
wheelbarrow operator
Posts: 19
Joined: 26 Nov 2008 12:29
Owned TM-games: TMU
Manialink(s): SkinMania
Location: Zutphen, NL
Contact:

Re: [XAseco] Lottery Plugin

Post by Panther107th » 28 Jul 2009 09:48

pretty nice plugin, would be even greater if you can add a feature that makes it possible to pay coppers to the top3 winners of the track ... maybe thats a suggestion for a future release ? :thumbsup:

Anyway, great work!
Image

Dr. Kaputnik
cyclist
cyclist
Posts: 49
Joined: 24 Sep 2007 21:05
Owned TM-games: TMO, TMS, TMNF, TMUF

Re: [XAseco] Lottery Plugin

Post by Dr. Kaputnik » 28 Jul 2009 13:57

That wouldn't be a lottery anymore then :wink:

I think there's a plugin somewhere that pays coppers to the winner, but I don't know if it has been published yet.

raszkolnyikov
cyclist
cyclist
Posts: 31
Joined: 20 Mar 2009 22:44
Owned TM-games: 2x TMU, TMUF, TM2

Re: [XAseco] Lottery Plugin

Post by raszkolnyikov » 28 Jul 2009 17:51

OK thx, but my question is, whats the perfect setting if i have 20000 coppers? I cant set such a low percentage to pay less than 30 coppers...

Panther107th
wheelbarrow operator
wheelbarrow operator
Posts: 19
Joined: 26 Nov 2008 12:29
Owned TM-games: TMU
Manialink(s): SkinMania
Location: Zutphen, NL
Contact:

Re: [XAseco] Lottery Plugin

Post by Panther107th » 28 Jul 2009 19:41

Ive set my server to pay 20 coppers max and 10 min, leaving the % on 2% ... worked out fine, server payed 20 coppers :gobananas:

but what happends if a player wins that has TMF .. could it bee that I cant see any message then?
Image

Post Reply