PDA

View Full Version : Where do some Merch conversations come from?


Bytebait
05-06-2020, 04:07 PM
Tratlan Matrick in PoK for example when interacted with says "Hello there, Bytebait. How about a nice Fuzzy Fashion?"

Tratlan_Matrick.lua

-- poknowledge\Tratlan_Matrick.lua NPCID 202095

function event_say(e)
if(e.message:findi("hail")) then
e.self:Say("Greetings, traveler! There are many wonderful discoveries to be made and sights to be seen here in the city of New Tanaan. I myself am a tailor by trade and have seen some wonderful new tailored products during my stay here. If you are an aspiring tailor feel free to browse my wares for any purchases you may with to make.'");
end
end

Where is the conversation coming from if it's not from his lua script?

Secrets
05-06-2020, 07:00 PM
The handler for the merchant request in the source code. It sends one of these greetings if the merchant has items for sale via Message_StringID, which references predefined client strings in eqstr_us.txt:

1145 Hello there, %3. How about a nice %4?
1146 Greetings, %3. You look like you could use a %4.
1147 Hi there %3, just browsing? Have you seen the %4 I just got in?
1148 Welcome to my shop, %3. You would probably find a %4 handy.

If the merchant is empty, it just says:
1144 Welcome to my shop, %3.

https://github.com/EQEmu/Server/blob/306a08b9ac428a4e8527adb9f9439bdfaa47d835/zone/client_process.cpp#L917

Bytebait
05-07-2020, 12:17 AM
Perfect. Thank you!