View Full Version : variables
AestheticDeath
01-14-2007, 07:59 PM
How many variables can you save?
Decided it would be easier to make a healing script based on diagnose, instead of appraise - and then realized I was gonna have to diagnose for each wound the way I was going.
So, can I diagnose once, and then save each wound and then transfer them?
And is there a way to figure out how much health the target has, beyond diagnose, or just trying to transfer it blind?
Bobmuhthol
01-14-2007, 08:10 PM
One. %s.
And you can keep a counter, %c.
Health gauge w/o diagnose = transfer 75 until you have to heal yourself or the patient no longer has bloodloss.
AestheticDeath
01-14-2007, 08:17 PM
transfer 75? you saying you can specify how much to transfer?
And that if they have no blood loss, you wind up tranferring with no result.. and looking stupid?
fallenSaint
01-14-2007, 08:24 PM
Lich ftw.
Bobmuhthol
01-14-2007, 08:32 PM
<<transfer 75? you saying you can specify how much to transfer?>>
No, but it's 75 forever once you hit like level 15.
<<And that if they have no blood loss, you wind up tranferring with no result.. and looking stupid?>>
If you think an empath transferring 0 blood loss looks stupid, you have *never* been a healer before.
Celephais
01-14-2007, 09:40 PM
Not sure how the counter works, but can you add and subtract from it? If so you could store a bitmask in the counter...
1 - Head
2 - Neck
4 - Chest
8 - Adbomen
... so on
if they have an injury there you add the value (powers of two), then you can subtract out the value when you heal it... add labels for
heal4:
heal5:
heal6:
heal7:
put transfer chest (or whatever)
counter subtract 4
goto heal%c
or however it works.
Bobmuhthol
01-15-2007, 02:42 PM
That's actually pretty creative and seems like it would work if done like that.
The Ponzzz
01-15-2007, 07:05 PM
Well he is a Legendary Hero.
AestheticDeath
01-15-2007, 07:39 PM
Well, you should recall I am not a programmer. So while I almost understand what your saying.. Its not 100%.
Are you saying, that if I used diagnose, I can match say up to 16 different variables by using counters?
I beleive the only ones I would need are:
appraise:
put diagnose %1
match healnerves nervous system injury
match healrarm right arm injury
match heallarm left arm injury
match healrleg right leg injury
match heallleg left leg injury
match healrhand right hand injury
match heallhand left hand injury
match healhead head injury
match healneck neck injury
match healchest chest injury
match healabs abdomen injury
match healback back injury
match healreye right eye injury
match healleye left eye injury
match health out of a maximum
match done in perfect health
matchwait
So how do I assign values to each, and then make it recognize them?
And how does it skip transfering wounds the patient doesn't have?
Bobmuhthol
01-15-2007, 08:00 PM
I think it might only work in Wizard if injuries are listed in a specific order all the time. That way you'd be able to set up the matches in the order in which they would appear. You'd probably also have to diagnose the person for each injury they have. For example, if they had head, neck, and chest injuries, you'd diagnose, match head, add the head value, diagnose, match neck, add the neck value, diagnose, match chest, add the chest value, then start healing.
The way it works conceptually as far as recognizing the injuries is basically a linear translation of binary. If you assign values 1, 2, 4, 8, 16, etc., you end up always having a unique number for every combination. So if head was 4, chest was 2, and neck was 1, you'd end up with 7. The binary would end up being 00000111, which you can verify is unique from the on/off scenario. Every number has a unique injury combination associated with it. If you ended up with 5 in this example, it would have to be a head injury and a neck injury every time. You start with the largest number that isn't 2^x (ie. 2^1 + 2^2 + 2^3 ... 2^x-1) and create labels such that the script will heal the highest value. For my example, you'd have labels for values 4, 5, 6, and 7 always transfer the head. Then you'd subtract 4 because of the value of the head injury, you'll have 0, 1, 2, or 3. Respectively, that's no injuries remaining, chest, neck, and neck and chest. You'd keep doing that until the counter was 0.
I really suggest not using Wizard, though, because it sucks.
Bobmuhthol
01-15-2007, 08:02 PM
Oh, yeah, and that system ultimately complicates things - you still have to rediagnose for every injury, and it's more efficient to just heal the injuries at that point.
Celephais' idea was a really great one, but Wizard doesn't have the ability to manipulate a matched string that way. If you use it, it ends up working but with more code than you need.
AestheticDeath
01-15-2007, 08:23 PM
Oh, yeah, and that system ultimately complicates things - you still have to rediagnose for every injury, and it's more efficient to just heal the injuries at that point.
Thats what I am trying to get around, having to diagnose more then once.
I was just thinking it might be easier because of the wording used on diagnose vs all the things they use for appraise, or look.
But I can't use diagnose if I have to wait 5 seconds between every transfer.
Bobmuhthol
01-15-2007, 08:30 PM
As far as I've seen, it can't be done short of creating a retardedly huge match table with every possible combination of injuries. And that sucks.
AestheticDeath
01-15-2007, 09:23 PM
I agree, that sucks. Oh well.
Celephais
01-15-2007, 10:44 PM
Doesn't the match system work so that you can not have a match wait and you could have it fire a match, go to a label that adds the value, then stick go back to the set of matches... If that doesn't work why do you need to diagnose, can't you just look at them and match the injuries?
put diagnose %1
check:
match hasHead <has a head injury>
match hasNeck <has a neck injury>
match hasChest <has a neck injury>
match startHealing <message at the end... or a period, whatever>
hasHead:
counter add 1
goto check
hasNeck:
counter add 2
goto check
hasChest:
counter add 4
goto check
...
startHealing:
goto heal%c
heal7:
heal6:
heal5:
heal4:
put transfer %1 chest
counter subtract 1
goto heal%c
heal3:
heal2:
put transfer %1 neck
counter subtract 1
goto heal%c
heal1:
put transfer %1 head
counter subtract 1
goto heal%c
heal0:
put say pay me bitch!
Latrinsorm
01-15-2007, 10:55 PM
In a word, no.
#melonslut
put l
check:
match hastraffic traffic
match hasnight night
match hasnorth north
match end modwir sign
hastraffic:
echo CELEPHAIS
goto check
hasnight:
echo IS
goto check
hasnorth:
echo RIGHT
goto check
end:
echo LOL
(eof)
.cele
[Press the ESCape key to abort script.]
l
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
CELEPHAIS
MATCH table is full; only 32 MATCHes allowed!
[Wehnimer's, Taarna Rd.]
What traffic flows here at night mostly heads north towards the palisade along the bay and east to the riverfront. A decrepit single-story pawnshop, its paint peeling and dimly lit window panes broken, stands here alongside the shadowy lane. You also see a pretty flower girl and a modwir sign.
Obvious paths: north, east, south
Celephais
01-15-2007, 11:02 PM
Try adding a matchwait to that... see if it only fires the "Celephais" or if it'll fire the other matches too.
Bobmuhthol
01-15-2007, 11:07 PM
The lack of matchwait is causing the matches to accumulate, and it is a problem that makes Latrinsorm's example unreliable. What *should* happen is it will echo CELEPHAIS and simply end. What *might* happen is you might get to CELEPHAIS IS and you could *possibly* get to CELEPHAIS IS RIGHT, but I can pretty much guarantee that it will not go further than that. Such a method has been employed in the stocks script written for Wizard, but it is not always reliable, and it would likely never be able to match 4 things in one line.
Celephais
01-15-2007, 11:14 PM
CELEPHAIS IS RIGHT
If you say so...
anyway... damn okay, wasn't sure how it worked. So what's the problem with looking at your target and seeing the injuries?
AestheticDeath
01-16-2007, 09:08 AM
My only problem was look or appraise gives so many matches you need more then one match table to do it. Diagnose would only need one table, like 16 matches. But diagnose has the problem of a 5 second roundtime.
Bobmuhthol
01-16-2007, 09:23 AM
Diagnose full does, diagnose doesn't.
AestheticDeath
01-16-2007, 07:18 PM
OK, didnt catch that before. Guess I was using full without realizing it. What does the full version give that the other doesn't?
Bobmuhthol
01-16-2007, 07:36 PM
Gives HP reading and rates of bleeding.
Latrinsorm
01-16-2007, 08:41 PM
Further, diagnose full has messaging while diagnose does not.
Shaelun
01-19-2007, 02:11 PM
I know this sounds like a shameless plug (fuck it, just the truth), but you do realize Lich comes packaged with a fully automated healing script... right...?
AestheticDeath
01-19-2007, 07:27 PM
Yeah, and I actually downloaded Lich a long time ago I think. I just never got around to looking at it. I was honestly a bit scared it was just another thing I was going to have to learn to use with no instructions. I already think its a waste of my time trying to learn WizFE scripting and other junk just to play the game.
I basically saw it as an unsupported piece of software. So if I have a problem.. what do I do? It seems your still around somewhat, so its possible I might get some help, but I dont know how many other people there are that use it.
Just saw it as jumping in a bigger hole than the one Im in, and not caring that I don't have a ladder to get back out.
I may give it a try soon though.
Shaelun
01-20-2007, 03:56 PM
Depends on what you mean by "unsupported." I still work on it and fix bugs when I hear about them, and I visit the forums here once or twice a week to see if anybody's asked a question. I did write tutorials and there's a pretty extensive live (in-game) help feature now.
But if by "unsupported," you mean I didn't write a professional instruction manual for it... then you're right. I was (perhaps naively) shocked when I discovered that it takes much more time and effort to write instructions than it does to write the program itself.
For a year and a half now it's been my for-fun side project, but I did bother to document a lot... every script that I wrote for it has at least a little blurb about what it does and how to use it in the comments at the very beginning of the file.
In short: there's no reason for you to ever try it if you don't want to, but if you didn't realize it was as easy as installing the program, logging in and typing ";heal {person}" I thought I'd point it out.
Gnomad
01-20-2007, 11:34 PM
Further, diagnose full has messaging while diagnose does not.
Yes it does.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.