Jump to content

!addcash command


Kika592

Recommended Posts

Hi. Kika592 here. I need a !addcash Script. e.g:. !addcash

But i want the cash to just be added. I dont want it to be removed from my acount for example, and then added to theres. i want the cash to come from nowhere. But only lvl 5's can do it. Maybe scooby can make this for me... Well, hope you can make what i want ;) Thanks...

Link to comment
  • 2 weeks later...

ok lol i not done right much mirc scripting so i preaty much forgot eveything nearly lol so here goes lol try this any errors post here :D

/* 
///////////////////////////////////// 
//////   AddCash: [uVA]Bart    ////// 
///////////////////////////////////// 
*/ 
  
on *:SIGNAL:mta.command: { 
if ($3 == !addcash) slr.addcash $1- 
} 
alias slr.addcash {  
  var %a = $iif(($5 == $null),$2,$iif(($slr.id($1,$4) == $null),$2,$v1)) 
  if ($prs.level($1,$2) < 5) mta.pm $1 $2 Error: Incorrect Level 
  if ($4 == $null) || ($4 !isnum ) || ($5 == $null) || ($5 isnum ) || ($4 > 20000) mta.pm $1 $2 Error: !addcash <ammount> <nick> 
  else { 
    if ($prs.level($1,$2) >= 5) { 
      !hinc -m pgscash mta.nick($1,%a) $4 
        mta.pm $1 $2 $mta.nick($1,%a) Has Had A Rise In Cash Of: $ $+ $4 
    } 
  } 
} 
alias slr.id { 
  var %a = 0 
  while (%a < $mta.server($1).players) { 
    if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a 
    !inc %a 
  } 
} 
  

Link to comment
  • 4 weeks later...
  • 2 weeks later...

hi, only just noticed this, u should post PRS related stuff in the PRS topic, then i will reply the same day.

ok, im not sure if u still need this... but just in case u do.

add this in mta.command. (below the admin level 1 commands),

if ur not sure where, add it below this line: elseif ($3 == !setwarnlimit) prs.setwarnlimit $1-

elseif ($3 == !addcash) pgs.addcash $1 $2 $mta.nick($1,%a) $4 

then at the very bottom of ur script add this:

alias pgs.addcash { 
  if ($prs.level($1,$2) < 5) mta.pm $1 $2 Error: Level 5 command. 
  elseif ($4 !isnum) mta.pm $1 $2 Error: Invalid Amount. 
  else { 
    mta.text $1 $mta.nick($1,$2) Is Giving $3 $ $+ $4 
    pgs.add $3 $4 
  } 
} 

i would advise adding the same for taking cash away too... just in case u ever make a mistake.

u can either use !givecash bla -1000

or add the same script again with a few minor mods, and using pgs.sub instead of pgs.add.

if u need anymore help or minor upgrades adding plz ask in the PRS topic.

any probs, just let me know.

Link to comment
  • 3 weeks later...
  • Recently Browsing   0 members

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