Jump to content

MTA:SA Public Release Script - PRS:1.3 Out Now!


Scooby

Recommended Posts

Please ;p

on *:SIGNAL:mta.command: {

if (!roll* iswm $3) {

var %a = $rand(1,7)

mta.pm $1 $2 Rolling the dice...

if (%a == 1) {

var %c = $rand(1000,6000)

.timerroll1 1 4 pgs.add $mta.nick($1,$2) %c

.timerroll1 1 5 mta.text $1 You rolled 1, $mta.nick($1,$2) $+ , %c added to your cash.

}

elseif (%a == 2) {

var %c = $rand(1000,6000)

.timerroll2 1 4 pgs.sub $mta.nick($1,$2) %c

.timerroll2 1 5 mta.text $1 You rolled 2, $mta.nick($1,$2) $+ , you lose %c

}

elseif (%a == 3) {

.timerroll3 1 5 mta.text $1 You rolled 3, $mta.nick($1,$2) $+ , which is mute.

.timermuteroll3 1 5 mta.mute $1 $2

.timerunmuteroll3 $+ $2 1 30 mta.unmute $1 $2

}

elseif (%a == 4) {

var %d = $rand(1000,2000)

.timerroll4 1 4 pgs.add $mta.nick($1,$2) %d

.timerroll4 1 5 mta.text $1 You rolled 4, $mta.nick($1,$2) $+ , %d added to your cash.

}

elseif (%a == 5) {

.timerroll5 1 4 !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + 1)

.timerroll5 1 5 mta.text $1 You rolled 5, $mta.nick($1,$2) so 1 point added to your stats.

}

elseif (%a == 6) {

var %e = $rand(1000,9999)

.timerroll6 1 4 pgs.add $mta.nick($1,$2) %e

.timerroll6 1 5 mta.text $1 You rolled 4, $mta.nick($1,$2) $+ , %e added to your cash.

}

elseif (%a == 7) {

var %f = $rand(1,5)

var %warns = $calc($hget(prswarns,$mta.nick($1,$2)) + %f)

.timerroll7 1 4 !hadd prswarns $mta.nick($1,$2) %warns

.timerroll7 1 5 mta.text $1 You rolled 7, $mta.nick($1,$2) $+ , you got %f $iif(%f == 1,warn!,warns!))

Link to comment
  • Replies 644
  • Created
  • Last Reply

Top Posters In This Topic

ok try this, i havent been able to test it so let me know how it is...

it should be fine (fingers crossed) ive tidied it up a bit, although it could be made much smaller.

ive left it kind of like how u gave it me tho, so i know u can edit it to be how u need it. :lol:

on *:SIGNAL:mta.command: { 
  if ($3 == !roll) prs.roll $1 $2 
} 
  
alias prs.roll { 
  if ($hget(prstemp,timertest) == on) { 
    mta.pm $1 $2 Please Wait...Command Can Only Be Used Once Every 30Secs. 
  } 
  elseif ($hget(pgstemp,allow $+ $2) == no) mta.pm $1 $2 Plz Try Later - Accessing Details! 
  else { 
    !hadd -u30 prstemp timertest on 
    mta.pm $1 $2 Rolling the dice... 
    .timer 1 5 prs.rolled $1 $2 
  } 
} 
  
alias prs.rolled { 
    var %a = $rand(1,7) 
    if (%a == 1) {  
      var %c = $rand(1000,6000) 
      pgs.add $mta.nick($1,$2) %c 
      mta.text $1 You rolled 1, $mta.nick($1,$2) $+ , $chr(36) $+ %c added to your cash. 
    } 
    elseif (%a == 2) { 
      var %c = $rand(1000,6000) 
      pgs.sub $mta.nick($1,$2) %c 
      mta.text $1 You rolled 2, $mta.nick($1,$2) $+ , you just lost $chr(36) $+ %c 
    } 
    elseif (%a == 3) { 
      mta.text $1 You rolled 3, $mta.nick($1,$2) $+ , which is mute. 
      mta.mute $1 $2 
      .timerunmuteroll $+ $2 1 30 mta.unmute $1 $2 
    } 
    elseif (%a == 4) { 
      var %d = $rand(1000,2000) 
      pgs.add $mta.nick($1,$2) %d 
      mta.text $1 You rolled 4, $mta.nick($1,$2) $+ , $chr(36) $+ %d added to your cash. 
    } 
    elseif (%a == 5) { 
      !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + 1) 
       mta.text $1 You rolled 5, $mta.nick($1,$2) so 1 point added to your stats. 
    } 
    elseif (%a == 6) { 
      var %e = $rand(1000,9999) 
      pgs.add $mta.nick($1,$2) %e 
      mta.text $1 You rolled 6, $mta.nick($1,$2) $+ , $chr(36) $+ %e added to your cash. 
    } 
    elseif (%a == 7) { 
      var %f = $rand(1,5), %warns = $calc($hget(prswarns,$mta.nick($1,$2)) + %f) 
      !hadd prswarns $mta.nick($1,$2) %warns 
       mta.text $1 You rolled 7, $mta.nick($1,$2) $+ , you got %f $iif(%f == 1,warn!,warns!) 
    } 
  } 
} 

