Newbie scripting problem 10/13/2018 06:20 PM CDT

So I tried to write a new script:

PUT stow sword
WAIT
PUT get my dagger
WAIT
PUT kneel
WAIT
PUT skin %1 with my dagger
WAIT
PUT stand
WAIT
PUT stow dagger
WAIT
PUT get my sword
WAIT
PUT gather
WAIT

But it just tries to send all the commands at once instead of one at a time and then of course I get the message of "You can only send 2 write ahead lines" or whatever..

Can someone help me fix this script so it does what I want it to?

p.s. please don't just tell me to go download lich or use lich scripts or whatever - I really don't want to use that program!
Reply
Re: Newbie scripting problem 10/13/2018 06:24 PM CDT

Also, how do you delete scripts? There is only an "edit" button and then when the interface window pops up, just "update" and "cancel".. no "delete"
Reply
Re: Newbie scripting problem 10/13/2018 06:27 PM CDT
The Arkati Archive has some good basic information about writing scripts -

https://sites.google.com/site/loresinging/arkati-library/gs4-scripting


Avaia, player of
Reply
Re: Newbie scripting problem 10/13/2018 06:31 PM CDT
as a beginner the easiest way would be to put WAIT 1 between every 2 commands, it'll wait 1 second. You can do waitfor if you wanted to add specific messaging to look out for, such as STOW SWORD, then waitfor You put your sword whereveritgoes. Then it would wait for that specific message before proceeding. Easiest way is to just wait 1 though.
Reply
Re: Newbie scripting problem 10/13/2018 06:45 PM CDT
Here is the .get macro that I use today which has an example of using match / matchwait. I've had it so long I don't even know if I wrote it or modified it from someone else's example. I like it because it keeps your main weapon in your hand at all times (in case you are attacked while picking things up).

It requires three variables to be set but you could also replace them with a hard coded weapon (%weapon2 for off-hand weapon or empty hand), sheath/weapon container (%user6 for where you stow or place your off hand weapon when you need a free hand), and container (%container for container where you want to put stuff you pick up) as well.



#GET an object
put put %weapon2 in my %user6
match Success You pick up
match Fail Get what?
match Fail You already have that.
match Oops You remove
put get %1 %2 %3
matchwait

Success:
Oops:
put put %1 %2 %3 in my %container
#will execute code for Fail as well...

Fail:
put get %weapon2 from my %user6



End:




-- Robert

Wex winks before saying, "Cravin' some winterberry ale? Head on over to White Haven!"
Reply
Re: Newbie scripting problem 10/13/2018 07:07 PM CDT

Thanks for the responses. I'll try the WAIT 1 suggestion

Also, I tried calling my script from command terminal like I read you're supposed to be able to with .scriptname but this is what I got:

.sk
Please rephrase that command.
Reply
Re: Newbie scripting problem 10/13/2018 07:21 PM CDT

Someone correct me if I am wrong, but I think that any edged blade will skin as well as a dagger on a regular pelt, no?
Reply
Re: Newbie scripting problem 10/13/2018 07:25 PM CDT
Pretty sure you want it to be a dagger base weapon (regardless of what it is called).

-- Robert

Wex winks before saying, "Cravin' some winterberry ale? Head on over to White Haven!"
Reply
Re: Newbie scripting problem 10/13/2018 07:26 PM CDT

Any edge will but you will have a penalty compare to using a dagger based weapon.
Reply
Re: Newbie scripting problem 10/13/2018 07:51 PM CDT

I can't figure out how to call the script from command line so I can't pass it any arguments. Also, when I click the script (even after adding the wait 1 commands), this is what happens:



>PUT stow sword
>WAIT 1
>PUT get my dagger
>WAIT 1
>PUT kneel
>WAIT 1
>PUT skin %1 with my dagger
>WAIT 1
>PUT stand
>WAIT 1
>PUT stow dagger
>WAIT 1
>PUT get my sword
>WAIT 1
>PUT gather
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
Sorry, you may only type ahead 2 commands.
I could not find what you were referring to.
What were you referring to?
I could not find what you were referring to.
What were you referring to?
What were you referring to?
I could not find what you were referring to.
Reply
Re: Newbie scripting problem 10/13/2018 09:57 PM CDT
Did you find the StormFront scripting reference page?

https://www.play.net/playdotnet/play/stormfront_scripting.asp

In my StormFront, there is a delete button:

Highlight the name of the script, then across from the bottom, the top row of buttons reads:

CREATE EDIT DELETE RESET RUN

I'm not sure what your hesitation is with Lich, but with it, you have full access to complete Ruby scripts with the full power of Ruby behind them. It's so much easier than makeshift coding with SF.

---
;tune towncrier
Rohese: "... the TownCrier (tune in if you haven’t, it’s without doubt the best thing to ever happen on LNet)"
Xanith: "It's flat out amazing"
Doug: "100.times ^"

