Outfits and the Staff of Fats

Ethelred

Member
I have a custom outfit, let's call it "PoolDuds", that has the Staff of Fats as the weapon. I can equip that outfit just fine using the relay browser. I'm currently engaged in a life and death struggle with a clannie for pool supremacy. So I thought I'd whip up a little script to equip my outfit and buff up the helpful buffs to practice. When I try to equpt the outfit, I get an error message saying:

Code:
[COLOR=red]You need 1 more Staff of Fats to continue.[/COLOR]
[COLOR=red]Unable      to wear outfit PoolDuds.[/COLOR]

This happens with both

Code:
cli_execute( "outfit PoolDuds" );

and

Code:
outfit( "PoolDuds" );

I do, in fact, have a Staff of Fats and can equip it via the relay browser. Can anybody offer any helpful hints as to what I might be doing wrong or what might make mafia think I don't have a Staff of Fats?
 

Theraze

Active member
The outfit is saved by item name. Because of how mafia fuzzy matches exact names, the Ed-core SoF is the one which exactly matches the name, whether you're in Ed-core or not. Because of this, you don't have a Ed-core SoF, and it can't be equipped.

Workarounds which might be codable:
1) Store outfits by item id rather than by name.
2) On mutually exclusive quest items with identical names, make it match on the possible one rather than the impossible one.

2 was already rejected when I made the FReq back when Ed-core was new. You could make a FReq for 1 though.
 

Ethelred

Member
Ok, thanks for the info. Not what I had hoped to hear, but at least now I know how to code up a work around.
 

lostcalpolydude

Developer
Staff member
Your script could use
Code:
cli_execute( "/outfit PoolDuds" );
to send it as a chat command, bypassing any mafia logic.

Option 1 from Theraze's list isn't possible when account_manageoutfits.php only has item names. An outfit could be saved with Ed's staff of fats, and then attempt to be restored when you have the other staff of fats, so Option 2 doesn't always solve the issue either.
 

Ethelred

Member
Your script could use
Code:
cli_execute( "/outfit PoolDuds" );
to send it as a chat command, bypassing any mafia logic.

Option 1 from Theraze's list isn't possible when account_manageoutfits.php only has item names. An outfit could be saved with Ed's staff of fats, and then attempt to be restored when you have the other staff of fats, so Option 2 doesn't always solve the issue either.

Very clever! Thanks for the tip. Sounds like this is a real can of worms, so I'm happy with that workaround. Let's me do what I want with no extra work required.
 
Last edited:

Darzil

Developer
Is this a mafia error message or a KoL one? I think most of the time with outfits we just submit an outfit request to KoL.
 

lostcalpolydude

Developer
Staff member
Is this a mafia error message or a KoL one? I think most of the time with outfits we just submit an outfit request to KoL.

Mafia tries to retrieve outfit pieces before sending the request to equip it (a change made after the PvP revamp, because you might want to hide stuff in your closet that you also want to equip).
 

Ethelred

Member
Is this a mafia error message or a KoL one? I think most of the time with outfits we just submit an outfit request to KoL.

If this was asking about my original post (no. 1 in this thread), it pretty much has to be a mafia error message since using lostcalpolydude's
Code:
cli_execute( "/outfit PoolDuds" );
suggestion works perfectly.
 
Top