Deathless Assassin
Member
My problem is that I'm basically stumbling around in the dark. I looked at the mafia guide and was able to pick up a few things that helped me get this far, but as I'm sure you'll be able to tell by what I came up with that I could use some help.
I really did try, but I'm pretty much learning from scratch here. I suspect the biggest thing I need to work on is syntax, the brackets and everything are pretty confusing to me. Is the "void main" at the top necessary? Will the scripts I'm invoking have the parameters I named entered correctly? For instance, for eat,drink.ash I want it eating, drinking, and spleening to max, and not overdrinking or simming. Hopefully what I want the script to do is self explanatory based on how I wrote it, but just to be totally clear, here's what I want it to do written out:
This script will be set to run on login
If the character logging in is Red Maw
Invoke eatdrink.ash eat/drink/spleen to max, don't overdrink, don't sim
Recover HP (I have Bale's script set as mafia's default, so that's what it will use, right?)
Invoke bounty.ash, use as many turns as it takes
Invoke farm.ash, don't sim
Send 1 meat to Testudinata, wait 45 seconds
If ode is found, nightcap
If ode is not found, send 15 meat to Noblesse Oblige and wait 45 seconds, then nightcap regardless
Additionally, once another one of my accounts decides to take a break from making slimelings, I might want it to use this script too. To add a second character could I do something like this?
I am interested in learning more about how this all works, but it's slow going since it's like learning another language. However, the guide was a helpful start, so hopefully I'll be able to improve to the point where I can both write basic scripts like this, as well as tweak the scripts already here on occasion if I need. Thanks in advance for your patience.
PHP:
void main {
if( my_name() == "Red Maw" )
{
cli_execute("eatdrink.ash 15 19 15 f f")
cli_execute("restore hp")
cli_execute("bounty.ash *")
cli_execute("farm.ash f")
cli_execute("csend 1 meat to Testudinata");
wait 45;
if(have_effect($effect[Ode to Booze]))
{
cli_execute("buy 1 a little sump'm sump'm")
cli_execute("drink a little sump'm sump'm")
}
else
{
cli_execute("csend 15 meat to Noblesse Oblige")
wait 45
cli_execute("buy 1 a little sump'm sump'm")
cli_execute("drink a little sump'm sump'm")
}}}
I really did try, but I'm pretty much learning from scratch here. I suspect the biggest thing I need to work on is syntax, the brackets and everything are pretty confusing to me. Is the "void main" at the top necessary? Will the scripts I'm invoking have the parameters I named entered correctly? For instance, for eat,drink.ash I want it eating, drinking, and spleening to max, and not overdrinking or simming. Hopefully what I want the script to do is self explanatory based on how I wrote it, but just to be totally clear, here's what I want it to do written out:
This script will be set to run on login
If the character logging in is Red Maw
Invoke eatdrink.ash eat/drink/spleen to max, don't overdrink, don't sim
Recover HP (I have Bale's script set as mafia's default, so that's what it will use, right?)
Invoke bounty.ash, use as many turns as it takes
Invoke farm.ash, don't sim
Send 1 meat to Testudinata, wait 45 seconds
If ode is found, nightcap
If ode is not found, send 15 meat to Noblesse Oblige and wait 45 seconds, then nightcap regardless
Additionally, once another one of my accounts decides to take a break from making slimelings, I might want it to use this script too. To add a second character could I do something like this?
PHP:
void main {
if( my_name() == "Red Maw" ){
cli_execute("eatdrink.ash 15 19 15 f f")
-snip-
cli_execute("drink a little sump'm sump'm")}
if( my_name() == "Laser Bullet" ){
cli_execute("eatdrink.ash 15 19 15 f f")
-snip-
cli_execute("drink a little sump'm sump'm")}
}
I am interested in learning more about how this all works, but it's slow going since it's like learning another language. However, the guide was a helpful start, so hopefully I'll be able to improve to the point where I can both write basic scripts like this, as well as tweak the scripts already here on occasion if I need. Thanks in advance for your patience.