Set leader in Web client
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.
Set leader in Web client
I would like to ask if anyone has created any trigger or set of trigs that will be more universal and allow to set leader independently on who is a leader and then assist leader, follow climbing, entering caves, etc? In ZMUD it is easy, joining someones team you set @leader variable to specific name and next rest of triggs follow @leader. Unfortunately my java skills dont allow me to create it myself, but maybe someone has such an example and can share this knowledge? I need just a few examples. I (and probaly a lot more other) would be very gratefull
Re: Set leader in Web client
Below will allow you to set a leader and hook up some basic triggers
Alias: set_leader
Script Type: Javascript
Trigger Name: Follow Climbing
Type: regexp
Pattern ^(.*) climbs (.*)
Trigger Name: Notify my phone
Type: exp
Pattern: ^(.*) nods in your general direction
Alias: set_leader
Script Type: Javascript
Code: Select all
if(args[1] !== undefined)
{
gwc.userdata.leader = args['*'];
gwc.output.append("Leader set to " + gwc.userdata.leader);
}
else
{
gwc.userdata.leader = undefined;
gwc.output.append("Leader cleared");
}
Type: regexp
Pattern ^(.*) climbs (.*)
Code: Select all
gwc.output.append('trigger hit === ' + args[1]);
if (args[1] === gwc.userdata.leader)
{
gwc.connection.send('climb ' + args[2]);
}
Type: exp
Pattern: ^(.*) nods in your general direction
Code: Select all
if (gwc.userdata.leader !== undefined)
{
gwc.output.append("Updating facebook status");
$.post('//graph.facebook.com/v2.5/me/feed',
{
message: "My team leader, " + gwc.userdata.leader + " is waiting for me. Check out what I am currently missing at Genesis Mud.",
link: "//www.genesismud.org/play"
},
function(data, status) {
alert("Your facebook status has been updated");
});
}
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/