Processing output while running script?
Moderator: Eowul
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Processing output while running script?
Is there a way in an alias to wait for a response before continuing with a script?
E.g.
You> Search here for herbs
Output> You found a purple berry.
You> exa berry
Output> The berry is a blah blah blah attanar. blah blah blah
You> if output contains attanarput herb in special pouch. else put herb in pouch.
E.g.
You> Search here for herbs
Output> You found a purple berry.
You> exa berry
Output> The berry is a blah blah blah attanar. blah blah blah
You> if output contains attanarput herb in special pouch. else put herb in pouch.
Re: Processing output while running script?
Maybe there is, but in general I think it is done by separate trigger.
If you want it to fire only when you are searching for the herbs, one way that works is to set a switch in an alias and use that alias instead of plain mud command for searching.
Then in the trigger you check for the switch and respond only if the switch is 1 (or whatever condition you try it on)
Best would be if it were possible to enable/disable triggers from GWC javascript, but I have no idea if it can be done.
If you want it to fire only when you are searching for the herbs, one way that works is to set a switch in an alias and use that alias instead of plain mud command for searching.
Then in the trigger you check for the switch and respond only if the switch is 1 (or whatever condition you try it on)
Best would be if it were possible to enable/disable triggers from GWC javascript, but I have no idea if it can be done.
Re: Processing output while running script?
If you recognize herbs maybe just after search add "put attanar(s) in pouch" ?
Re: Processing output while running script?
The web client does not currently support the kind of tit-for-tat transaction you're trying to set up here.
I think morgzaash has the best solution for Attenar (assuming you have half-decent herbalism). If you have the skill to identify the herb then it will respond by name, so you can just do:
"put attenars in [special pouch]"
"put herbs in [normal pouch]"
Then just ignore the error message.
I think morgzaash has the best solution for Attenar (assuming you have half-decent herbalism). If you have the skill to identify the herb then it will respond by name, so you can just do:
"put attenars in [special pouch]"
"put herbs in [normal pouch]"
Then just ignore the error message.
Re: Processing output while running script?
Thanks for the answers everyone. In particular, thanks for yours Mayobe. Currently, I do use triggers to react to output (and not just for herbing) but multi sequenced triggers are clumsy and difficult to manage / modify. So I was hoping there was a better way.Mayobe wrote:The web client does not currently support the kind of tit-for-tat transaction you're trying to set up here.
I think morgzaash has the best solution for Attenar (assuming you have half-decent herbalism). If you have the skill to identify the herb then it will respond by name, so you can just do:
"put attenars in [special pouch]"
"put herbs in [normal pouch]"
Then just ignore the error message.
Re: Processing output while running script?
Yes, of course it's possible to react to output, but it's not possible to set up a system that will capture the 'next' line without some information about what that line may be. For example, you can't realistically capture the herb description the way you were describing without some real shennanigans.
I think the closest you could get would be something like:
alias
* turn on a gwc bool
* exa herb
* say [codeword] //or something similar that will cause a unique line of text to be sent to you
trigger for (.*)
* if the bool is on then do your business
trigger for [codeword]
* turn off the bool
I think the closest you could get would be something like:
alias
* turn on a gwc bool
* exa herb
* say [codeword] //or something similar that will cause a unique line of text to be sent to you
trigger for (.*)
* if the bool is on then do your business
trigger for [codeword]
* turn off the bool
Re: Processing output while running script?
Noted Mayobe. The stubborn side of me still says there must be a way (with no evidence to back it up). I will dig deeper. I was hoping there was some javascript wait command and some gwc.output interrupt that would interrupt the wait and then I could process the last line of output.Mayobe wrote:Yes, of course it's possible to react to output, but it's not possible to set up a system that will capture the 'next' line without some information about what that line may be. For example, you can't realistically capture the herb description the way you were describing without some real shennanigans.
I think the closest you could get would be something like:
alias
* turn on a gwc bool
* exa herb
* say [codeword] //or something similar that will cause a unique line of text to be sent to you
trigger for (.*)
* if the bool is on then do your business
trigger for [codeword]
* turn off the bool
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/