stash and other questions

tedrock

New member
Can someone show me a bare bones script to put 500 meat or 1 bottle of gin into my clan stash?
Also I have a few questions that will probably require examples:
1) Can you send a normal kmail to someone using a script or can it just send items and meat? Can you send a personal message to someone when sending meat or items? If any of that is possible... how?

2)Is it possible to make a script to send say 500 meat to everyone on your contact list or from a list in a text file? Again if so... how?

I have some general knowledge of scripting and pick it up quickly but I can't find any examples of the stash command or message sending.

Thanks :D
 

Nightmist

Member
[quote author=tedrock link=topic=155.msg760#msg760 date=1147316177]
Can someone show me a bare bones script to put 500 meat or 1 bottle of gin into my clan stash
[/quote]

Standard CLI Script.
Code:
stash put 1 bottle of gin
OR
Code:
stash put 500 meat
(Actually not sure if that 500 meat one works or not)

[quote author=tedrock link=topic=155.msg760#msg760 date=1147316177]
1) Can you send a normal kmail to someone using a script or can it just send items and meat? Can you send a personal message to someone when sending meat or items? If any of that is possible... how?
[/quote]
No K-Mailing with certain messages is a GUI feature only so im afraid you are stuck with items and meat.


[quote author=tedrock link=topic=155.msg760#msg760 date=1147316177]
2)Is it possible to make a script to send say 500 meat to everyone on your contact list or from a list in a text file? Again if so... how?
[/quote]
Not that im aware of... although you can make a script and manually insert player names and such into it.

Standard CLI Script.
Code:
send 500 meat to PlayerName1
send 500 meat to PlayerName2
send 500 meat to PlayerName3
send 500 meat to PlayerName4
(And so on)


Edit: The basic CLI scripting reference for the command. http://kolmafia.sourceforge.net/scripting.html#stash
http://kolmafia.sourceforge.net/scripting.html#send
 

tedrock

New member
I actually looked at a the available resources and couldn't get the commands to work. Mostly becauseI didn't know the exact formating.
If i put just
Code:
stash put 1 bottle of gin
in an ASH file and run it I get the error
Script parsing error at line 1 in file scripts\tester.ash. Debug log printed.
I'm trying to test some stuff one command at a time and not making much progress.

EDIT:
ok so i got it to work by using...
Code:
cli_execute("stash put 1 bottle of gin");
I'm new... what else can I say?
FYI
Code:
cli_execute("stash put 500 meat");
works
 

macman104

Member
Yup, as you've probably noticed, standard CLI commands do not work in ASH bare, you have to wrap them in cli_execute("cli command");
 
[quote author=tedrock link=topic=155.msg762#msg762 date=1147322737]
If i put just
Code:
stash put 1 bottle of gin
in an ASH file and run it I get the error
Script parsing error at line 1 in file scripts\tester.ash. Debug log printed.
[/quote]

If, on the other hand, you put the exact same command into a file with a .txt filename instead of a .ash filename, it should work fine.

The confusion is because KoLmafia actually has two scripting languages, and it uses the filename extension (.txt or .ash) to figure out which one you want it to use.
 
Top