|
bryan myhr Newbie
Joined: 06 May 2002 Posts: 8 Location: USA
|
Posted: Mon May 06, 2002 11:12 pm
SafeCrack |
I am havin a really hard time making a trigger that can choose numbers
in
order.
I need it to choose 3 numbers between 0-25 in a command going from 0 0
0
to 25 25 25 in order. and i also need it to be able to do it on many
different objects at the same time. I don't know if this is the right
forum for this kind of question, but it would be helpful if you could
tell
me what needs to be done. or just point me to a link that could show me
what to do. thanks.
I also need to be able to start the counting in the middle of it so that i can start and stop it if i log off.
This is commonly known as a safe crack, and if anybody has one, and can help me with mine it would be of great help. thanks |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue May 07, 2002 12:08 am |
I know I wrote something similar just a little while ago, but I can't find it. So here goes a new one.
I will provide a set of aliases to update the safe cracking numbers. They will be left in a variable so you can do whatever you want with them.
#CLASS SafeCracker
#VAR SafeAttempt {"0 0 0"}
#VAR SafeMaxWidth {3}
#VAR SafeMinWidth {3}
#VAR SafeHighNumber {25}
#VAR SafeLowNumber {0}
#VAR TempSafeData {0}
#VAR TempSafeCounter {0}
#VAR TempSafeCarryFlag {0}
#ALIAS IncSafeAttempt {#IF (%numwords(@SafeAttempt)<@SafeMinWidth) {ResetSafeAttempt;#ECHO Safe data was invalid, reset done.} {TempSafeCounter=%numwords(@SafeAttempt);TempSafeData=%replace(@SafeAttempt," ","|");#WHILE (@TempSafeCounter) {TempSafeCarryFlag=%eval(%number(%item(@TempSafeData,@TempSafeCounter))+1);#IF (@TempSafeCarryFlag>@SafeHighNumber) {TempSafeData=%replaceitem(@SafeLowNumber,@TempSafeCounter,@TempSafeData);#ADD TempSafeCounter -1;#IF (@TempSafeCounter=0) {TempSafeData=%concat(@SafeLowNumber,"|",@TempSafeData)}} {TempSafeData=%replaceitem(@TempSafeCarryFlag,@TempSafeCounter,@TempSafeData);TempSafeCarryFlag=0;TempSafeCounter=0}};#IF (%numitems(@TempSafeData)>@SafeMaxWidth) {ResetSafeAttempt;#ECHO Safe max reached.} {SafeAttempt=%replace(@TempSafeData,"|"," ")}}}
#ALIAS ResetSafeAttempt {SafeAttempt=%trim(%repeat(%concat(@SafeLowNumber," "),@SafeMinWidth))}
#ALIAS SetSafeParams {#IF (%numparam!=4) {#ECHO Usage: SetSafeParams Low High MinWidth MaxWidth} {SafeLowNumber=%param(1);SafeHighNumber=%param(2);SafeMinWidth=%param(3);SafeMaxWidth=%param(4);ResetSafeAttempt}}
#CLASS 0
I tested it everthing looked good. |
|
|
|
Sildaren Wanderer
Joined: 19 Jul 2001 Posts: 59 Location: Germany
|
Posted: Tue May 07, 2002 12:25 am |
Adding a 'fast and dirty' method for varity...
(lots of way to do it especially if you don't tell details like how fast you want
to send the commands, or when you want to stop/resume it.)
Three numbers with range of 0 to 25 is basically the same thing as one number going from 0 to 26*26*26.
Now you only need to convert the number into a base-26-system.
#VAR cracknum 0
#ALI docrack {crack %eval(@cracknum/(26*26)) %eval((@cracknum/26)26) %eval(@cracknum26);#ADD cracknum 1}
now type 'docrack' at commandline and keep enter pressed and it will send
crack 0 0 0
crack 0 0 1
crack 0 0 2
....
crack 0 1 25
crack 0 2 0
crack 0 2 1
...
If you want to stop to resume another day, you only need to save the current value of @cracknum |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue May 07, 2002 12:28 am |
Very nice and compact. I had forgotten that trick.
TonDiening
Beta Upgrading to 6.26 |
|
|
|
bryan myhr Newbie
Joined: 06 May 2002 Posts: 8 Location: USA
|
Posted: Tue May 07, 2002 12:35 am |
all these methods look great but there a few drawbacks, you have to type turn a safe to # # #, i can't quite figure out how to manipulate these triggers to change that. and every 2 times that the safe is turned, you have to wait 15 sec before you turn it again, i know that would constitute an #ALARM +15 but i am not quite sure where to put it in.
|
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Tue May 07, 2002 1:09 am |
Feeding off of Sildaren's method, just update it to this:
#var counter 0
#var keepgoing 1
#ALI docrack {#if (@keepgoing) {turn a safe to %eval(@cracknum/(26*26)) %eval((@cracknum/26)26) %eval(@cracknum26);#ADD cracknum 1;#add counter 1;#if (@counter>1) {#alarm +15 {docrack}} {docrack}}}
#alias STOP {#var keepgoing 0}
#alias atdisconnect {STOP}
This will automate the process and if you just type STOP, it will stop the process. Or if you log off, it'll stop the process as well. You can go even further and use #temp triggers to move to the next sequence if you receive a failure message of some sort. If you receive a success message, then you'll want to stop trying to crack the safe and do something else.
Iljhar |
|
|
|
Sildaren Wanderer
Joined: 19 Jul 2001 Posts: 59 Location: Germany
|
Posted: Tue May 07, 2002 1:13 am |
Not much change needed for that
#VAR cracknum 0
#ALI docrack {turn a safe to %eval(@cracknum/(26*26)) %eval((@cracknum/26)26) %eval(@cracknum26);#ADD cracknum 1}
#ALARM {*15} {docrack;docrack} cracking
#BUTTON 1 {pause} {#T+ cracking} {in progress} {#T- cracking}
I put two calls of the cracking alias into the alarm since you said you have two tries before the pause.
The button is just for convenience.
(to keep it 'quick and dirty' you better just type '#IG' to stop or resume it )
Tested with v5.54 and v6.26a |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Tue May 07, 2002 1:15 am |
quote:
and every 2 times that the safe is turned, you have to wait 15 sec before you turn it again
26^3 attempts at 2 attempts per 15 seconds is over 36 hours of script running worst case, 18 hours average (assuming that the combination is random). Hope botting is allowed, because this is pretty blatant
Is there any more information you can give us? Telling us how we know the safe is open would be great so that we can reach inside and grab the cash before the zone resets, or another player wanders in and loots the safe while we continue to twiddle the dial.
Inside an alarm, Sildaren's method is probably most useful, because we just track the one variable between calls.
So, in your 15 second alarm:
#exec docrack
#exec docrack
and then reset the alarm for another 15 seconds.
-Tarn |
|
|
|
bryan myhr Newbie
Joined: 06 May 2002 Posts: 8 Location: USA
|
Posted: Tue May 07, 2002 1:32 am |
ok click is what it would say when it is open. get all from a safe is the command to get the stuff out.
I did the "feeding off" reply thing. but i cant get it to stop, or reset :) |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Tue May 07, 2002 2:41 am |
I'd update the script to Sildaren's new version, heh. Forget about my reply ;)
Iljhar |
|
|
|
bryan myhr Newbie
Joined: 06 May 2002 Posts: 8 Location: USA
|
Posted: Tue May 07, 2002 3:19 am |
ok i got it, thanks Sildaren. for some reason it only changes the combo once, and it tries to open it twice, then waits 15 seconds. other than that it works, and i love the button. Ack! I also just realized that if there is more than one safe in a room it will switch between each safe as to which one gets turned. so i would have to put some sort of input to change the target depending on how many safes are in the room. If there were 3 safes in the room, every time i turn a safe, it switches, so that the first time would be turn 1st safe, the second time would be 2nd safe, and so on. If you cant get it past 2 safes that would be ok with me, but some rooms have mulitple safes and it could take forever, if the safes keep switchin names :P only other things i need to know is how to reset it. and if i log back on, how i start it back where i left off?
You guys have been a great help, i know this is obscure, but Thanks Alot! |
|
|
|
Sildaren Wanderer
Joined: 19 Jul 2001 Posts: 59 Location: Germany
|
Posted: Tue May 07, 2002 7:09 pm |
I'd think you can target one of several safes, by using something like 'turn 2nd safe to ...', instead of 'turn a safe to ...'.
But that is completly mud-specific and has nothing to do with zMUD.
(If you don't know how to target a certain safe manually there is no way to teach zMUD to do so.)
Resetting the counter is just another
#VAR cracknum 0
if you want to start from 0 0 0 again, or eg.
#MATH cracknum {5*26*26+3*26+1}
if you want to make it start at the combo 5 3 1
I don't see how my script can possibly use the same combo twice,
because the turn-command and increasing the counter are in the same alias - no way
to 're-use' the same combo, except if you have another script that touches the variable cracknum.
You can include iljhar's idea by adding the line:
#alias atdisconnect {#BUTTON 1 1}
which will automatically pauses the alarm when you get disconnected.
(you can resume after re-connecting by hitting the button again.) |
|
|
|
bryan myhr Newbie
Joined: 06 May 2002 Posts: 8 Location: USA
|
Posted: Tue May 07, 2002 8:11 pm |
ok i figured out that you are right, if you use 1st, 2nd, 3rd, 4th... 32nd. it stays with that target. I would also like to know how to clear everything i've put in because i think i doubled some stuff up. and could you just put in one reply everything that i should put in to make this work. I also realized that there has to be a 2 sec deley between each turn. also when you turn the numbers sometimes it says 'you get cramps'. if it does that i need the whole count up thing not to count up. otherwise the combination will be skipped :P.i need to know is how to switch targets. everything else works great.
Thanks alot! |
|
|
|
bryan myhr Newbie
Joined: 06 May 2002 Posts: 8 Location: USA
|
Posted: Thu May 09, 2002 1:20 am |
I messed around with it, and i managed to get it to work like this.
#VAR cracknum 0
#ALI docrack {turn caster to %eval(@cracknum/(26*26)) %eval((@cracknum/26)26) %eval(@cracknum26);#ADD cracknum 1}
#TRIGGER {you get cramps} {#ADD cracknum -1}
#ALARM {*11} {docrack}
#ALARM +2 {docrack} cracking
#BUTTON 1 {pause} {#T+ cracking} {in progress} {#T- cracking}
Resetting the counter is just another
#VAR cracknum 0
if you want to start from 0 0 0 again, or eg.
#MATH cracknum {5*26*26+3*26+1}
if you want to make it start at the combo 5 3
Thanks alot. this has really helped me to understand zmud much better. |
|
|
|
|
|