Basic web on JAVA

by Shiri

Back to Mechanic's Corner.

Shiri2005-05-29 08:04:55
Thanks to Gwylifar for figuring most of this one out for me.

Now, one thing you may not realise JAVA can do, since it doesn't actually say it in the friggin' help thing, is that the variable screen DOES have a point, and it's possible to set a variable from a trigger, and execute it too. What this means is that you can create a basic writhing trigger, or focus body trigger, amongst other things. (It's spammy though sometimes. But better than screwing up and writhing twice, resetting the writhing.)

For example, a webbing trigger would trigger
CODE
{<}Sticky strands of webbing spray out from {w} to cover you.{>}

to

$writhing

This means that you will immediately try to writhe if someone webs you.
After that, set
CODE
{<}You begin to struggle free of your entanglement.{>}

to

#set writhing off


This means that when you execute variable "writhing" from another web attempt, it does "off", so that it isn't disrupted.

Lastly, set
CODE
{<}You have writhed free of your entanglement.{>}

to

#set writhing writhe


So that you will writhe again if another attempt to web you is made. (You'll have to adjust this to accomodate for hangedman, etc., and crucify, but you can see how that would work. Or, you could ask me in game I guess, can't be bothered to post much more, just point out how this can be used.)

You still want to manually writhe in case illusions make this go screwy, though.
This can also work with harvesting triggers, by setting a variable called harvesting that does "pick $harvesting" every time you regain balance, then does "#set harvesting off" on receiving a generic message like the one you get from "kai" or something, so you can turn it on for a particular herb and then turn it off when you reach 5. Attempts to make itself turn off automatically when the herb you're targetting reachs 5 have been thus far unsuccessful for some reason I can't quite work out. I don't think JAVA appreciates the multiple spaces.
Daganev2005-05-29 09:39:15
cool neato! i think... *peer*
Shiri2005-05-29 09:40:39
What do you mean, you think? huh.gif
Daganev2005-05-29 09:44:11
I ment the variables being executed by the trigger. I'm a bit confused on why it WOULDN'T be able to do that... however its an ingenious way to take care of webbing.
Shiri2005-05-29 09:49:12
Well, I don't KNOW why it wouldn't do that, but the bloody thing doesn't actually SAY it can anywhere, so I'd have no idea that it could. >_<

And I'm glad you think it's ingenious, I thought it was quite basic. tongue.gif But for JAVA, basic is ingenious, so I can see your point. dry.gif
Gwylifar2005-05-29 15:03:37
Incidentally, I first started playing with this technique helping someone who was stuck using Kmuddy, which was similarly limited, back in Aetolia a year ago. Just be sure you get all the "done writhing" triggers to set writhing back to "writhe". You might also want to add it to your defup to set it to that, so you can do it when you first get into the game, just in case.

To improve upon the technique, make an alias for setting writhing to "writhe" or "off" and then call that instead of doing it directly. I used "wron" and "wroff". Helps doing it manually plus it's only in one place so you don't have to change it everywhere if it changes. Of course this might slow Java down too much.
Shiri2005-05-29 15:05:47
Yeah, that just saves time, but as I was experimenting I didn't want to fiddle around with it. (The alias for wron thing.)
Gwylifar2005-05-29 15:09:26
It helps with later refinement and changes, too. It's the kind of system design thing that pays off later, solid foundation and all.
Shiri2005-05-29 15:12:09
Yep. I've done it for all my autoparry things. Where I used to have to do "unparry;parry lleg 50;parry rleg 50" I have "pa1." If I'd done that to start with it would have saved me a LOT of searching for triggers. dry.gif