Bug - Fixed Mafia unaware of skills learned through scripts

Theraze

Active member
Not sure if this is the same issue as mafia not knowing that Grandpa skills are learned in the sea without a refresh, but... Used the get_skill script to learn armorcraftiness, since I haven't HP-ed it yet. Got the following:
> create clown buckler

You lack a skill or other prerequisite for creating that item (ARMOR).

> get_skill armorcraftiness

You learned a new skill: Armorcraftiness

> create clown buckler

You lack a skill or other prerequisite for creating that item (ARMOR).

> refresh all

Refreshing session data...
Synchronizing moon data...
Loading character status...
Seeing what's still trendy today...
Done. Are YOU a fashion plate?
Retrieving character data...
Refreshing closet...
Examining consumables in closet...
Examining equipment in closet...
Examining miscellaneous items in closet...
Updating inventory...
Retrieving familiar data...
Familiar data retrieved.
Retrieving campground data...
Refreshing storage...
Examining meat in storage...
Examining consumables in storage...
Examining equipment in storage...
Examining miscellaneous items in storage...
Session data refreshed.

> create clown buckler

Verifying ingredients for clownskin buckler (1)...
Purchasing buckler buckle (1 @ 100)...
You acquire an item: buckler buckle
You spent 100 Meat
Purchases complete.
Creating clownskin buckler (1)...
You acquire an item: clownskin buckler
Successfully created clownskin buckler (1)
Of course, the page also gets double processed for meat, believing that it cost 5000 instead of 2500 meat, but that's been an issue since July, at least.
 

Veracity

Developer
Staff member
I have a multi with two unlearned skills, so it's not like I have a lot of test slack here. :)

I started out with the following in the session tally:

Meat Gained: 0

> ash have_skill( $skill[ Lasagna Bandages ] )

Returned: false

> ashq visit_url( "guild.php?action=buyskill&skillid=9" )

You learned a new skill: Lasagna Bandages

> ash have_skill( $skill[ Lasagna Bandages ] )

Returned: true
The session tally now says:

Meat Gained: -1,000

Conclusion:

- Acquiring a skill via visit_url() (and what else could you mean than that, when you say "learned through scripts"?) immediately added the skill to my list of known skills.
- It deducted the correct cost - once - for the skill.

In other words, I am unable to reproduce any of the problems you report in this or the other bug report.

P.S. When you buy a skill at the guild, it simply says "You learned a new skill: xxx". It does not telll you how much you spent. Therefore, the comment about the "page getting double processed for meat" makes no sense, since there is nothing on the page to "process for meat". We deduct the skill cost in GuildRequest.parseResponse based on what SkillDatabase.getSkillPurchaseCost tells us is the cost.
 
Last edited:

Theraze

Active member
Is it possible that the concoctions list didn't get refreshed when the armorcraftiness skill was learned in this way?
 

Veracity

Developer
Staff member
Revision 10368 forces a refresh of the ConcoctionDatabase when you learn a skill in your guild. This will make mixing methods that depend on the skill to become available to you.

Edit: Heh. You snuck in a response. Yes, it is possible. :)
 

Theraze

Active member
Thanks! :) I'd much rather avoid the extra server hits from refresh if it can be done automagically. Yay for fixings!
 
Top