Top

Safe Crack


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  6.3 (of 3 scores)
Date Added  Aug 13, 2009
Last Updated  Aug 13, 2009
Tags  bored  boring  fun  games  hacker  random  rs  runescape  safe  skill  stats  thief 

Description

A simple script for when your bored.
Basically you pick a random number (the higher the level your on, the bigger the numbers)
if you get the number right, you'll advance to the next level.

Trigger:
/safe

Grab the Code

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Zerg's Safe Alias------------------;;
;;Coded By Zerg----------------------;;
;;Contact on: Irc.swiftirc.net 6667--;;
;;#zergs_list #fender or #gs-pure----;;
;;All rights reserved.---------------;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
alias Safe {
  safegame
}
alias safegame {
  if (%level == 1) || (%level == $null) {
    set %level 1
    set %safe.num $r(1,3)
    set %safe.guess $$?="Guess a number, between 1 and 3"
    if (%safe.guess == %safe.num) {
      inc %level
      echo -a 12You've cracked the04 First safe, 12Your now on level:04 2
      safegame
    }
    else {
      echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num 12You're now on safe level:04 %level
    }
  }
  if (%level == 2) {
    set %safe.num $r(1,6)
    echo -a 12Hints: The Number can be:04 %safe.num $r(1,6) $r(1,6) $r(1,6)
    set %safe.guess $$?="Guess a number, between 1 and 6"
    if (%safe.guess == %safe.num) {
      inc %level
      echo -a 12You've cracked the04 Second safe, 12Your now on level:04 3
    }
    else {
      //dec %level
      echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num 12You're now on safe level:04 %level
    }
  }
  if (%level == 3) {
    set %safe.num $r(1,9)
    echo -a 12Hints: The Number can be:04 $r(1,9) $r(1,9) %safe.num $r(1,9) $r(1,9) 
    set %safe.guess $$?="Guess a number, between 1 and 9"
    if (%safe.guess == %safe.num) {
      inc %level
      echo -a 12You've cracked the04 Third safe, 12Your now on level:04 4
    }
    else {
      //dec %level
      echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num 12You're now on safe level:04 %level
    }
  }
  if (%level == 4) {
    set %safe.num $r(1,15)
    echo -a 12Hints: The Number can be:04 $r(1,15) %safe.num $r(1,15) $r(1,15) $r(1,15) $r(1,15) 
    set %safe.guess $$?="Guess a number, between 1 and 15"
    if (%safe.guess == %safe.num) {
      inc %level
      echo -a 12You've cracked the04 Fourth safe, 12Your now on level:04 5
    }
    else {
      //dec %level
      echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num 12You're now on safe level:04 %level
    }
  }
  if (%level == 5) {
    set %safe.num $r(1,35)
    echo -a 12Hints: The Number can be:04 %safe.num $r(1,35) $r(1,35) $r(1,35) $r(1,35) $r(1,35) 
    set %safe.guess $$?="Guess a number, between 1 and 35"
    if (%safe.guess == %safe.num) {
      inc %level
      echo -a 12You've cracked the04 Fifth safe, 12Your now on level:04 6
    }
    else {
      //dec %level
      echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num 12You're now on safe level:04 %level
    }
  }
  if (%level == 6) {
    set %safe.num $r(1,100)
    echo -a 12Hints: The Number can be:04 $r(1,100) %safe.num $r(1,100)
    set %safe.guess $$?="Guess a number, between 1 and 100"
    if (%safe.guess == %safe.num) {
      unset %level
      echo -a 12You've cracked the 04Sixth safe12, You Get the gold!
      set %gold $rand(1,50000000)
      set %mygold $calc( %mygold + %gold )
      echo -a 12You've got:04 $bytes(%gold,bd) gold 12from this safe. Enjoy your winnings. Your Total Gold:04 $+($chr(36),$bytes(%mygold,bd))
    }
    else {
      //dec %level
      echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num 12You're now on safe level:04 %level
    }
  }
}
 

