A little help making a logout script.

Bale

Minion
I just ran my above code though and discovered that available_amount() does not include your familiars' equipped items, so it didn't use my Hand which already had my time sword on it. Ugh. Just use Bale's code -- it's user-problem-free. Leave me to my overzealous server-hit-preventing machinations. :)
Forgot about that. However, if you want to fine tune your script, the function that you're looking for is: familiar_equipped_equipment($familiar[disembodied hand])

ROFL at you, Zarqon and Bale! You two are too much :)
Thank you! I'm getting too tired for me to update his cute little script with that addition. Zzzzz. However, if he doesn't do it by tomorrow, it is almost certain that I'll make use of the function that I just showed off.
 

zarqon

Well-known member
Right then. Call this and you should be golden, with a few of the more common reasons for not switching to your Hand covered.

PHP:
   if (have_familiar($familiar[disembodied hand]) && 
       (available_amount($item[time sword]) > 0 || familiar_equipped_equipment($familiar[disembodied hand]) == $item[time sword]) && 
       !(available_amount($item[time sword]) == 2 && available_amount($item[grimacite gravy boat]) == 0 && have_skill($skill[double-fisted])))
   use_familiar($familiar[disembodied hand]); 
   cli_execute("maximize adv");
 

Bale

Minion
That is probably the most effort I'll ever see someone go to, in order to avoid a single server hit. zarqon, you are a golden god!
 

jasonharper

Developer
I really hate to ruin all your fun, but in r7858 you can now say "maximize adv, switch disembodied hand" and it will do all this work for you. The familiar switch won't take place unless it would increase the score.
 

zarqon

Well-known member
Awww man, something excellent and easy to use that's also functionally better! What a jerk!
 
Top