Jump to content

MTA:mA General Use Scripts Suggestions


Tommis

Recommended Posts

One addition that would make the General Use Scripts even better is a !ratemap system. Users type !ratemap and then a value of 1-5. The server averages the results, and the rating of the map is displayed at the beginning of each race. This could also help with the rotation of maps by putting maps below a 2.0 out of the cycle.

Link to comment

no support ! no installation tips ! , and dont bug me to help you install it :)

but here is the rpg snippets

i hope i got all of them in one go :P

only thing ill do is add what on :* event i cutted it from

oh .. ps note this is a tweaked version ... - so you may need to adjust prices to your likings (both in the message as in the !writeini)

the money it gives is on race finish changed from original (not included ..thats still in x16 right ? ..else ask)

also i added a item to buy .. kick :P

i removed !givecash .. it had a major bug allowing people to STEAL cash

and ill leave in the !admingivecash command - only level 10 admin (dont use it tho (and yes its also possible to take money with that )

i added 'random' as option to rpgchangemap

ps .. there is a bug in using the rpgchangemap - it doesnt get removed from items list .. i havent figured out why .. code looks good ..

alias gus.iscash {
 if ($readini($scriptdir $+ RPG.ini,CASH,$mta.nick($1,$2)) == $null) !return 0
 else !return 1
}
alias gus.cash {
 if ($readini($scriptdir $+ RPG.ini,CASH,$mta.nick($1,$2)) != $null) !return $readini($scriptdir $+ RPG.ini,CASH,$mta.nick($1,$2))
 else !return 0
}
alias gus.nameitems {
 if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) != $null) !return $readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2))
 else !return N/A
}
alias gus.items {
 !return $readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2))
}
alias gus.freezetime !return $readini($scriptdir $+ RPG.ini,ITEMS,Freeze)
alias gus.mutetime !return $readini($scriptdir $+ RPG.ini,ITEMS,Mute)
alias gus.time {
 if ($gettok($mta.time($1,$2).text,1,58) != 00) !return $gettok($mta.time($1,$2).text,1,58) $+ mins $gettok($mta.time($1,$2).text,2,58) $+ . $+ $gettok($mta.time($1,$2).text,3,58) $+ secs
 else !return $gettok($mta.time($1,$2).text,2,58) $+ . $+ $gettok($mta.time($1,$2).text,3,58) $+ secs
}




