Gender function

tyilo

Member
Code:
void unequip_all(string pet)
{
  item it = equipped_item($slot[acc1]);
  unequip(it);
  it = equipped_item($slot[acc2]);
  unequip(it);
  it = equipped_item($slot[acc3]);
  unequip(it);
  it = equipped_item($slot[hat]);
  unequip(it);
  it = equipped_item($slot[off-hand]);
  unequip(it);
  it = equipped_item($slot[pants]);
  unequip(it);
  it = equipped_item($slot[shirt]);
  unequip(it);
  it = equipped_item($slot[weapon]);
  unequip(it);
  if(pet == "familiar")
  {
    it = equipped_item($slot[familiar]);
    unequip(it);
  }
}
string gender()
{
  cli_execute("checkpoint");
  unequip_all("");
  if(contains_text(visit_url("charsheet.php"), "_f.gif"))
  {
    cli_execute("outfit checkpoint");
    return "female";
  }
  else
  {
    cli_execute("outfit checkpoint");
    return "male";
  }
}
print(gender());
This doesn't work :'(
Why?
 

tyilo

Member
1 I want it to unequip all your close and see if it contains _f.gif. Example i am an accordion thief name of picture when i am male: accordionthief.gif, and when i am female the name of the picture is: accordionthief_f.gif.

2 It says that there is an error in line 4.
 

Paragon

Member
I have always needed to unequip things through the CLI rather then through ash.
Also, if you want to unequip everything you can just call unequip w/ no args and I think it will unequip everything.
CLI_Execute("unequip");

I think that should take care of it..
 

Veracity

Developer
Staff member
equip( $slot[ acc1 ], $item[ none ] );

...will unequip whatever is in the first accessory slot.

outfit( "Birthday Suit" );

...should unequip everything.
 
Top