I was wondering, are people using the webclient any? If so, is there an interest for triggers?
Maybe we could create a set of usable ones together?
Below is an example of how to create a script for the web client, I havent played much on it,
but I figured you would find it lacking in this area. Try it, improve upon it, enjoy it. This is an
old nugget of code that I created when the webclient came out, havent really used it since..
Keep this is mind: "Scripting in the game is tolerable, but botting is NOT."
All this would enter an alias named script, with the alias you can use things like, "script <name>",
"script off", "script pause", for it to move to the next command it uses "script step".
Code: Select all
gwc.userdata.script.scriptlist = [
["RedFang",
"nw|kill goblin", "kill wolf", "w|kill goblin", "kill wolf", "nw|kill goblin", "kill wolf",
"n|kill goblin", "kill wolf", "n|kill goblin", "kill wolf", "ne|kill goblin", "kill wolf",
"s|kill goblin", "kill wolf", "s|kill goblin", "kill wolf", "e|kill goblin", "kill wolf",
"n|kill goblin", "kill wolf", "n|kill goblin", "kill wolf", "e|kill goblin", "kill wolf",
"s|kill goblin", "kill wolf", "s|kill goblin", "kill wolf", "e|kill goblin", "kill wolf",
"n|kill goblin", "kill wolf", "n|kill goblin", "kill wolf", "e|kill goblin", "kill wolf",
"w|w|w|w|sw|s|s|se|e|se"],
["OtherExampleScript", "first command|second command", "do something else"],
];
if (gwc.userdata.script.pause == "on") { return; }
function sList() {
var string = [];
gwc.userdata.script.scriptlist.forEach(function(list) {
string.push(list[0]);
});
return string;
}
switch(args[1]) {
case "off":
if (gwc.userdata.script.scriptvars[0] == "true") {
gwc.output.append("You have turned off the "+
gwc.userdata.script.scriptvars[1]+" script");
gwc.userdata.script.scriptvars = ["false", "", ""];
} else {
gwc.output.append("You currently have no active scripts.");
}
break;
case "pause":
if (gwc.userdata.script.scriptvars[0] == "true") {
gwc.userdata.script.scriptvars[0] = "pause";
gwc.output.append("Your script is now paused.");
} else if (gwc.userdata.script.scriptvars[0] == "pause") {
gwc.userdata.script.scriptvars[0] = "true";
gwc.output.append("Your script is no longer paused.");
} else {
gwc.output.append("You have no active script.");
}
break;
case "step":
if (gwc.userdata.script.scriptvars[0] == "true") {
gwc.userdata.script.scriptlist.forEach(function(dest){
if (dest[0].match(gwc.userdata.script.scriptvars[1]))
{
if (dest[gwc.userdata.script.scriptvars[2]]) {
var step = dest[gwc.userdata.script.scriptvars[2]].split("|");
step.forEach(function(go){
setTimeout(function() {
gwc.connection.send(go, true);
}, 120);
});
gwc.userdata.script.scriptvars[2]++;
} else {
gwc.connection.send("script off", true);
}
}
});
}
break;
default:
if (args[1] && args[1].match(sList().join('|'))) {
gwc.output.append(args[1]+" has now been activated.");
gwc.userdata.script.scriptvars = ["true", args[1], "1"];
gwc.connection.send("script step", true);
} else {
gwc.output.append("You may only choose from the listed scripts. "+
sList().join(', '));
}
break;
}
simply
Code: Select all
gwc.connection.send("script step", true);
The Friendly Trigger Helper.