from on *:signal:mta.command :


 elseif ($3 == !cash && %rpg == on) {
   if ($4 == $null) mta.text $1 $mta.nick($1,$2) $+ 's Cash: $chr(36) $+ $gus.cash($1,$2)
   elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID , please use $+ /vote
   else mta.text $1 $mta.nick($1,%a) $+ 's Cash: $chr(36) $+ $gus.cash($1,%a)
 }
 elseif ($3 == !offlinecash && %rpg == on) {
   mta.text $1 $4 $+ 's Cash: $chr(36) $+ $readini($scriptdir $+ RPG.ini,CASH,$4)
 }
 elseif ($3 == !money && %rpg == on) {
   if ($4 == $null) mta.text $1 $mta.nick($1,$2) $+ 's Cash: $chr(36) $+ $gus.cash($1,$2)
   elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
   else mta.text $1 $mta.nick($1,%a) $+ 's Cash: $chr(36) $+ $gus.cash($1,%a)
 }
 elseif ($3 == !pmc && %rpg == on) {
   if ($4 == $null) mta.pm $1 $2 $mta.nick($1,$2) $+ 's Cash: $chr(36) $+ $gus.cash($1,$2)
   elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
   else mta.pm $1 $2 $mta.nick($1,%a) $+ 's Cash: $chr(36) $+ $gus.cash($1,%a)
 }
 elseif ($3 == !buy && %rpg == on) {
   if ($4 isnum && sec* iswm $5) {
     if (freeze* iswm $6) {
       if (5 >= $4) {
         if ($gus.cash($1,$2) >= 400) {
           if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
             mta.text $1 $mta.nick($1,$2) has bought a " $+ $4 Second Freeze" for $chr(36) $+ 400
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),400)
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Freeze
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS Freeze $4
             mta.pm $1 $2 To use this on someone type: !rpgfreeze 
           }
           else mta.pm $1 $2 Error - You can only have 1 item at a time.
         }
         else mta.pm $1 $2 Error - You need $chr(36) $+ 400 to buy this item.
       }
       elseif (10 >= $4 && $4 >= 6) {
         if ($gus.cash($1,$2) >= 1000) {
           if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
             mta.text $1 $mta.nick($1,$2) has bought a " $+ $4 Second Freeze" for $chr(36) $+ 1000
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),1000)
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Freeze
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS Freeze $4
             mta.pm $1 $2 To use this on someone type: !rpgfreeze 
           }
           else mta.pm $1 $2 Error - You can only have 1 item at a time.
         }
         else mta.pm $1 $2 Error - You need $chr(36) $+ 1000 to buy this item.
       }
       elseif (20 >= $4 && $4 >= 11) {
         if ($gus.cash($1,$2) >= 2500) {
           if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
             mta.text $1 $mta.nick($1,$2) has bought a " $+ $4 Second Freeze" for $chr(36) $+ 2500
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),2500)
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Freeze
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS Freeze $4
             mta.pm $1 $2 To use this on someone type: !rpgfreeze 
           }
           else mta.pm $1 $2 Error - You can only have 1 item at a time.
         }
         else mta.pm $1 $2 Error - You need $chr(36) $+ 2500 to buy this item.
       }
     }
     if (mute* iswm $6) {
       if (10 >= $4) {
         if ($gus.cash($1,$2) >= 400) {
           if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
             mta.text $1 $mta.nick($1,$2) has bought a " $+ $4 Second Mute" for $chr(36) $+ 400
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),400)
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Mute
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS Mute $4
             mta.pm $1 $2 To use this on someone type: !rpgmute 
           }
           else mta.pm $1 $2 Error - You can only have 1 item at a time.
         }
         else mta.pm $1 $2 Error - You need $chr(36) $+ 400 to buy this item.
       }
       elseif (15 >= $4 && $4 >= 11) {
         if ($gus.cash($1,$2) >= 1000) {
           if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
             mta.text $1 $mta.nick($1,$2) has bought a " $+ $4 Second Mute" for $chr(36) $+ 1000
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),1000)
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Mute
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS Mute $4
             mta.pm $1 $2 To use this on someone type: !rpgmute 
           }
           else mta.pm $1 $2 Error - You can only have 1 item at a time.
         }
         else mta.pm $1 $2 Error - You need $chr(36) $+ 1000 to buy this item.
       }
       elseif (25 >= $4 && $4 >= 16) {
         if ($gus.cash($1,$2) >= 2500) {
           if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
             mta.text $1 $mta.nick($1,$2) has bought a " $+ $4 Second Mute" for $chr(36) $+ 2500
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),2500)
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Mute
             !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS Mute $4
             mta.pm $1 $2 To use this on someone type: !rpgmute 
           }
           else mta.pm $1 $2 Error - You can only have 1 item at a time.
         }
         else mta.pm $1 $2 Error - You need $chr(36) $+ 2500 to buy this item.
       }
     }
   }
   elseif (change* iswm $4) {
     if ($gus.cash($1,$2) >= 2500) {
       if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
         mta.text $1 $mta.nick($1,$2) has bought a "Change Map" for $chr(36) $+ 2500
         !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),2500)
         !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) ChangeMap
         mta.pm $1 $2 To use this type: !rpgchangemap  or !rpgchangemap random
         !.timer 1 2 mta.pm $1 $2 be adviced a lot of map names dont work - and asterisk wont do random
       }
       else mta.pm $1 $2 Error - You can only have 1 item at a time.
     }
     else mta.pm $1 $2 Error - You need $chr(36) $+ 2500 to buy this item.
   }  
   elseif (kick iswm $4) {
     if ($gus.cash($1,$2) >= 5000) {
       if ($readini($scriptdir $+ RPG.ini,ITEMS,$mta.nick($1,$2)) == $null) {
         mta.text $1 $mta.nick($1,$2) has bought a "Kick" for $chr(36) $+ 5000
         !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.subtract($gus.cash($1,$2),5000)
         !writeini -n " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2) Kick
         mta.pm $1 $2 To use this type: !rpgkick 
       }
       else mta.pm $1 $2 Error - You can only have 1 item at a time.
     }
     else mta.pm $1 $2 Error - You need $chr(36) $+ 5000 to buy this item.
   }  
   else mta.pm $1 $2 Error - Absent Item (!buyhelp)
 }
 elseif (!price* iswm $3 && %rpg == on) {
   mta.text $1 GUS:RPG Prices - Freeze: $chr(36) $+ 400-2500 - Mute: $chr(32) $+ 400-2500 - ChangeMap: $chr(36) $+ 2500 - Kick: $chr(36) $+ 5000
 }
 elseif ($3 == !rpgchangemap && %rpg == on) {
   if ($gus.items($1,$2) == ChangeMap) {
     if ($4 == $null) mta.pm $1 Error - $3 
     elseif ($4 == random) { set %rand $rand(0,$lines($shortfn($mta.dir) $+ filelist.txt)))
     mta.startrace $1 %rand }
     elseif ($4 && $gus.getmapid($1,$4-) == $null) mta.pm $1 $2 Error - Absent ID
     elseif ($4 && $gus.getmapid($1,$4-) != $null) {
       mta.text $1 $mta.nick($1,$2) is using his " $+ ChangeMap $+ " to Change Map to " $+ $gus.race($gus.getmapid($1,$4-)) $+ " $+ !
       mta.startrace $1 $gus.getmapid($1,$4-)
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2)
     }
   }
   else mta.pm $1 $2 Error - You need to have a "ChangeMap" before you can use this.
 }
 elseif ($3 == !buyhelp && %rpg == on) {
   mta.pm $1 $2 Items to Buy: !buy 1-20 sec mute, !buy changemap, !buy 1-20 sec freeze, !buy kick
 }
 elseif ($3 == !rpghelp && %rpg == on) {
   mta.pm $1 $2 GUS:RPG - You Earn money from finishing races 1-4'th.
   mta.pm $1 $2 You can spend your money then on items. (!rpgcommands)
   mta.pm $1 $2 Or just collect it and show off with it !!
 }
 elseif ($3 == !rpgfreeze && %rpg == on) {
   if ($gus.items($1,$2) == Freeze) {
     if ($4 == $null) mta.pm $1 Error - $3 
     elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
     elseif ($4 && %a != -1) {
       mta.text $1 $mta.nick($1,$2) is using his " $+ $gus.freezetime Sec Freeze $+ " on $mta.nick($1,%a) $+ !
       mta.freeze $1 %a
       !.timer 1 $gus.freezetime mta.unfreeze $1 %a
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2)
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS Freeze 
     }
   }
   else mta.pm $1 $2 Error - You need to have a "Freeze" before you can use this.
 }
 elseif ($3 == !rpgmute && %rpg == on) {
   if ($gus.items($1,$2) == Mute) {
     if ($4 == $null) mta.pm $1 Error - $3 
     elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
     elseif ($4 && %a != -1) {
       mta.text $1 $mta.nick($1,$2) is using his " $+ $gus.mutetime Sec Mute $+ " on $mta.nick($1,%a) $+ !
       mta.mute $1 %a
       !.timer 1 $gus.mutetime mta.unmute $1 %a
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2)
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS Mute
     }
   }
   else mta.pm $1 $2 Error - You need to have a "Mute" before you can use this.
 }
 elseif ($3 == !rpgkick && %rpg == on) {
   if ($gus.items($1,$2) == Kick) {
     if ($4 == $null) mta.pm $1 Error - $3 
     elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
     elseif ($4 && %a != -1) {
       mta.text $1 $mta.nick($1,$2) is using his bought RPG Kick $+ " on $mta.nick($1,%a) $+ !
       mta.kick $1 %a Someone used his bought RPG kick on you ! You were on [NL][CoZ] server ! go back !
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2)
       !remini " $+ $scriptdir $+ RPG.ini" ITEMS Kick 
     }
   }
   else mta.pm $1 $2 Error - You need to have a "Kick" before you can use this.
 }
 elseif (!item* iswm $3 && %rpg == on) {
   if ($4 == $null) mta.text $1 $mta.nick($1,$2) $+ 's Items: $gus.nameitems($1,$2)
   elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
   elseif ($4 && %a != -1) mta.text $1 $mta.nick($1,%a) $+ 's Items: $gus.nameitems($1,%a)
   else mta.pm $1 $2 Error - Unknown Error
 }
 elseif ($3 == !rpgcommands && %rpg == on) {
   mta.pm $1 $2 RPG Commands: !cash, !items, !drop, !buy, !prices, !rpg, !rpghelp
   mta.pm $1 $2 RPG Item Commands: !rpgkick, !rpgmute, !rpgfreeze, !rpgchange
 }  
 elseif ($3 == !admingive && %rpg == on) {
   if ($gus.level($1,$2) >= 10) {
     if ($4 == $null) mta.pm $1 $2 Error - $3 
     elseif ($4 && %a == -1) mta.pm $1 $2 Error - Absent ID
     elseif ($4 && %a != -1) {
       if ($5) {
         if ($5 isnum) {
           if ($gus.cash($1,$2) >= $5) {
             mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) $chr(36) $+ $5 from the gold mine
             !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,%a) $gus.add($gus.cash($1,%a),$5)
           }
         }   
         else mta.pm $1 $2 Error - $3 
       }
       else mta.pm $1 $2 Error - $3 
     }
   }
   else mta.pm $1 $2 Error - You need to be level 10 to use this command.
 }
 elseif ($3 == !drop && %rpg == on) {
   if ($gus.items($1,$2)) {
     mta.pm $1 $2 You have dropped " $+ $gus.nameitems($1,$2) $+ "
     !remini " $+ $scriptdir $+ RPG.ini" ITEMS $mta.nick($1,$2)
   }
   else mta.pm $1 $2 Error - No Items to drop.
 }
 elseif ($3 == !rpg) { 
   if ($gus.level($1,$2) >= 7) {
     if ($4 == on) {
       set %rpg on
       mta.text $1 GUS RPG: On
     }
     elseif ($4 == off) {
       set %rpg off
       mta.text $1 GUS RPG: Off
     }
     elseif ($4 == $null) mta.text $1 GUS RPG: %rpg
     else mta.pm $1 $2 Error - $3 
   }
   else mta.pm $1 $2 Error - You need to be level 7 to use this command.
 }

