> my_name
Returned: Lxndr
> ashq print( "help" == "HElp" )
false
> ashq print( "help" == "help" )
true
> ashq if ( my_name() == "bmaher" ) { cli_execute( "raffle 1" ); }
Visiting the Raffle House...
You acquire raffle ticket
Requests complete.
So that's why my character specific settings stopped working months ago! Thanks !Two things. One, the top of that wiki page says that my_name returns in all lowercase. You aren't checking for your name in lowercase. Two, string comparisons were made case sensitive a while ago and the lower part of the wiki page is out of date.
Okay, I tried lowercase, it's working.
Any ideas how I can make it trigger only if I have no raffle tickets?
// Buy raffle tickets every day
if(my_name().to_lower_case() == "lxndr" && get_property("_loginRaffle") == "") {
if(visit_url("main.php").contains_text("map7beach.gif") && my_path() != "Zombie Slayer")
cli_execute("raffle 1 " + (can_interact() && my_meat() > 1000? "inventory": "storage"));
set_property("_loginRaffle", "done");
}
int ticket_qty = 1;
if(available_amount($item[raffle ticket]) < ticket_qty && my_name().to_lower_case() == "lxndr" && visit_url("main.php").contains_text("map7beach.gif") && my_path() != "Zombie Slayer")
cli_execute("raffle " + ticket_qty + (can_interact() && my_meat() > ticket_qty * 10000? " inventory": " storage"));