#231 (neatz) need a function to grey out items in merchant inventories

Closed
opened 3 years ago by image · 8 comments
image commented 3 years ago
There is no content yet.
image commented 3 years ago
Collaborator

this is item_difficulty (GetArrowColor) on the SendBuyMerchantList

probably should have done this as part of the buy item changes lol

Neatz can you give more context, why are we greying them out? Is it the item thats always grey for everyone, is the merchant greying for one player?

this is item_difficulty (GetArrowColor) on the SendBuyMerchantList probably should have done this as part of the buy item changes lol Neatz can you give more context, why are we greying them out? Is it the item thats always grey for everyone, is the merchant greying for one player?
neatz09 commented 3 years ago
Collaborator

well like linguists/trainers are a few examples linguist if you have the language greys out the item and buy button and displays red text(screenshot 1)

trainers get out the spell but display blue text and buy button still works(screenshot 2

well like linguists/trainers are a few examples linguist if you have the language greys out the item and buy button and displays red text(screenshot 1) trainers get out the spell but display blue text and buy button still works(screenshot 2
image commented 3 years ago
Collaborator

we need a different way to look at the languages cause we don't know what language a book item represents.

Either we have a new DB column for the language that is applicable or we support a new lua function that does the check for us based on the item script.

we need a different way to look at the languages cause we don't know what language a book item represents. Either we have a new DB column for the language that is applicable or we support a new lua function that does the check for us based on the item script.
neatz09 commented 3 years ago
Collaborator

gonna say lua here as i was dickin around i also found like shady swashbuckler that has restrictions on his vendor inventory(per item) depending if you had completed certain quests or not.

gonna say lua here as i was dickin around i also found like shady swashbuckler that has restrictions on his vendor inventory(per item) depending if you had completed certain quests or not.
image commented 3 years ago
Collaborator

DwarvenLanguagePrimer.lua:

function item_difficulty(Item, Spawn)
	return 3
end

the return is based on the arrow colors

#define ARROW_COLOR_GRAY 0 // 3
#define ARROW_COLOR_GREEN 1 // 1
#define ARROW_COLOR_BLUE 2
#define ARROW_COLOR_WHITE 3 // 3
#define ARROW_COLOR_YELLOW 4 // 4
#define ARROW_COLOR_ORANGE 5 // 5
#define ARROW_COLOR_RED 6

I only know gray, white and red work. Cant' say the others would.

Side note: WE SHOULD NEVER REMOVE/DELETE ITEM THRU ITEM_DIFFICULTY! We send the master list item via the buy back panel, so it would be a big no no to try to delete the master item from memory (this is to save trouble instantiating the item + tracking it in memory over time).

![https://cdn.discordapp.com/attachments/380808849722048525/822077855889621052/unknown.png](https://cdn.discordapp.com/attachments/380808849722048525/822077855889621052/unknown.png) DwarvenLanguagePrimer.lua: ``` function item_difficulty(Item, Spawn) return 3 end ``` the return is based on the arrow colors ``` #define ARROW_COLOR_GRAY 0 // 3 #define ARROW_COLOR_GREEN 1 // 1 #define ARROW_COLOR_BLUE 2 #define ARROW_COLOR_WHITE 3 // 3 #define ARROW_COLOR_YELLOW 4 // 4 #define ARROW_COLOR_ORANGE 5 // 5 #define ARROW_COLOR_RED 6 ``` I only know gray, white and red work. Cant' say the others would. Side note: WE SHOULD NEVER REMOVE/DELETE ITEM THRU ITEM_DIFFICULTY! We send the master list item via the buy back panel, so it would be a big no no to try to delete the master item from memory (this is to save trouble instantiating the item + tracking it in memory over time).
image commented 3 years ago
Collaborator

the you already know this language or already scribed this defined on the item, need to identify where those are. However that would be on the item itself and not the merchant.

the you already know this language or already scribed this defined on the item, need to identify where those are. However that would be on the item itself and not the merchant.
image commented 3 years ago
Collaborator

got you have already scribed this item.. working and also requiring previous tier

https://cdn.discordapp.com/attachments/684934458738212962/822931033044418701/scribestatus.mp4

RULE_INIT(R_Spells, RequirePreviousTierScribe, "0"); // requires step up apprentice -> apprentice (handcrafted?) -> journeyman (handcrafted?) -> adept -> expert -> master
got you have already scribed this item.. working and also requiring previous tier https://cdn.discordapp.com/attachments/684934458738212962/822931033044418701/scribestatus.mp4 RULE_INIT(R_Spells, RequirePreviousTierScribe, "0"); // requires step up apprentice -> apprentice (handcrafted?) -> journeyman (handcrafted?) -> adept -> expert -> master
image commented 3 years ago
Collaborator
function item_description(Item, Spawn)
	return "You already know this language."
end

``` function item_description(Item, Spawn) return "You already know this language." end ``` ![](https://cdn.discordapp.com/attachments/684934458738212962/823156622623899658/unknown.png)
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.