Paths and multi-pattern triggers
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.
Paths and multi-pattern triggers
Anyone know how to create these with the client?
Apparently Yanus has decided to for some reason remove all his information he provided previous in this thread, replacing all his posts with ".". And Eowul is also currently inactive.
I am doing a small guide on how to use the client for the new and improved webpage, and this is two things that would be good to include I think.
With multi-pattern triggers I mean for example having ONE single coloring trigger that fires on both "obvious exits" and "obvious exit", and similar, instead of having to do multiple triggers.
Apparently Yanus has decided to for some reason remove all his information he provided previous in this thread, replacing all his posts with ".". And Eowul is also currently inactive.
I am doing a small guide on how to use the client for the new and improved webpage, and this is two things that would be good to include I think.
With multi-pattern triggers I mean for example having ONE single coloring trigger that fires on both "obvious exits" and "obvious exit", and similar, instead of having to do multiple triggers.
Re: Paths and multi-pattern triggers
example multi-pattern:Cherek wrote:Anyone know how to create these with the client?
With multi-pattern triggers I mean for example having ONE single coloring trigger that fires on both "obvious exits" and "obvious exit", and similar, instead of having to do multiple triggers.
trigger
type regexp
pattern: obvious (?:exit|exits)
script: gwc.output.color("green");
select javascript
save
example path:
alias
pattern: <alias name of your choice>
script:
var path = ['e','s','s','n','n','w', 'enter', 'out'];
path.forEach(function(step) {
gwc.connection.send(step);
});
select javascript below the script textbox
save
Re: Paths and multi-pattern triggers
Thank you Keltar! And thank you again for the other stuff you sent me previously!
Re: Paths and multi-pattern triggers
How about reversing a path? Doable, or do you have to type it in manually in reverse?
Re: Paths and multi-pattern triggers
Sure it's doable, I will put it together and post hereCherek wrote:How about reversing a path? Doable, or do you have to type it in manually in reverse?
Re: Paths and multi-pattern triggers
Great! Thanks.Keltar wrote:Sure it's doable, I will put it together and post hereCherek wrote:How about reversing a path? Doable, or do you have to type it in manually in reverse?
Re: Paths and multi-pattern triggers
alias, note that alias name is the same as the path name, not necessary but helpsCherek wrote:How about reversing a path? Doable, or do you have to type it in manually in reverse?
pattern: path1
script:
var p = gwc.userdata.paths;
p.go(p.path1);
select javascript
save
alias to reverse the path
pattern: path1back
script:
var p = gwc.userdata.paths;
p.go_back(p.path1);
select javascript
save
alias so that paths are refreshed when you run the alias, you can add as many paths as you like, path1 and path2 are added already:
Pattern: <whatever you like>
script:
gwc.userdata.paths = {
path1:['e','s','s'],
path2:['e','e','d','d'],
reverse : {
'n':'s', 's':'n', 'e':'w', 'w':'e',
'nw':'se', 'ne':'sw', 'sw':'ne', 'se':'nw',
'u':'d', 'd':'u', 'in':'out', 'out':'in'
},
go:function(path) {
path.forEach(function(step) {
gwc.connection.send(step);
});
},
go_back:function(path) {
path.reverse();
path.forEach(function(step) {
step = gwc.userdata.paths.reverse[step];
gwc.connection.send(step);
});
}
};
select javascript
save
Re: Paths and multi-pattern triggers
Great work Keltar. Very useful!
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/