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

Geschlossen
vor 3 Jahren geöffnet von image · 8 Kommentare
image kommentierte vor 3 Jahren
Hier gibt es bis jetzt noch keinen Inhalt.
image kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter

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 kommentierte vor 3 Jahren
Mitarbeiter
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)
image hat dieses Issue vor 3 Jahren aus einem Commit referenziert
image hat vor 3 Jahren geschlossen
Anmelden, um an der Diskussion teilzunehmen.
Laden…
Abbrechen
Speichern
Hier gibt es bis jetzt noch keinen Inhalt.