First, let me share with you my script.
Though this is probably obvious the script selects a random integer between 0 and 3, casts summon stickers that many times, then casts summon snowcone 3-that number. After it has summoned (or not) it returns the results. Now, my problem is that the boolean returned by use_skill seems to return true even if no items were summoned. I am guessing this is probably the correct way for the returns from use_skill to function; however, is there a way to detect results so that I can have my script print the real results of the casting?
Code:
void tomeSummon(){
if(in_hardcore())
return;
int stickCasts = random(4);
boolean didCast;
didCast = use_skill(stickCasts, $skill[Summon Stickers]);
use_skill(3-stickCasts, $skill[Summon Snowcone]);
if(didCast)
print("Summoned: " + int_to_string(stickCasts) + " Stickers, " + int_to_string(3-stickCasts) + " Snowcones.");
else
print("Summon tome items failed.");
}
void main(){
tomeSummon();
}