PDA

View Full Version : Giving buffs.



Darkness
08-28-2006, 01:43 AM
Is there a way to scipt buffing other people in ash?
I want to make a script that buffs a player with a bunch of buffs, but the use_skill function doesnt take a target...

Tirian
08-28-2006, 01:55 AM
Use CLI.


cli_execute("cast 5 smile on Veracity");

Darkness
08-28-2006, 02:26 AM
Okay, cool ill try that.
Next thing:
Is there a way to pass parameters from the cli to an ash script?
eg will: 'call mybuffpackscript.ash 5 veracity'
work with: void main (int turns, string player)
?

Nightmist
08-28-2006, 03:20 AM
Is there a way to pass parameters from the cli to an ash script?

Nope, wont work. You cant directly pass parameters but you can through setting custom settings in the character files.
Use a mix of CLI:
set <settingname>=<settingvalue> (http://kolmafia.sourceforge.net/scripting.html#data")
and then in the ASH script:
string get_property( string settingname)

macman104
08-28-2006, 04:27 AM
Nope, wont work. You cant directly pass parameters but you can through setting custom settings in the character files.Well, you can pass parameters using the void main(variables) like I've done it by calling the script in the gCLI, and then being prompted for the values, I haven't tried passing them while calling the function so it's worth a shot.

GhettoTrucker
09-03-2006, 12:35 AM
this is kinda out of context to this topic but... is it possible to say

cli_execute("cast 5 smile on *");

What i'm wanting that to do is cast 5 smiles on anyone... possible?

Nightmist
09-03-2006, 04:24 AM
I'm not logged in at the moment so I can't pull the casting URL but im sure it uses the playerID which you can just "randomly" choose using the ash command random( int range). (No promises it will hit a active player though, so you may either attempt to cast on someone that doesnt exist or someone thats inactive)

macman104
09-03-2006, 04:28 AM
this is kinda out of context to this topic but... is it possible to say

cli_execute("cast 5 smile on *");

What i'm wanting that to do is cast 5 smiles on anyone... possible?
What nightmist said would probably work, but otherwise, no I don't believe so. The * doesn't denote an "anything" it means, "all of them". So like "use * toolbox" means, "use all toolboxes".