Converting Sena's Zmud Roulette Script to Mudlet

Is there a way anyone could help me out if possible? I've been trying to convert Sena's old Zmud Roulette tracker to mudlet, willing to pay for this to be done if needed.

#CLASS {Roulette}
#ALIAS rstat {#LOOPDB @RouletteStats {#IF ("%1"="full" OR %isnumber( %key)=0) {#SHOW {%ansi( 7)%key:%repeat( " ", %eval( 6-%len( %key)))%val%repeat( " ", %eval( 4-%len( %val)))~(%eval( %val*100/@RouletteCounter)~%~)};#IF (%key="Green" OR %key="T3" OR %key="Q4" OR %key=36) {#SHOW {}}}};#SHOW {%ansi( 6)Total spins tracked: @RouletteCounter};#SHOW {%ansi( 6)Overall %if( @RouletteProfits<0, loss, winnings): %abs( @RouletteProfits) gold.}}
#ALIAS roulettereset {#VARIABLE RouletteCounter {0};#VARIABLE LastBet {0};#VARIABLE RouletteProfits {0};#LOOPDB @RouletteStats {#ADDKEY RouletteStats {%key} {0}}}
#VAR RouletteCounter {0}
#VAR LastBet {0}
#VAR RouletteProfits {0}
#VAR RouletteStats {00000102030405060708090100110120130140150160170180190200210220230240250260270280290300310320330340350360red0black0Green0T10T20T30Q10Q20Q30Q40}
#REGEX {^The ball finally settles down on (\d+)(?: \((\w+)\))?\.$} {#ADDKEY RouletteStats {%1} {%eval( %db( @RouletteStats, %1)+1)};#VARIABLE RouletteCounter {%eval( @RouletteCounter+1)};#IF (%null( %2)) {#ADDKEY RouletteStats {Green} {%eval( %db( @RouletteStats, Green)+1)}} {#ADDKEY RouletteStats {%2} {%eval( %db( @RouletteStats, %2)+1)}};#IF (%1>=1 AND %1<=9) {#ADDKEY RouletteStats {T1} {%eval( %db( @RouletteStats, T1)+1)};#ADDKEY RouletteStats {Q1} {%eval( %db( @RouletteStats, Q1)+1)}};#IF (%1>=10 AND %1<=12) {#ADDKEY RouletteStats {T1} {%eval( %db( @RouletteStats, T1)+1)};#ADDKEY RouletteStats {Q2} {%eval( %db( @RouletteStats, Q2)+1)}};#IF (%1>=13 AND %1<=18) {#ADDKEY RouletteStats {T2} {%eval( %db( @RouletteStats, T2)+1)};#ADDKEY RouletteStats {Q2} {%eval( %db( @RouletteStats, Q2)+1)}};#IF (%1>=19 AND %1<=24) {#ADDKEY RouletteStats {T2} {%eval( %db( @RouletteStats, T2)+1)};#ADDKEY RouletteStats {Q3} {%eval( %db( @RouletteStats, Q3)+1)}};#IF (%1>=25 AND %1<=27) {#ADDKEY RouletteStats {T3} {%eval( %db( @RouletteStats, T3)+1)};#ADDKEY RouletteStats {Q3} {%eval( %db( @RouletteStats, Q3)+1)}};#IF (%1>=28 AND %1<=36) {#ADDKEY RouletteStats {T3} {%eval( %db( @RouletteStats, T3)+1)};#ADDKEY RouletteStats {Q4} {%eval( %db( @RouletteStats, Q4)+1)}}}
#REGEX {^You bet (\d+) sovereigns on [\w\d -]+, eliciting a wry grin and a wink from .+\.$} {#VARIABLE LastBet {%1};#VARIABLE RouletteProfits {%eval( @RouletteProfits-%1)}}
#REGEX {^.+ exclaims to you, ~"We have a winner! You've won (\d+) gold!~" (?:He|She) returns the stakes for your winning bets, and hands you your winnings\.$} {#VARIABLE RouletteProfits {%eval( @RouletteProfits+%1+@LastBet)}}
#REGEX {^Total spins tracked: \d+$} {#CR}
#CLASS 0

Comments

  • It's a pretty simple script, it would be easier to rewrite it from scratch. All it does is track how many times each result appears, and also lifetime winnings/losses.
  • Then I will begin working on making one from scratch. It will take me awhile but I'll get there eventually. Thanks, Sena!
  • AustereAustere Tennessee
    Datrius said:
    Then I will begin working on making one from scratch. It will take me awhile but I'll get there eventually. Thanks, Sena!
    If you need help, make sure to ask.  I love doing nifty little scripts that I don't have yet
  • Datrius said:
    Then I will begin working on making one from scratch. It will take me awhile but I'll get there eventually. Thanks, Sena!
    To get you started, I think all you really need to know is how to use if statements, how to save/add values to variables/tables, and how to display the information.
  • Austere said:
    Datrius said:
    Then I will begin working on making one from scratch. It will take me awhile but I'll get there eventually. Thanks, Sena!
    If you need help, make sure to ask.  I love doing nifty little scripts that I don't have yet
    To save me the trouble of having to fight with it forever, how much would you charge to do it for me? Heh, if you say no I understand.
  • AustereAustere Tennessee
    Datrius said:
    Austere said:
    Datrius said:
    Then I will begin working on making one from scratch. It will take me awhile but I'll get there eventually. Thanks, Sena!
    If you need help, make sure to ask.  I love doing nifty little scripts that I don't have yet
    To save me the trouble of having to fight with it forever, how much would you charge to do it for me? Heh, if you say no I understand.
    500 credits.  Though if you help and learn something, it's free! 
  • Austere said:
    Datrius said:
    Austere said:
    Datrius said:
    Then I will begin working on making one from scratch. It will take me awhile but I'll get there eventually. Thanks, Sena!
    If you need help, make sure to ask.  I love doing nifty little scripts that I don't have yet
    To save me the trouble of having to fight with it forever, how much would you charge to do it for me? Heh, if you say no I understand.
    500 credits.  Though if you help and learn something, it's free! 
    Oh I'll definitely help I'm just not a very skilled coder, but however I can help I will.
  • I may or may not already have something like this... maybe...

Sign In or Register to comment.