[Xaseco] Nouse Betting V1.8.1

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

Moderators: Xymph, TM-Patrol

Post Reply
nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

[Xaseco] Nouse Betting V1.8.1

Post by nouseforname » 01 Nov 2009 17:45

  • Nouse Betting v1.8.1

    Changed back to original version for now.

    Update/Bugfix: stolen coppers via donate. Pls test it


    the hack for the play panel, by ant:
    viewtopic.php?p=180174#p180174

    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.


    update to1.4
    - add stunt mode support (i hope)
    - improve ( not solved) the double click problem ( i hope)


    update to1.3
    - added some configs for payback functions

    you can now easy decide if coppers are refunded or not, and if, how much tax is deducted before transfer. you can let the server pay all nadeo taxes or player do. even possible to earn coppers.

    for win payment you can do same.

    this is made by a factor which decides how many times the nadeo tax will be deducted.

    stunt mode is still not supported and won't in the near future.

    didn't test it quite good, but it should work as before basicly.
    pls let me know if it still works after xaseco is running a few days.

    update to1.2beta
    - betting panel appears after start round now.

    update to1.1beta
    - remod for rounds mode

    i couldn't test it really good, so pls try it at your rounds server, it should work now for TA and Rounds.
    For those running it on TA only, pls wait till this version is tested in both modes.


    update to 1.0 without beta^^:
    - fixed panel display off, if skip during timelimits
    - fixed wrong payment for acceptors
    - fixed some small style issues

    i recommend to download the new version!

    thanks to all for testing and using. hope it will be good now.

    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.

    No need to modify any other existing file.


    Installation:
    Copy plugin.nouse.betting.php into plugins folder.
    Copy nouse_betting_config.xml into xaseco root
    Add "<plugin>plugin.nouse.betting.php</plugin> into plugins.xml
    Configure to ur needs.


    Download:
    http://tmf.game-host.org/pages/tools.php

    Fufi menu entries for betting by Knutselmaster:

    Code: Select all

          <entry caption='Bet' dependencies='plugin.nouse.betting.php' rights='TMUF' unique='bet'>
            <entry caption='Bet amount' unique='betamound'>
               <entry caption='20 Coppers' chatcmd='/bet 20' unique='bet20'/>
               <entry caption='50 Coppers' chatcmd='/bet 50' unique='bet50'/>
               <entry caption='100 Coppers' chatcmd='/bet 100' unique='bet100'/>
               <entry caption='250 Coppers' chatcmd='/bet 250' unique='bet250'/>
               <entry caption='500 Coppers' chatcmd='/bet 500' unique='bet500'/>
               <entry caption='1000 Coppers' chatcmd='/bet 1000' unique='bet1000'/>
               <entry caption='2500 Coppers' chatcmd='/bet 2500' unique='bet2500'/>
               <entry caption='5000 Coppers' chatcmd='/bet 5000' unique='bet5000'/>
               <entry caption='10000 Coppers' chatcmd='/bet 10000' unique='bet10000'/>
               <entry caption='25000 Coppers' chatcmd='/bet 25000' unique='bet25000'/>
               <entry caption='50000 Coppers' chatcmd='/bet 50000' unique='bet50000'/>
             </entry>
             <entry caption='Accept bet' chatcmd='/accept' unique='accept'/>
             <entry caption='Actual stake' chatcmd='/bettotalstake' unique='bettotalstake'/>
             <entry caption='Total stake' chatcmd='/betstake' unique='betstake'/>
             <entry caption='Bet topwins' chatcmd='/betwin' unique='betwin'/>                  
          </entry>
Last edited by nouseforname on 15 Jul 2012 18:21, edited 12 times in total.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

beefheart
highway camper
highway camper
Posts: 4
Joined: 26 Oct 2009 14:48
Owned TM-games: TMU

Re: [Xaseco] Nouse Betting V1.0beta

Post by beefheart » 01 Nov 2009 18:27

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.

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by nouseforname » 01 Nov 2009 18:55

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.

thanks for testing.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Markus10
tricycle manager
tricycle manager
Posts: 29
Joined: 29 Mar 2008 09:30
Owned TM-games: TMN,TMU

Re: [Xaseco] Nouse Betting V1.0beta

Post by Markus10 » 01 Nov 2009 19:53

must the server itself pay the nadeo tay, or is it like the other betting plugin, where the nadeotax get paid by the participants?

beefheart
highway camper
highway camper
Posts: 4
Joined: 26 Oct 2009 14:48
Owned TM-games: TMU

Re: [Xaseco] Nouse Betting V1.0beta

Post by beefheart » 01 Nov 2009 20:20

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

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by nouseforname » 01 Nov 2009 20:34

Markus10 wrote:must the server itself pay the nadeo tay, or is it like the other betting plugin, where the nadeotax get paid by the participants?
depending:
Case nobody accepted bet. bet starter get back the coppers. nadeo tax decuted. eg. if stake was 10 coppers, he7she get back 5 only.
server dont lose any coppers.

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.^^
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

User avatar
TGJ
pedestrian
pedestrian
Posts: 9
Joined: 31 May 2008 12:01
Owned TM-games: TMU-F, TM²-C+S+V
Manialink(s): zirpel
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by TGJ » 01 Nov 2009 23:18

Hi,

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
Image

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by nouseforname » 02 Nov 2009 06:00

TGJ wrote:Hi,

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.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Jojo_44
road tourist
road tourist
Posts: 87
Joined: 13 Jan 2009 16:57
Owned TM-games: Tmnf, Tmuf

Re: [Xaseco] Nouse Betting V1.0beta

Post by Jojo_44 » 02 Nov 2009 11:08

Hi Nouseforname,

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

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by nouseforname » 02 Nov 2009 11:30

Jojo_44 wrote:Hi Nouseforname,

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. ;)

but later you just can copy your manialink section.

btw afaik it's the second betting plugin.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Jojo_44
road tourist
road tourist
Posts: 87
Joined: 13 Jan 2009 16:57
Owned TM-games: Tmnf, Tmuf

Re: [Xaseco] Nouse Betting V1.0beta

Post by Jojo_44 » 02 Nov 2009 11:44

Ok big thanks.
nouseforname wrote:
btw afaik it's the second betting plugin.
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.

btw i´m testing your other new plugin atm, looks good too :thumbsup:

best regards Jojo

User avatar
TGJ
pedestrian
pedestrian
Posts: 9
Joined: 31 May 2008 12:01
Owned TM-games: TMU-F, TM²-C+S+V
Manialink(s): zirpel
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by TGJ » 02 Nov 2009 11:59

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)

I installed the plugin as the last plugin in plugins.xml
Image

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by nouseforname » 02 Nov 2009 12:47

TGJ wrote: 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)

I installed the plugin as the last plugin in plugins.xml

does anybody else have this strange behavior?
i will check it again, but i am sure i worked for me all the time.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Markus10
tricycle manager
tricycle manager
Posts: 29
Joined: 29 Mar 2008 09:30
Owned TM-games: TMN,TMU

Re: [Xaseco] Nouse Betting V1.0beta

Post by Markus10 » 02 Nov 2009 13:00

On which server can I test this plugin? :)

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Nouse Betting V1.0beta

Post by nouseforname » 02 Nov 2009 16:54

nouseforname wrote:
TGJ wrote: 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)

I installed the plugin as the last plugin in plugins.xml

does anybody else have this strange behavior?
i will check it again, but i am sure i worked for me all the time.
i checked it and i must say, you are right. i will change it and test again. thanks.
next version coming soon.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Post Reply