TownCrier News Submission link: http://bit.ly/TownCrierNews
Reply
Re: Newbie scripting problem 10/14/2018 03:25 AM CDT
Are you using Avalon or StormFront, Pham?

And:

.fullscriptname

I don't believe it can be abbreviated.

---
;tune towncrier
Rohese: "... the TownCrier (tune in if you haven’t, it’s without doubt the best thing to ever happen on LNet)"
Xanith: "It's flat out amazing"
Doug: "100.times ^"

TownCrier News Submission link: http://bit.ly/TownCrierNews
Reply
Re: Newbie scripting problem 10/14/2018 03:54 PM CDT

avalon? maybe? idk

also .sk is the full name of my script
Reply
Re: Newbie scripting problem 10/14/2018 04:11 PM CDT
If you're playing on a Mac system, you're probably using Avalon. And Avalon has this known bug with scripts. It hasn't been repaired yet, but it behaves exactly as you're describing it.

Doug
Reply
Re: Newbie scripting problem 10/14/2018 04:24 PM CDT
OK, I had some troubles with my Avalon scripts when I first tried to use it that exactly matched what I saw you asking about, Pham.

1. The scripts go in a specific folder that was not intuitive to me. GM IXIX finally saved my sanity and explained where it went:
Documents/Simutronics/GS

I think. I see a couple scripts in Documents/Simutronics, though!

2. I found Avalon did not use WAIT like StormFront did, so you are going to have to specifically time them, and not rely on the Front End not sending stuff until the prompt/RT is ready. See if PAUSE is supported and use it with the number of seconds.

I gave up after a couple weeks with Avalon, mostly over interface issues, not scripting ones. And Doug helped me install Wine and get StormFront working.

Profanity also works neatly on a Mac, but is a bare bones terminal and relies on Lich for a scripting engine. But no emulation is required. I use that all the time for Newsby and the TownCrier.

There are a few Avalon users, and maybe they can jump in here with other tips and help for you. It's been 2 years since I tried to use it.

~L.

---
;tune towncrier
Rohese: "... the TownCrier (tune in if you haven’t, it’s without doubt the best thing to ever happen on LNet)"
Xanith: "It's flat out amazing"
Doug: "100.times ^"

TownCrier News Submission link: http://bit.ly/TownCrierNews
Reply
Re: Newbie scripting problem 10/15/2018 10:33 AM CDT

Thanks for all the responses and help, guys :)

I'll try putting them in that folder and experimenting with manual timing
Reply
Re: Newbie scripting problem 10/15/2018 01:52 PM CDT


I would recommend looking at PEREGRINEFALCON's post about using match and matchwait instead so you don't have to use manual timings.

Also I don't know how it is in Avalon but in the original Wizard FE where scripts were originated from, you had to name them at .cmd files in order to call them from the command line. You couldn't call a normal script without it ending with the .cmd extension, you could only run them from the script menu.

ex: "skin.cmd" you could do .skin orc
"travel.wiz" you could only run from the script menu.

Can read more about it in https://gswiki.play.net/Wizard_(front_end)
Reply
Re: Newbie scripting problem 10/21/2018 03:29 AM CDT

where are stormfront scripts kept on disk?

i want to import a set of scripts from one character to another, using the stormfront interface, but I can't find any file that contains the scripts i made through stormfront
Reply
Re: Newbie scripting problem 10/21/2018 12:18 PM CDT
By default, StormFront scripts are not stored on your hard drive.

You can import and export them as XML files, though:

1. Selection the OPTIONS button on the upper right
2. Choose SETTINGS from the pull down menu
3. Import and Export are right there on that menu.
4. Check the kinds of things off, and give it a new filename. TADAH!

This is also how you back up your StormFront things.

Your scripts, highlights, and ... other things... are stored server side so that they will still be there if you play from a second computer.

There is a way to store them locally only, I forget where that is, probably on the ADDVANCED menu somewhere.

However, I'm slightly confused, I thought you were using Avalon?

---
;tune towncrier
Rohese: "... the TownCrier (tune in if you haven’t, it’s without doubt the best thing to ever happen on LNet)"
Xanith: "It's flat out amazing"
Doug: "100.times ^"

TownCrier News Submission link: http://bit.ly/TownCrierNews
Reply
Re: Newbie scripting problem 10/21/2018 03:01 PM CDT

I am now using stormfront. I like it better
Reply
Re: Newbie scripting problem 10/21/2018 03:07 PM CDT

Thanks for the help. I was able to find the settings and export it locally so I can import on my other character :)
Reply
Re: Newbie scripting problem 10/28/2018 09:36 PM CDT


The "Bigshot" script for Lich is the New Hotness. It will do everything automatically.
There are even videos on YouTube on how to get it all set up and running.
Reply