im sure u dont need me to explain how to add it, but if u do just let me know or failing that, u can always run it in a new .mrc file.

Edited by Guest
Link to comment

Scooby. I've tried !roll script in WPK server, but those 30 secs go like for all players.( for exmaple if i do roll and other do roll after 5 secs it gives "bluh bluh bluh 30 secs") Maybe You could fix that and also sometimes it just dont do anything. It pm's Rolling... and does nothing

Link to comment
Scooby. I've tried !roll script in WPK server, but those 30 secs go like for all players.( for exmaple if i do roll and other do roll after 5 secs it gives "bluh bluh bluh 30 secs") Maybe You could fix that and also sometimes it just dont do anything. It pm's Rolling... and does nothing

Hi, Yeah i made it so it can only be used once every 30 secs, im guessing ud prefer a version that works for all but has a 30 sec counter for each person? that should be easy enough to change...

as for the 'sometimes it wont roll' coz it thinks its still rolling, does this ever fix? or once it stops, does it stay stopped?

ive changed it a little, Try this:

on *:SIGNAL:mta.command: { 
  if ($3 == !roll) prs.roll $1 $2 
} 
  
alias prs.roll { 
  if ($hget(prstemp $+ $2,timertest) == on) { 
    mta.pm $1 $2 Please Wait...Command Can Only Be Used Once Every 30Secs. 
  } 
  elseif ($hget(pgstemp,allow $+ $2) == no) mta.pm $1 $2 Plz Try Later - Accessing Details! 
  else { 
    !hadd -u30 prstemp $+ $2 timertest on 
    mta.pm $1 $2 Rolling the dice... 
    .timer 1 5 prs.rolled $1 $2 
  } 
} 
  
alias prs.rolled { 
    var %a = $rand(1,7) 
    if ((%a == 1) || (%a == 2)) {  
      var %c = $rand(1000,6000) 
      pgs.add $mta.nick($1,$2) %c 
      mta.text $1 You rolled a %a $mta.nick($1,$2) $+ , $chr(36) $+ %c added to your cash. 
    } 
    elseif ((%a == 3) || (%a == 4)) { 
      var %c = $rand(1000,6000) 
      pgs.sub $mta.nick($1,$2) %c 
      mta.text $1 You rolled a %a $mta.nick($1,$2) $+ , you just lost $chr(36) $+ %c 
    } 
    elseif (%a == 5) { 
      mta.text $1 You rolled a 5 $mta.nick($1,$2) $+ , which is mute. 
      mta.mute $1 $2 
      .timerunmuteroll $+ $2 1 30 mta.unmute $1 $2 
    } 
    elseif (%a == 6) { 
      mta.text $1 You rolled a 6 $mta.nick($1,$2) $+ , which is freeze. 
      mta.freeze $1 $2 
      .timerunfreezeroll $+ $2 1 30 mta.unfreeze $1 $2 
    } 
    else { 
      !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + 1) 
       mta.text $1 You rolled a 7 $mta.nick($1,$2) $+ , 1 point added to your stats. 
    } 
  } 
} 

Link to comment
I wanna want to showing alive players NICKS

ok try this:

