update to1.6
- solved the problem of stolen coppers
- added a chat message to let all players know if somebody tried to cheat. Also can be just a very slow player^^

you really should use this version, otherwhise your coppers could be gone.

update to1.5
- solved the double click bug now, same login is blocked for 5 seconds
- also some modifications for the chatcommands regarding the double command issue whcih may exist
- added new config "maxbet" which can be used to set a maximum allowed bet amount

due to the bug i recomment to use the actual version.
didn't had much time to test, so pls let me know if it's better now
specially the double click issue. i got it again and tested it now. you still can double click, but if same login nothing should happen, only one "bill popup" should appear, doesnt matter how often you click. same for the accept button as well. i even tried the combination of chat command and button, but i only got one time bill all the time.

I'm sorry for the error my page had for IE users, FF displayed it still correct. i had an copy&paste mistake in source. Fixed.

Xaseco plugin to serve betting function. all bet participants are fighting for the
stake made by all of them. so it's all about beeing in front of others again^^.
there are several manialink buttons to serve the chatcommands.
this plugin is tested only in TA mode, but should also work in Rounds.

This is beta only, some server admins already installed and tested it. i tested everything in detail by myself, all was fine so far. but still no warranty for perfect function.

i would appreciate any server admin installing this plugin. pls let me know if all works well. post it here, even if there is something which could be improved. i tried to mind all the details and functions i would like to have with this plugin. but there no demand on beeing perfect here.

hope you all enjoy it.

Chatcommands:
- /bet "n" > bet any amount of coppers above the "minbet" limit (n = coppers)
- /accept > to accept the started bet with given stake
- /betstake > to view a list of players and theire bet stakes
- /betwin > to view a list of players and theire bet wins (coppers and count)
- /bettotalstake > to view list of all participants

MasterAdmin and Admin only:
- /betstate ON/OFF > to enable/disable betting from next new challenge

Function:
At new challenge server coppers are checked, if below "minservercoppers" betting
will be disabled. It will also be disabled by admin command. With "betenabled" you
decide if betting is enabled/disabled with xaseco startup.

If nobody started bet during "timelimitbet" seconds, betting will be not allowed for
running round.
If bet started but nobody accepted in "timelimitbet" seconds, bet starter get back
his/her stake. Nadeo tax will be deducted.
If bet started and accepted by players but nobody won, stake can be refund or not,
depending on "paybacknowin" option. Nadeo tax will be deducted before.
Bet participants must have finished the track to be able to win.
There are two options ("winneronly") for winning conditions. one is Winner only
can win the bet, second is, bet winner need to be in front of other bet participants.
If there is a bet winner he/she will get the stake, in this case nadeo tax is splitted.
half is payed by server, half is payed by winner.
This system will avoid the server losing too much coppers.
The ingame message with coppers and winmessage could take a while, the time is not
influenced by the plugin.

There are 4 different manialink windows:
- bet panel, serving the start panel with 5 buttons to bet different amounts.
amount can be configured via betting_config.xml.
- accept panel, serving the accept button and display the stake.
- win panel, giving only a message of who win and how much, cause chat message only
is not enough at end of race.
- state panel, displays the total stake, click it to see a list of all bet participants.

all main positions can be adjusted via the config file.
if you want to edit the whole apperance, check out the manialink section somewhere below.
Same for colors and text of any chatmessage, check out the chat command section at bottom.

The plugin will create a new table "betting" in your database, this is necessary to
save the betting data like player, nickname, stake, win, wincount.

beefheart wrote:Hey Nouse - thank you for this nice piece of code - you made my servers day

Until now it seems to work perfectly,
only thing - when the challenge is skipped - the panels (place bet etc.) still show up on the scoreboard until the timelimit is over.

ah, you are right, if you skip during the bet/accept time limit the panel will not disappear.
i never skipped that early during my tests^^. well, this is not a big problem for players, it's just not nice. it will be changed with next version.

case nobody won. 2 options, one is server keep the coppers, second is stake is paid back with nadeo tax deducted. server dont lose any coppers.

case winner get coppers, the nadeo tax is paid half by server and hapf by winner. i think thats a good compromise. also i made a config option for "min coppers at server" checked every new challenge. in case of server coppers getting to low, betting will be disabled.

beefheart wrote:Back again with nothing serious

got someone on the server who accepted his own bet and doubled the stack.

I think he doubleclicked the bet amount and had two windows with the transfer accepting - which he accepted both stupidly ;D

well, with chatcommands it's save, u can't accept ur own bet as well as you can't accept twice.
but with the buttons, if you doubleclick (just don't ) you get the bill window two times, so the one who accept the bill two times is just not thinking about and not reading the text^^.
for this case of doubleclick i don't have a solution yet. imo every user should care about his own behavior. i guess nobody would pay twice in any shop, even if there are double coins in his/her hand.^^

I tested the plugin. I think it's the best of all...
Maybe i found a mistake.....
If i place a bet (for example 25 Coppers), the first acceptor must pay 25 C to accept, the second must pay 50 c and the third 75 c.....
We tested this 2-3x and always like this.

I tested the plugin. I think it's the best of all...
Maybe i found a mistake.....
If i place a bet (for example 25 Coppers), the first acceptor must pay 25 C to accept, the second must pay 50 c and the third 75 c.....
We tested this 2-3x and always like this.

Greets TGJ

don't you mean the total stake display at right side? this is getting higher with each acceptor.
same as the chat message, but each acceptor only have to pay the same as bet starter. the amount is written in the accept panel, which should be displayed only to those who havn't accepted yet.

the Plugin looks very good. It´s the best betting plugin that i have ever seen before. Is it ok when i change the style for our Zero Servers?

regards Jojo

good to see somebody like it.
of course you can change whatever you want. i made the sections for chat commands and manialinks quite clear in the plugin file, so it should be easy to find and edit.
just don't complain if it dont work anymore^^ it's still beta.

Yes i know, but i tried to code a similar plugin long time ago but the result was bad Now i´m happy about your plugin because i searched/hopped since years for a good betting plugin. I said this to you on your testserver too.

nouseforname wrote:
don't you mean the total stake display at right side? this is getting higher with each acceptor.
same as the chat message, but each acceptor only have to pay the same as bet starter. the amount is written in the accept panel, which should be displayed only to those who havn't accepted yet.

no. we testet it also with 250C. the second acceptor had to pay 500c. After the second accepted, the stake was 750c.
you can test it on ZirpelFun ( tmtp://#join=ZirpelFun)