View Full Version : Wrack Script
Celexei
09-02-2006, 11:20 AM
It has come blatently to my attention...that I R n00b, or just damn tired at 7 in the morning without having slept yet. After a few spirit deaths do to not paying attention to my status apon wracking...I've decided that I should write a script for my Alias Wrack. Something that checks my spirit for me before I send myself into the nether world. Before doing this I figured I'd just throw it out there, and see if someone else had already come up with the idea, or if I was just that stupid for not paying attention. Anywho, if'n no one else has already done said script...I'll be sure to post mine after creation.
StrayRogue
09-02-2006, 11:29 AM
I just bodged this together from some scripts I used when the Wizard was in fashion:
#Wrack
Wrack:
put health
match wracking Remaining Spirit Points: 10
match wracking Remaining Spirit Points: 9
match wracking Remaining Spirit Points: 8
match rest Remaining Spirit Points: 7
match rest Remaining Spirit Points: 6
match rest Remaining Spirit Points: 5
match rest Remaining Spirit Points: 4
match rest Remaining Spirit Points: 3
match rest Remaining Spirit Points: 2
match rest Remaining Spirit Points: 1
matchwait
Wracking:
put sign of wracking
waitfor You
exit
Rest:
put my chara thinks "I'm too weak to do this".
waitfor You
exit
Celexei
09-02-2006, 11:35 AM
Well hell that saves time...thank you very much!
TheEschaton
09-02-2006, 11:55 AM
I just made a few edits (in bold) to Stray's script, I think the verb is mychar, not my char?
#Wrack
Wrack:
put health
match wracking Remaining Spirit Points: 10
match wracking Remaining Spirit Points: 9
match wracking Remaining Spirit Points: 8
match rest Remaining Spirit Points: 7
match rest Remaining Spirit Points: 6
match rest Remaining Spirit Points: 5
match rest Remaining Spirit Points: 4
match rest Remaining Spirit Points: 3
match rest Remaining Spirit Points: 2
match rest Remaining Spirit Points: 1
matchwait
Wracking:
put sign of wracking
waitfor You
exit
Rest:
put mychar thinks "I'm too weak to do this".
waitfor You
exit
Bobmuhthol
09-02-2006, 02:44 PM
I set up a couple scripts a while ago in JSE to automatically wrack for me.
#autowrack.Cmd
registerscript wracking
loop:
ifset stop_wracking exit
if(%mana% < 10)
if(%spirit% > 5)
put sign of wracking
endif
endif
pause 1
goto loop
#endwrack.Cmd
registerscript stop_wracking
loop:
ifset wracking goto loop
echo *** Autowrack has ended. ***
exit
You'd run autowrack.cmd and it would use sign of wracking at any time that you're under 10 mana and over 5 spirit. To stop the script, use endwrack.cmd and wait for the echo that the script has stopped itself.
StrayRogue
09-03-2006, 05:27 AM
Any chance you could add a variable that if there were people in the room it wouldn't wrack?
Silly question.. Doesn't MYCHAR bring whatever you say in that line to GM attention?
StrayRogue
09-03-2006, 06:45 AM
There are too distinct variants of the verb:
1) mychara alone is an OOC tool which communicates with any GM in the room. It is not like Report which will send a prompt to all GMs online, but rather an OOC whisper of sorts. It could be used for something like > mychara Hates humans or whatever, to allow the GM RPing with you to know a little more about your character.
2) Mychara thinks Is more of a RP tool which allows you to think things to yourself. While I know this won't be useful to many, to more silent characters can use this for their own edification. I used mychara thinks loads of times. It is also visible to GMs in the room.
Cool. Don't think I'll use it for the GM side of things since I only really see em when I'm assisted. But excellent for enjoying my own RP.
Bobmuhthol
09-03-2006, 08:21 PM
<<Any chance you could add a variable that if there were people in the room it wouldn't wrack?>>
It's possible.
#autowrack.Cmd
registerscript wracking
loop:
ifset stop_wracking exit
if(%mana% < 10)
if(%spirit% > 5)
gosub people
if(%currentroompeople% != )
pause 15
goto loop
endif
put sign of wracking
endif
endif
pause 1
goto loop
people:
put look
return
That should make it look, pause 15 if someone is around and look again, if the room is empty at the first look or a subsequent one it will wrack.
But I've never tested it since I just wrote it now in the reply box.
StrayRogue
09-04-2006, 06:41 AM
Awesome. Now make it for a good scripting engine like Lich.
Caede
09-04-2006, 03:12 PM
Awesome. Now make it for a good scripting engine like Lich.
loop {
if (!checkpcs && checkspirit(6) && !checkmana(10))
fput "sign of wracking"
end
pause 3
}
Shaelun
09-06-2006, 05:40 PM
Since that'll loop several-hundred-thousand times a second (or thereabouts -- no harm in it, but no reason for it to either), if you use something like that you probably want a pause in there.
loop {
if (!checkpcs && checkspirit(6) && !checkmana(10))
fput "sign of wracking"
end
pause 0.1
}
Caede
09-06-2006, 05:57 PM
I've been using it for a few days now, running it alongside other scripts and haven't noticed any problems.
But, sure, add a pause. :yes:
Bobmuhthol
09-06-2006, 06:25 PM
Iterations like that usually eat up processor resources. Usually you won't notice a difference because usually your processor isn't a piece of shit, but it should add to your CPU usage if you constantly loop.
Not that I don't do it with some of my scripts anyway.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.