well i hope i copied everything .. only if you mis something ask ..

Link to comment
hmm i think i installed it ok

here is my gus file

http://www.hard-beats.nl/blaat.txt

are you sure there's nothing missing..?

if script is still running .. all commands still work , you dont get error messages .. then yes its installed ok

oh .. silly ..

i forgot one smaaaaall thing . the part where you win cash :D

alias gus.rpgwin {
 %players = $mta.server($1).players
 %rank = $mta.rank($1,$2)
 if (%rank == 1) {
   if (2 <= %players) {
     mta.text $1 $mta.nick($1,$2) You came first out of %players Players $+ ! (Rank: First $+ ) (Money Earned: $chr(36) $+ $calc(50 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(50 * %players))
   }
   elseif (1 = %players) {
     mta.text $1 $mta.nick($1,$2) Playing with yourself earned you money too $+ ! (Rank: First $+ ) (Money Earned: $chr(36) $+ $calc(50 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(50 * %players))
   }
 }
 elseif (%rank == 2) {
   if (2 <= %players) {
     mta.text $1 $mta.nick($1,$2) You Came Second! (Money Earned: $chr(36) $+ $calc(25 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(25 * %players))
   }
 }
 elseif (%rank == 3) {
   if (3 <= %players) {
     mta.text $1 $mta.nick($1,$2) You Came Third! (Money Earned: $chr(36) $+ $calc(15 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(15 * %players))
   }
 }
 elseif (%rank == 4) {
   if (4 <= %players) {
     mta.text $1 $mta.nick($1,$2) You Came Fourth! (Money Earned: $chr(36) $+ $calc(10 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(10 * %players))
   }
 }
 elseif (%rank == 5) {
   if (5 <= %players) {
     mta.text $1 $mta.nick($1,$2) You Came Fifth ! (Money Earned: $chr(36) $+ $calc(6 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(6 * %players))
   }
 }
 elseif (%rank == 6) {
   if (6 <= %players) {
     mta.text $1 $mta.nick($1,$2) You Came Sixth ! (Money Earned: $chr(36) $+ $calc(2 * %players) $+ )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(2 * %players))
   }
 }
 else mta.text $1 $mta.nick($1,$2) came in %rank place
} 


on *:SIGNAL:mta.startrace: {
 ;Parameters:
 ;$1 = Server
 ;$2 = Race ID
 ;$3 = 0/1/2 (success,failed,no players)
 %remmap = $readini($scriptdir $+ remmap.ini,REMMAPS,$replace($mta.race($1),$chr(32),-))
 if (%constant = on && %constantmap != $mta.race($1) && %remmap != 1) mta.startrace $1 %constantmapid
 if (%remmap == 1 && %constant != on) {
   mta.text $1 Map " $+ $mta.race($1) $+ " has been removed, changing to a random map..
   !.timer 1 1 mta.startrace $1 $rand(0,$mta.races($1))
 }
 if ($3 == 0 && %remmap != 1) {
   set %race $2
   set %deaths 0
   set %topt 0
   set %currentdeaths 0
   var %a = $calc($readini($scriptdir $+ mta.stats.ini,n,$mta.races($1,$2),times) + 1),%b = $calc($readini($scriptdir $+ mta.stats.ini,n,ALL,times) + 1)
   !writeini -n $+(",$scriptdir,mta.stats.ini,") ALL times %b
   !writeini -n $+(",$scriptdir,mta.stats.ini,") $+(",$mta.races($1,$2),") times %a
   if ($mta.races($1,$2) != $null) mta.text $1 $mta.races($1,$2) - Top Time: $gus.toptime($1) - By: $gus.topname($1) - Deathlimit: $gus.deathlimit($1,$2) - Played: $+(%a,/,%b) times ( $+ $round($calc(100 / %b * %a),2) $+ % $+ )
   set %topt $gus.toptime($1)
 }
 if ($readini($scriptdir $+ instructions.ini,INSTRUCTIONS,$replace($mta.races($1,$2),$chr(32),)) != $null && $readini($scriptdir $+ instructions.ini,INSTRUCTIONS,$replace($mta.races($1,$2),$chr(32),)) != default && %remmap != 1) {
   mta.text $1 $mta.races($1,$2) - Instructions: $readini($scriptdir $+ instructions.ini,INSTRUCTIONS,$replace($mta.races($1,$2),$chr(32),))
 }
}


note .. i made improving a record pay 2x the value of wining a race (so in total if you win a race and set record you get the win of race * 3)

on *:SIGNAL:mta.finish: {
 ;Parameters:
 ;$1 = Server
 ;$2 = ID
 %players = $mta.server($1).players
 %say = $mta.server($1).players - 1
 if ($gettok($readini($scriptdir $+ times.ini,TOP,$replace($mta.race($1),$chr(32),-)),2,32) >= $mta.time($1,$2) && $mta.rank($1,$2) == 1 && $mta.race($1) != $null) || ($gettok($readini($scriptdir $+ times.ini,TOP,$replace($mta.race($1),$chr(32),-)),2,32) == $null && $mta.rank($1,$2) == 1 && $mta.race($1) != $null) {
   if ($gettok($readini($scriptdir $+ times.ini,TOP,$replace($mta.race($1),$chr(32),-)),2,32) != $null && $gettok($readini($scriptdir $+ times.ini,TOP,$replace($mta.race($1),$chr(32),-)),2,32) >= $mta.time($1,$2)) {
     mta.text $1 Improved Best Time on $mta.race($1) $+ ! (Time: $gus.time($1,$2) $+ ) (By: $mta.nick($1,$2) $+ )
     !writeini -n " $+ $scriptdir $+ times.ini" TOP $replace($mta.race($1),$chr(32),-) $mta.nick($1,$2) $mta.time($1,$2)
     !writeini -n " $+ $scriptdir $+ times.ini" TIMES $replace($mta.race($1),$chr(32),-) $gus.time($1,$2)
     !.timer 1 2 mta.text $1 $mta.nick($1,$2) Setting Better Best Time (Money Earned: $chr(36) $calc(200 * %players) )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(200 * %players))
   }
   elseif ($gettok($readini($scriptdir $+ times.ini,TOP,$replace($mta.race($1),$chr(32),-)),2,32) == $null && $gettok($readini($scriptdir $+ times.ini,TOP,$replace($mta.race($1),$chr(32),-)),1,32) == $null) {
     mta.text $1 New Best Time on $mta.race($1) $+ ! (Time: $gus.time($1,$2) $+ ) (By: $mta.nick($1,$2) $+ )
     !writeini -n " $+ $scriptdir $+ times.ini" TOP $replace($mta.race($1),$chr(32),-) $mta.nick($1,$2) $mta.time($1,$2)
     !writeini -n " $+ $scriptdir $+ times.ini" TIMES $replace($mta.race($1),$chr(32),-) $gus.time($1,$2)
     !.timer 1 2 mta.text $1 $mta.nick($1,$2) Setting New Best Time (Money Earned: $chr(36) $calc(100 * %players) )
     !writeini -n " $+ $scriptdir $+ RPG.ini" CASH $mta.nick($1,$2) $gus.add($gus.cash($1,$2),$calc(100 * %players))
   }
 }
 if (%rpg == on) gus.rpgwin $1 $2
 if ($mta.rank($1,$2) == 1) !writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,$2) $gus.add($gus.wins($1,$2),1)
 !writeini -n " $+ $scriptdir $+ stats.ini" RACES $mta.nick($1,$2) $gus.add($gus.races($1,$2),1)
}

also note .. you need to add the commands to the !commands list if you havent done that :D

also .. you need to do !rpg on before it works

and i edited it somewhere so its turned on always

Link to comment
  • 2 months later...

I have been looking around in these forums but I have been unable to find scripts that work correctly. So the best is to ask to the best script around :)

My suggestions :

- a point system like : when you win a race get as much points as the number of players, 2nd get that minus one, 3rd get that minus 2, so on (if player is alone give 2 points) (I have seen a working script for this in the forums)

- create a ladder and a command to show the best 3 or 5.

- with the !stats command show the total points, ranking and number of best times the player holds

- When a player ends a race, show how much slower or faster he was from the record (kind of like mta.stats2.mrc by Aeron)

- when a player joins, show his stats to all players (points, ranking, number of bestimes, visits, so on...)

all this could be activated or not, depending on what server admins want.

Link to comment

Hello,

Good ideas Vince. I will look into that.

*Just an update, i have been very busy with many things lately, mostly education. I have had very little time to work on other things. This is on my priorty and i will look into it as soon as i get time. Sorry.

Cya,

Tommis

Link to comment

I have banned some cheaters from my server using the GUS x16 script.

But for some reasons, one guy keep coming back and play... I checked in the bans.ini (GUS x16) and banned.lst (MTA server) files and his IP is still there. And the IP reported by the server and the script is the exact same.

Maybe there is something wrong with my computer... or maybe this guy got a hack to get around this. If he knows how to modified the EXE would that be possible to go around the ban ?

But I still don't get why the script doesnt kick this dude automatically when he joins, especially that his IP is in bans.ini

Does the GUS x16 script has an option to check people's IP and kick em if they are in bans.ini ?

Link to comment

Actually this guy has a static IP and still can join.

So I put him in the blocked list of my firewall... he tried to connect a couple times and couldn't :)

On a side note, I got a point system script to work (using scripts in these forums that I modfied so they work together).

My only problem is that I don't know how to make it into a single .MRC file :). I got a bunch of .MRC, one per function (!top5, !stats, point for finishing, points when setting new record, show rank on join...). Some mta.text functions would not work when I fuse em all in one script.

Link to comment
  • 1 month later...
  • 4 weeks later...
  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...