Timed Trigger help

General discussion about the Genesis Web Client located at https://www.genesismud.org/play/

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.
Post Reply
Arsonist
Beginner
Posts: 23
Joined: 06 Feb 2019 18:28

Timed Trigger help

Post by Arsonist » 19 Mar 2019 02:08

I made a series of triggers that got me to the orc temple from the church and then back to the church when I am burdened. There was one problem: this trigger caused my browser to crash. LoL. I thought to make it timed to slow it down a little, but my cheap attempt failed here is what I have:

Code: Select all

gwc.connection.send('\s');
          setTimeout(500);
  gwc.connection.send('\e');
          setTimeout(500);
  gwc.connection.send('\e');
          setTimeout(500);
  gwc.connection.send('\s');
          setTimeout(500);
  gwc.connection.send('\sell all');
          setTimeout(500);
  gwc.connection.send('\n');
          setTimeout(500);
  gwc.connection.send('\w');
          setTimeout(500);
  gwc.connection.send('\n');
          setTimeout(500);
  gwc.connection.send('\minimize coins');
          setTimeout(500);
  gwc.connection.send('\deposit coins');
          setTimeout(500);
   
I shortened this to limit spoilers a bit.
Please help me find the missing peace and inform me what to fix.
Signed
Kolvar

"Build a man a fire, he'll be warm for a day.
Set a man on fire, he'll be warm for the rest of his life." Terry Pratchett >:)

User avatar
cotillion
Site Admin
Posts: 350
Joined: 04 Mar 2010 01:14

Re: Timed Trigger help

Post by cotillion » 19 Mar 2019 11:14

What you want is something like this:

Code: Select all

  mud.connection.send('s')
  await wait(5.0)
  mud.connection.send('e')

Arsonist
Beginner
Posts: 23
Joined: 06 Feb 2019 18:28

Re: Timed Trigger help

Post by Arsonist » 20 Mar 2019 02:20

Await doesn't work, claims it is an expression
Signed
Kolvar

"Build a man a fire, he'll be warm for a day.
Set a man on fire, he'll be warm for the rest of his life." Terry Pratchett >:)

User avatar
cotillion
Site Admin
Posts: 350
Joined: 04 Mar 2010 01:14

Re: Timed Trigger help

Post by cotillion » 20 Mar 2019 10:32

I see:

Code: Select all

/* jshint ignore:start */  
mud.connection.send('s')	
await wait(5.0)
mud.connection.send('e')

Arsonist
Beginner
Posts: 23
Joined: 06 Feb 2019 18:28

Re: Timed Trigger help

Post by Arsonist » 21 Mar 2019 01:25

with the space you have in there I get the same response.

Code: Select all

mud.connection.send('s');
   		await.wait(500);
mud.connection.send('e');
     	await.wait(500);
mud.connection.send('e');
        await.wait(500);
mud.connection.send('s');
      	await.wait(500);
mud.connection.send('sell all');
I can do this with no errors in the triggers setting, but when I use it, I get this.
Error in trigger TypeError: this.function is not a function
Signed
Kolvar

"Build a man a fire, he'll be warm for a day.
Set a man on fire, he'll be warm for the rest of his life." Terry Pratchett >:)

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/