on *:SIGNAL:mta.command: { 
  if ($3 == !alive) { 
    if (prs.mode($1) == deathmatch) mta.text $1 Alive: $prs.alivelist($1) 
    else mta.pm $1 $2 Error - Command Only For DM Maps. 
  } 
} 
  
alias prs.alivelist { 
  var %a = 0,%b 
  while (%a < %loop) { 
    if ($hget(prstemp,alive $+ %a) == yes) { 
      %b = %b $+ , $mta.nick($1,%a) 
    } 
    !inc %a 
  } 
  %b = %b $+ . 
  !return %b 
} 

try this.

Link to comment
Scooby can u do for me script to !movestats when scripts transferring stats from old nick to new nick?

its not possible to change, there are too many.

the basic ones are easy enough but i think theres hundreds/thousands that would need to be changed to transfer them completely to a new name,

its not as simple as just changing something simple like wins/losses,cash,records, each player has a set of stats for each map,

changing them all would either crash mirc or just take way too long.

when i used to have this problem, if i could be bothered (ie if it was a regular player who'd played in my server for a long time)

i used to close mirc and then open each .txt file manually and use the rename function in notepad.

this will take less that 1 minute to do. once all .txt files have had the names renamed reopen mirc.

all the stats will now be under the new name.

bit of a headache i know, but its way faster than me trying to write a script to do it :mrgreen:

Link to comment
maybe there is possibility to make command !setmodeall?

ok add this in mta.command:

elseif (($3 == !setmodeall) && ($prs.level($1,$2) == 5)) prs.setmodeall $1- 

then add this alias:

alias prs.setmodeall { 
  if ($4 != $null) { 
    var %a = 0 
    while (%a < $mta.races($1)) { 
      var %race = $replace($mta.races($1,%a),$chr(32),$chr(45)) 
      !hadd prsstats mode $+ %race $4 
      !inc %a 
    } 
  mta.text $1 $mta.nick($1,$2) Set The Mode On All Maps To $4 
  } 
  else mta.pm $1 $2 Error - !setmodeall <mode> 
} 

once again, untested so let me know if theres any problems

Link to comment
Em... I really want this script!... but one question. How can I use it? :idea::?

the !setmodeall command?

In the prs script, line 37 (this should be a couple of lines down the signal:mta.command),

add this:

elseif (($3 == !setmodeall) && ($prs.level($1,$2) == 5)) prs.setmodeall $1- 

then at the very bottom of the script, scroll down as far as u can, then paste in the alias below.

alias prs.setmodeall { 
  if ($4 != $null) { 
    var %a = 0 
    while (%a < $mta.races($1)) { 
      var %race = $replace($mta.races($1,%a),$chr(32),$chr(45)) 
      !hadd prsstats mode $+ %race $4 
      !inc %a 
    } 
  mta.text $1 $mta.nick($1,$2) Set The Mode On All Maps To $4 
  } 
  else mta.pm $1 $2 Error - !setmodeall <mode> 
} 

the command is !setmodeall

Link to comment
Come on! I just got it that I need full/orginal version of this. But when I search I can find only THIS (1.3)! Help me! :(

hmm well we can spend all day leaving msgs for eachother... but unless u tell me what it is that u want, then i dont know what to say.

'full version of this'......

what is 'this'...

what is it you want lol?????

there is no more.... if u think there is... this is it... the snippet of code,

once added to prs 1.3 this will enable you to set the mode for every map to the same mode.

(ideal if u only have DM maps)

Once uve decided what u need, post here and i'll get back to u asap :)

Link to comment

Ok, maybe I said wasn't clear. So, I've got just DD/DM maps. But the only thing I wanted is to get script. I haven't got PRS ( really don't know what it is). So do I have to get PRS installed and then... just put your file into? If yes, I can't find PRS or whatever. So I have no clue where to get Public Release Script, what to do next and how make my script work.. :roll:

Link to comment

ok, now we're getting somewhere.

I think all the scripting in this thread is related towards PRS,

so if ur looking at something somewhere in this thread, then more than likely its for use with PRS.

PRS-1.3 can be found on the very first post, its not hard to find.

You can read some of the functions available in the first post and make ur mind up if its what u need.

Do u use a script already? If so, which?

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...