Hi all,
Been back for a little bit now and have started working on creating scripts finally.
I am making a smoking script to work on smoke images. I think I have most of it in correctly, however; it keeps getting hung up here:
light:
put light cigar with flint
match light but nothing happens
match putaway bursts in flames
matchwait
It lights the cigar after which nothing happens.
I think it has to do with the round time but not sure. Could use some advice from you experts.
Thanks
ZOAR
MITHYLDR
Re: Script help
07/08/2015 01:40 PM CDT
Put the action after the match table and see if that helps.
light:
match light but nothing happens
match putaway bursts in flames
put light cigar with flint
matchwait
light:
match light but nothing happens
match putaway bursts in flames
put light cigar with flint
matchwait
ZOAR
Re: Script help
07/08/2015 01:56 PM CDT
Thanks for the response. Just tired it still hung up in the same spot.
[script aborted]
>.smoke phoenix
[Script Smoke is running, Esc to cancel, Shift-Esc to pause]
>get cigar from box in my pack
>drop cigar
You get a sungrown cigar from inside a cigar box labeled "Knud's tips" which is in your journey pack.
>wield knife
>get flint
You drop a sungrown cigar.
>light cigar with flint
You draw out your long knife from the journey pack, gripping it firmly in your right hand.
>
You get a piece of black flint from inside your journey pack.
>
You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar, but nothing happens.
HUNG UP HERE
when it lights same thing
>.smoke phoenix
[Script Smoke is running, Esc to cancel, Shift-Esc to pause]
>get cigar from box in my pack
>drop cigar
You get a sungrown cigar from inside a cigar box labeled "Knud's tips" which is in your journey pack.
>wield knife
You drop a sungrown cigar.
>get flint
>light cigar with flint
You draw out your long knife from the journey pack, gripping it firmly in your right hand.
>
You get a piece of black flint from inside your journey pack.
>
You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar which smolders, then bursts into flames.
Roundtime: 8 sec.
HUNG UP HERE
[script aborted]
>.smoke phoenix
[Script Smoke is running, Esc to cancel, Shift-Esc to pause]
>get cigar from box in my pack
>drop cigar
You get a sungrown cigar from inside a cigar box labeled "Knud's tips" which is in your journey pack.
>wield knife
>get flint
You drop a sungrown cigar.
>light cigar with flint
You draw out your long knife from the journey pack, gripping it firmly in your right hand.
>
You get a piece of black flint from inside your journey pack.
>
You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar, but nothing happens.
HUNG UP HERE
when it lights same thing
>.smoke phoenix
[Script Smoke is running, Esc to cancel, Shift-Esc to pause]
>get cigar from box in my pack
>drop cigar
You get a sungrown cigar from inside a cigar box labeled "Knud's tips" which is in your journey pack.
>wield knife
You drop a sungrown cigar.
>get flint
>light cigar with flint
You draw out your long knife from the journey pack, gripping it firmly in your right hand.
>
You get a piece of black flint from inside your journey pack.
>
You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar which smolders, then bursts into flames.
Roundtime: 8 sec.
HUNG UP HERE
HEXEDBYTHENET
Re: Script help
07/08/2015 02:07 PM CDT
Try putting the whole line into the match table?
Give this a try -
light:
pause
match light You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar, but nothing happens.
match putaway You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar which smolders, then bursts into flames.
put light cigar with flint
matchwait
I always throw in a pause at the start of each section change for my scripts, to make sure it catches up. I also generally put in a pause after each major action, because I find that during times of heavy lag (or slow connection on my end) the script can get ahead of me.
You say to Tathalus, "Have you ever tried to clean a troll den? The smell sticks around for years to come."
Liev says, "That is my cue to leave."
Give this a try -
light:
pause
match light You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar, but nothing happens.
match putaway You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar which smolders, then bursts into flames.
put light cigar with flint
matchwait
I always throw in a pause at the start of each section change for my scripts, to make sure it catches up. I also generally put in a pause after each major action, because I find that during times of heavy lag (or slow connection on my end) the script can get ahead of me.
You say to Tathalus, "Have you ever tried to clean a troll den? The smell sticks around for years to come."
Liev says, "That is my cue to leave."
POPWEASEL
Re: Script help
07/08/2015 02:12 PM CDT
Maybe this one is not working cause the output is into:
<You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar which smolders, then bursts into flames.
Roundtime: 8 sec.
HUNG UP HERE>
And your match is looking for:
match putaway bursts in flames
For the first one, try just nothing as the match word.
-Dartellum Waddle
<You strike a piece of black flint against a curved long knife, causing a shower of sparks over the sungrown cigar which smolders, then bursts into flames.
Roundtime: 8 sec.
HUNG UP HERE>
And your match is looking for:
match putaway bursts in flames
For the first one, try just nothing as the match word.
-Dartellum Waddle
DASLOW
Re: Script help
07/08/2015 02:26 PM CDT
>match putaway bursts in flames
>then bursts into flames
These don't match
ZOAR
Re: Script help
07/08/2015 03:43 PM CDT
Yeah adding the whole line didn't work at first. I came back saw that you had the pause before them and that seemed to get it to work. Thanks for all your help. Can you tell me why I needed the pause before the matches? More for future script building.
Thanks again all.
DASLOW
Re: Script help
07/08/2015 04:00 PM CDT
The pauses shouldn't be doing anything if your matchtable is set up properly and your command comes after the matchtable. The point of putting the command after the matchtable is to make sure the match table loads before the command is sent. The pause doesn't really do anything but slow you down. If it didn't work with the whole line, or with the change to "burst into flame" I'd guess that there is variable messaging at work.
HEXEDBYTHENET
Re: Script help
07/08/2015 04:02 PM CDT
Again, I find that sometimes the script gets ahead of the data being received from the game. Most times this is due to the latency that anything over the internet has.
You say to Tathalus, "Have you ever tried to clean a troll den? The smell sticks around for years to come."
Liev says, "That is my cue to leave."
You say to Tathalus, "Have you ever tried to clean a troll den? The smell sticks around for years to come."
Liev says, "That is my cue to leave."
BRYCOLE83
Re: Script help
07/08/2015 04:04 PM CDT
>>> Yeah adding the whole line didn't work at first. I came back saw that you had the pause before them and that seemed to get it to work. Thanks for all your help. Can you tell me why I needed the pause before the matches? More for future script building.
>>> Thanks again all.
You shouldn't need the pause. It was likely because your action was before the matchwaits. Also, try and stay away from matches that run into the end of the line, they can be funny sometimes.
And your putaway match didn't actually match.
light:
match light but nothing
match putaway Roundtime
put light cigar with flint
matchwait
putaway:
pause
exit
DASLOW
Re: Script help
07/08/2015 06:29 PM CDT
>>Again, I find that sometimes the script gets ahead of the data being received from the game. Most times this is due to the latency that anything over the internet has.
And this is why you put the command after the matchtable. It doesn't matter if the script gets ahead or the commands get ahead of the script because the matchtable will always be built before the command is entered.
And this is why you put the command after the matchtable. It doesn't matter if the script gets ahead or the commands get ahead of the script because the matchtable will always be built before the command is entered.
IVJAMES
Re: Script help
07/09/2015 12:05 AM CDT
Just to clarify:
Your main problem with your script is that you did not have a proper match. You put burst in instead of burst into and thus if you actually lighted the cigar your script could not find a match to go anywhere else and just sat there waiting for one.
Scripts often run into trouble when they move on before you want them to do so. The order of the things you want matched can be crucial. The word MY can be of great importance too.
So for what you want to accomplish I would do this:
light:
match light ...wait (in case the script got here too fas)
match putaway bursts into
match light nothing happens
put light cigar with MY flint
matchwait
Your main problem with your script is that you did not have a proper match. You put burst in instead of burst into and thus if you actually lighted the cigar your script could not find a match to go anywhere else and just sat there waiting for one.
Scripts often run into trouble when they move on before you want them to do so. The order of the things you want matched can be crucial. The word MY can be of great importance too.
So for what you want to accomplish I would do this:
light:
match light ...wait (in case the script got here too fas)
match putaway bursts into
match light nothing happens
put light cigar with MY flint
matchwait
SULIC
Re: Script help
03/03/2016 03:33 PM CST
Just got genie front end and started running my first simple scripts. I'm reading scripts and these threads but some simple script commands, or a link to a page with the basics would help (some that are considered 'basic' dont seem basic to me lol). This is where I'm at -
PUT Enters commands into game
PAUSE Stops for x seconds
LOOP: starts a series of commands until 'goto loop'
That's it that's all I got. Which is already helpful to do simple tasks but how do I edit variables? How does waitfor work? I'm still playing around with it but like I said, any help is much appreciated.
"Those who die heroic deaths are long remembered, thieves and drunks and cravens soon forgotten."
-Varys
PUT Enters commands into game
PAUSE Stops for x seconds
LOOP: starts a series of commands until 'goto loop'
That's it that's all I got. Which is already helpful to do simple tasks but how do I edit variables? How does waitfor work? I'm still playing around with it but like I said, any help is much appreciated.
"Those who die heroic deaths are long remembered, thieves and drunks and cravens soon forgotten."
-Varys
DBABIASH
Re: Script help
03/03/2016 03:52 PM CST
https://elanthipedia.play.net/mediawiki/index.php/How_to_Script
This is what I used to get myself started. Though I don't have any experience with Genie yet, and the link says it is for StormFront and eScape. From when I've asked, it is very similar for Genie though.
This is what I used to get myself started. Though I don't have any experience with Genie yet, and the link says it is for StormFront and eScape. From when I've asked, it is very similar for Genie though.
MITHYLDR
Re: Script help
03/03/2016 04:48 PM CST
GABRIEL4
Re: Script help
03/03/2016 05:16 PM CST
<<Just got genie front end and started running my first simple scripts. I'm reading scripts and these threads but some simple script commands, or a link to a page with the basics would help (some that are considered 'basic' dont seem basic to me lol). This is where I'm at -
In case you weren't aware, Genie has a help document accessible through the client. In the upper menu: Help-->Open Genie Documentation. It's a pdf file with a list of all of the possible command line commands and script commands with a basic description of what they do and some basic examples of use. It's not really a tutorial, but I use it as a syntax reference almost every time I write a script.
For more specific help with something you're having trouble with the genie bulletin is your best bet as others have mentioned. If you forget the website you can also access it directly from the client in the help menu: Help-->Open Genie Forum
One other thing that will help once you get more familiar with scripting in Genie is getting familiar with regex. An online regex tester is invaluable to figuring out what is wrong with your matchre, action, and trigger commands. It's also useful to get real time feedback on what different regex codes do. My favourite to use is regexpal: http://www.regexpal.com/
In case you weren't aware, Genie has a help document accessible through the client. In the upper menu: Help-->Open Genie Documentation. It's a pdf file with a list of all of the possible command line commands and script commands with a basic description of what they do and some basic examples of use. It's not really a tutorial, but I use it as a syntax reference almost every time I write a script.
For more specific help with something you're having trouble with the genie bulletin is your best bet as others have mentioned. If you forget the website you can also access it directly from the client in the help menu: Help-->Open Genie Forum
One other thing that will help once you get more familiar with scripting in Genie is getting familiar with regex. An online regex tester is invaluable to figuring out what is wrong with your matchre, action, and trigger commands. It's also useful to get real time feedback on what different regex codes do. My favourite to use is regexpal: http://www.regexpal.com/