Comments

  (18)  RSS
[HANZam]
Comments: 17
 
mIRC Snippet:  Safe Crack
Posted on Aug 13, 2009 3:38 am
it works.. nice game...
Ghost-writer
Comments: 353
 
mIRC Snippet:  Safe Crack
Posted on Aug 13, 2009 12:34 pm
Tbh this is the first ive seen a game like this. VERY original i like it. :) 9/10
Zerg
Comments: 16
 
mIRC Snippet:  Safe Crack
Posted on Aug 13, 2009 6:21 pm
thanks guys.
EMMURE
Comments: 17
 
mIRC Snippet:  Safe Crack
Posted on Aug 13, 2009 6:31 pm
ive seen one game like this, where a random number was assigned as the answer, and people join the game, then guess a number, and itll tell you higher or lower, and you go from there, first person to get the random number right wins, :) was a great game though 9/10
Zerg
Comments: 16
 
mIRC Snippet:  Safe Crack
Posted on Aug 13, 2009 8:14 pm
Thanks emmure, but mine is a single player alias instead of a multi-user channel game.

and i was bored and this idea came out of the blue.

thanks though!
EMMURE
Comments: 17
 
mIRC Snippet:  Safe Crack
Posted on Aug 14, 2009 1:03 pm
yea i found the script Zerg, he posted it here on hawkee a while back. here it is just to let you know what i was talking about :p http://www.hawkee.com/snippet/6010/ is a compilation of some of his scripts, the bottom portion is the number game.
b0sse
Comments: 16
 
mIRC Snippet:  Safe Crack
Posted on Aug 23, 2009 10:17 am
Wow, real nice Zerg 9/10

Is it possible to make it a trigger like !safe instead of an alias?
still a 1-player game, but so it messages the channel so everyone could see when you are playing, instead of just echo to yourself with alias.

lemme know
Ghost-writer
Comments: 353
 
