Jump to content

Chance script


watti

Recommended Posts

I need a 70% to 30% chance script.. ive already looked if u can gimmie one.. thanks

hmm i dunno what u want to do with it since u didnt say, i'll give u this and u can probably add what u want:

alias chance {
 var %a = $rand(1,10)
 if (%a > 3) {
 ;add what u like here for 70%
 }
 else {
 ;add what u like here for 30%
 }
}

then, add in mta.command:

 if ($3 == !chance) chance $1-

thats about it.

Link to comment

Its a Bank robbery script.. ive got the plan ( how it works) i just need this

/msg cracksafe

PM from admin: You now have 1 minute to Crack the safe, to continue type /msg Cracksafe and a number between 100-200 ...

thats why i need the random number

Link to comment
Its a Bank robbery script.. ive got the plan ( how it works) i just need this

/msg cracksafe

PM from admin: You now have 1 minute to Crack the safe, to continue type /msg Cracksafe and a number between 100-200 ...

thats why i need the random number

u cant pm empty names in SA. thats why /msg is hardly ever used.

u can only pm players in the server.

Link to comment
  • 3 weeks later...

you mean this!?

on *:signal:mta.command:{ 
 if ($3 == !cracksafe) { 
   mta.pm $1 $2 you got 1 minute to crack the safe 
   !writeini -n  " $+ $scriptdir $+ safe.ini" timer $mta.nick($1,$2) 1 
   .timer 1 60 Next $1- 
 } 
 elseif ($3 == !crack) { 
   if ($readini($scriptdir $+ safe.ini,timer,$mta.nick($1,$2)) == $null) { 
     mta.pm $1 $2 you havent did !cracksafe first 
   } 
   else win $1- 
 } 
}
alias win { 
 var %a = $rand(1,5),%b = $rand(1,500) 
 if (%a == 3) { 
   mta.pm $1 $2 you cracked the Safe and earned $ $+ %b 
   !remini " $+ $scriptdir $+ safe.ini" timer $mta.nick($1,$2)    
   pgs.add $mta.nick($1,$2) %b 
 } 
 else mta.pm $1 $2 you didnt make it your frend did explosives on the safe and you didnt notice! 
 !remini " $+ $scriptdir $+ safe.ini" timer $mta.nick($1,$2) 
} 
alias next { 
 if ($readini($scriptdir $+ safe.ini,timer,$mta.nick($1,$2)) == 1) { 
   mta.pm $1 $2 you didnt make it the cops spotted you! 
   !remini " $+ $scriptdir $+ safe.ini" timer $mta.nick($1,$2) 
 } 
}

Link to comment

yeah he wanted it to say higher and lower and have a few other things in it. covered it on msn.

on *:SIGNAL:mta.pm:{
 if ($3 == robbank) rpg.radio $1-
 if ($3 == cracksafe) cracksafe $1-
}  
alias rpg.radio {
 if ($rpg.area($1,$2) == Bank) chance $1-
 else mta.msg $1 $2 You are not at the Bank!
}
alias chance {
 var %a = $rand(1,10)
 if (%a > 3) mta.msg $1 $2 You have been Caught by the Security, Please try again Later.
 elseif (%cracker != 0) || (%cracker != $null) {
   mta.msg $1 $2 Someone Already Robbing The Bank!
 }
 else {
   mta.msg $1 $2 You Have Succesfully Disabled the Security, Now Crack the safe! ( /msg cracksafe  )
   set %code $rand(100,200)
   set %cracker $mta.name($1,$2)
   .timerend $+ $2 1 $rand(55,65) timeup $1-
 }
}
alias cracksafe {
 if ($mta.name($1,$2) != %cracker) mta.msg $1 $2 Nothing To Crack!
 else {
   if ($4 == %code) {
     mta.msg $1 $2 You cracked the safe!
     .timerend $+ $2 off
     var %a = 0
     while (%a < 32) {
       if ($mta.skin($1,%a) == Cop) mta.msg $1 $2 %cracker Has Just robbed the Bank!
       !inc %a
     }
   }
   elseif ($4 < %code) mta.msg $1 $2 Too Low!
   else mta.msg $1 $2 Too High!
 }
}
}
alias timeup {
 Set %cracker 0
 mta.msg $1 $2 Out Of Time!!
}

Link to comment
  • Recently Browsing   0 members

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