mIRC Snippet:  Safe Crack
Posted on Aug 23, 2009 10:33 am
Bosse you could put this on a bot!
on $*:TEXT:/^[!@.]cracked/Si:#:{
if ( %safecrack [ $+ [ $nick ] ] == $null ) {
set %safecrack [ $+ [ $nick ] ] 0
msg # $nick has cracked %safecrack [ $+ [ $nick ] ] safes
}
elseif ( %safecrack [ $+ [ $nick ] ] == 1 ) {
msg # $nick has cracked %safecrack [ $+ [ $nick ] ] safe!
}
else {
msg # $nick has cracked %safecrack [ $+ [ $nick ] ] safes!
}
}
on $*:TEXT:/^[!@.]safe/Si:#:{
if ( %money [ $+ [ $nick ] ] >= 200 ) {
if ( %safecracking == $null ) {
set %safecracker $nick
set %safecracking 1
msg # $nick enters a bank and starts cracking the safe!
set %safenumber $rand(1,3)
set %moneyloss $rand(50,100)
timer208 -o 1 50 msg # $nick has tooken to long and lost %moneyloss dollars after bribeing the cops to say they was just "looking"
timer207 -o 1 50 dec %money [ $+ [ $nick ] ] %moneyloss
timer206 -o 1 50 unset %safecracker
timer205 -o 1 50 unset %safecracking
timer204 -o 1 50 unset %turn
timer203 -o 1 50 timersafe off
timer202 -o 1 50 set %steth 0
timer201 -o 1 2 msg # $nick must now try to crack the safe! What will your first number be?
}
else { notice $nick %safecracker is already cracking a safe
}
}
else { notice $nick you dont have enough money to bribe the cops if you get caught!
}
}
on $*:TEXT:/^[!@.]stethoscope/Si:#:{
if ( %steth [ $+ [ $nick ] ] >= 0 ) {
if (%steth >= 4 ) { msg # The stethoscope you have breaks in your hands from excess use. | halt }
elseif ( $nick == %safecracker ) {
notice $nick you hear the dial spinning and stop at %safenumber
inc %steth $rand(1,4)
}
else {
notice $nick you are not the safe cracker
}
}
else { .notice $nick you dont have a stethoscope to use.
}
}
on *:TEXT:*:#: {
set %moneyloss $rand(200,700)
set %moneygain $rand(5000,13000)
if ( %safecracker == $nick ) {
if ( $1 == %safenumber ) {
if ( %turn == 3 ) { msg # you have cracked the safe! and ran out of the bank with %moneygain dollars! | inc %money [ $+ [ $nick ] ] %moneygain | inc %mug [ $+ [ $nick ] ] | timer20? off | unset %turn | unset %safecracking | set %steth 0 | inc %safecrack [ $+ [ $nick ] ] | unset %safecracker | halt }
elseif ( %turn == 2 ) { msg # you have 1 more number to crack! say your next number! | set %safenumber $rand(1,3) | inc %turn 1 | halt }
elseif ( %turn == 1 ) { msg # you have cracked the second number! say the next number! | set %safenumber $rand(1,3) | inc %turn 1 | halt }
elseif ( %turn == $null ) { msg # you have cracked first number! 3 more, say the next number! | set %safenumber $rand(1,3) | set %turn 1 | halt }
}
if ( $1 == 1 ) { msg # you have picked the wrong number the alarm has went off and the police charge you %moneyloss dollars for robbery
if ( %moneyloss >= %money [ $+ [ $nick ] ] ) {
set %money [ $+ [ $nick ] ] 0
unset %safecracker
unset %safecracking
unset %turn
timersafe off
set %steth 0
timer20? off
}
else {
dec %money [ $+ [ $nick ] ] %moneyloss
unset %safecracker
unset %safecracking
unset %turn
timersafe off
set %steth 0
timer20? off
}
}
if ( $1 == 2 ) { msg # you have picked the wrong number the alarm has went off and the police charge you %moneyloss dollars for robbery
if ( %moneyloss >= %money [ $+ [ $nick ] ] ) {
set %money [ $+ [ $nick ] ] 0
unset %safecracker
unset %safecracking
unset %turn
timersafe off
set %steth 0
timer20? off
}
else {
dec %money [ $+ [ $nick ] ] %moneyloss
unset %safecracker
unset %safecracking
unset %turn
timersafe off
set %steth 0
timer20? off
}
}
if ( $1 == 3 ) { msg # you have picked the wrong number the alarm has went off and the police charge you %moneyloss dollars for robbery
if ( %moneyloss >= %money [ $+ [ $nick ] ] ) {
set %money [ $+ [ $nick ] ] 0
unset %safecracker
unset %safecracking
unset %turn
timersafe off
set %steth 0
timer20? off
}
else {
dec %money [ $+ [ $nick ] ] %moneyloss
unset %safecracker
unset %safecracking
unset %turn
timersafe off
set %steth 0
timer20? off
}
}
}
}
of course its just a different version of this, Works in the exact same way from what i know :P But i never passed lv 1 so i could be wrong :|
Ghost-writer
Comments: 353
 
mIRC Snippet:  Safe Crack
Posted on Aug 23, 2009 10:33 am
Or you could put msg # instead of echo :X but thats the loser way
wizard38
Comments: 25
 
mIRC Snippet:  Safe Crack
Posted on Aug 25, 2009 2:52 am
how i start this game?
Ghost-writer
Comments: 353
 
mIRC Snippet:  Safe Crack
Posted on Aug 25, 2009 7:59 pm
alias Safe {
safegame
}
you type /safe
Zerg
Comments: 16
 
mIRC Snippet:  Safe Crack
Posted on Aug 28, 2009 6:51 am
wizard, yes, i can make it a channel game, and yes, i will write it for you, just tell me if you want it multichan.
wizard38
Comments: 25
 
mIRC Snippet:  Safe Crack
Posted on Aug 28, 2009 10:40 am
I think there's an easier way
Like this:
ON *:TEXT:!safe:#:{
I changed but is not working well
I like this game
b0sse
Comments: 16
 
mIRC Snippet:  Safe Crack
Posted on Aug 28, 2009 3:45 pm
Zerg, actually it was me who asked for it to be channel game like !safe trigger, and not wizard :P

"Posted on Aug 23, 2009 10:17 am Edit
Wow, real nice Zerg 9/10

Is it possible to make it a trigger like !safe instead of an alias?
still a 1-player game, but so it messages the channel so everyone could see when you are playing, instead of just echo to yourself with alias.

lemme know"

anyway, it doesnt have to be multichan, since im mostly only in one channel (the one im founder of) so it should be okay.
Ghost-writer
Comments: 353
 
mIRC Snippet:  Safe Crack
Posted on Aug 28, 2009 9:47 pm
wizard if you want it so when you type safe make it on input ;] And zerg, send me the channel version D:!
Korvin
Comments: 421
 
mIRC Snippet:  Safe Crack
Posted on Aug 29, 2009 2:04 am
check this shizznizle out. Your game, but never ending, and in a better dialog..
Code:
alias sfe.hint {
  var %r $$did(sfe,66)
  if ($2 <= $1) { tokenize 32 $1 $calc($1 +1) %r }
  var %i = $1,%e = $rand(1,$1)
  while %i > 0 {
    var %c $rand(1,$2)
    if (%c != %r) { did -a sfe 6 $iif(%i == %e,%r,%c) | dec %i }
  }
}
alias safe { dialog -m sfe sfe }
alias sfe {
  unset %safe.*
  var %safe.amnt $calc(%level * 3)
  var %safe.num2 $did(sfe,66)
  var %safe.guess2 $1
  if (%safe.guess2 == %safe.num2) {
    echo -a 12You've cracked the04 %level $+ $iif(%level == 1,st,$iif(%level == 2,nd,$iif(%level == 3,rd,th))) safe, 12You're now on level:04 $calc(%level + 1)
    inc %level
  }
  else {
    $iif(%level > 1,dec %level)
    echo -a 04You've 04mis-hit the lock12, the correct number was:04 %safe.num2 12You're now on safe level:04 %level
  }
  dialog -x sfe sfe
  dialog -m sfe sfe
}
dialog sfe {
  title "Safe"
  size -1 -1 62 67
  option dbu
  text "Hint", 1, -147 0 10 8, disable center
  button "Crack", 2, 4 54 50 10
  edit "", 3, 30 44 25 10
  text "Guess:", 4, 4 45 25 8, right
  list 6, 4 6 54 30, size
  text "", 66, 1 1 1 1, hidden
  box Hint, 7, 2 0 58 38
  box Group Box, 5, 2 38 58 28
}

on *:dialog:sfe:init:*: {
  if !%level { set %level 1 }
  unset %safe.*
  var %safe.amnt $calc(%level * 3)
  did -ra sfe 66 $r(1,%safe.amnt)
  echo -a 12You're currently on level:04 %level
  sfe.hint $calc(%level + 2) %safe.amnt
}
on *:dialog:sfe:sclick:2: { sfe $$did(sfe,3) }
on *:dialog:sfe:dclick:6: { did -ra sfe 3 $did(sfe,6).seltext }


Granted all rights.
grats
wizard38
Comments: 25
 
mIRC Snippet:  Safe Crack
Posted on Aug 29, 2009 2:20 am
wizard if you want it so when you type safe make it on input ;] And zerg, send me the channel version D:!

I dont know how to do it
Zerg
Comments: 16
 
mIRC Snippet:  Safe Crack
Posted on Sep 24, 2009 8:40 am
i'll publish a channel version as soon as i get the time to re-write it.

I'm currently VERY busy with program development for school, and have very little free time due to social life.

I'll get on it when i can, sorry for any delay.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom