Merchants have 2 primary commands
Moderator: Team Members
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Merchants have 2 primary commands
Merchants are Hailed upon clicking them, as they respond like all other NPCs with the default of Hail. However, Merchants also need to pop open their inventory upon clicking them - as their default action really is "frommerchant" or "Buy from merchant".
There is still debate on whether or not this also opens the player inventory (not bags, just nventory), so since I am right, I will just ask for it here, too.
1) NPC default Hail + From Merchant
2) Merchant click (Hail) simply Hails the NPC
3) Merchant click (Hail) opens player nventory - doesnotjohnadamsisabigfatliar
We can actually fake this with scripting by setting up a function targeted(), but perhaps it is better if it's just hardcoded.
Edit: Based on paulgh actually making me log in and see wth is going on, I think this can be handled with scripting (function targeted()) since most Merchant NPCs should have some form of scripting for their Hail/speech anyway?
There is still debate on whether or not this also opens the player inventory (not bags, just nventory), so since I am right, I will just ask for it here, too.
1) NPC default Hail + From Merchant
2) Merchant click (Hail) simply Hails the NPC
3) Merchant click (Hail) opens player nventory - doesnotjohnadamsisabigfatliar
We can actually fake this with scripting by setting up a function targeted(), but perhaps it is better if it's just hardcoded.
Edit: Based on paulgh actually making me log in and see wth is going on, I think this can be handled with scripting (function targeted()) since most Merchant NPCs should have some form of scripting for their Hail/speech anyway?
Last edited by John Adams on Thu Oct 09, 2008 8:46 am, edited 1 time in total.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Every merchant should have hail as a secondary command in the DB. If they don't then a simple update will take care of that as Parser probably doesnt do it. I'll change the code to call the hail LUA function when someone starts a merchant transaction.
Actually which would you rather me call the hailed(NPC, Spawn) function or a new merchant(NPC, Spawn) function? If you see no scenario where the action would be different depending on whether they start a merchant transaction I'll just call the hailed function. Otherwise I can call the new merchant(NPC, Spawn) function and you could add hailed(NPC, Spawn) inside that function if wanted.
Actually which would you rather me call the hailed(NPC, Spawn) function or a new merchant(NPC, Spawn) function? If you see no scenario where the action would be different depending on whether they start a merchant transaction I'll just call the hailed function. Otherwise I can call the new merchant(NPC, Spawn) function and you could add hailed(NPC, Spawn) inside that function if wanted.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
I believe every "targeted" merchant performs the same way; I hail, they respond, their inventory opens for transactions. Again, we could just build our merchant LUA scripts as "function targeted()" instead, and make that call function hailed(). I didn't think of calling hailed as a sub-function within targeted.
I like the idea of having a unique LUA though "function merchant()" which combos them up for us. Less scripting, but whatever is easiest on you and makes the most sense.
I like the idea of having a unique LUA though "function merchant()" which combos them up for us. Less scripting, but whatever is easiest on you and makes the most sense.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Ok, I just re-ran some live tests on merchants and the broker. Here is my final analysis (for the moment anyway hah)
Seems the player character does not perform a "Hail, so-and-so" command, but the NPC responds as if the player had targeted and pressed "H" for Hail.
However, if you do target the NPC and use command "Hail" or press "H" to hail, the NPC does respond with the PlayFlavor, but does NOT open the transaction window.
Note the first time I clicked him, he said nothing. We currently emulate this by using math.random() with a higher number than the possible options
This is what I want. So it looks like maybe a special merchant function is needed, so players are not sending their Hail?
Seems the player character does not perform a "Hail, so-and-so" command, but the NPC responds as if the player had targeted and pressed "H" for Hail.
However, if you do target the NPC and use command "Hail" or press "H" to hail, the NPC does respond with the PlayFlavor, but does NOT open the transaction window.
Note the first time I clicked him, he said nothing. We currently emulate this by using math.random() with a higher number than the possible options
This is what I want. So it looks like maybe a special merchant function is needed, so players are not sending their Hail?
You do not have the required permissions to view the files attached to this post.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Btw, I think I faked this by using the function targeted() which calls function hailed() to get me my mixture of click-hail-open or target-hail-only.
LE, if you still want to provide a Merchant() function, it would eliminate a little confusion on why we have targeted calling hail, but in the short term, this is fine for now.
Edit: Actually, I cannot use targeted() since the NPC starts squalking it's Hail block 1/2 way across the zone if you click it. Maybe a range is needed on response to Hail or Targeted.
LE, if you still want to provide a Merchant() function, it would eliminate a little confusion on why we have targeted calling hail, but in the short term, this is fine for now.
Edit: Actually, I cannot use targeted() since the NPC starts squalking it's Hail block 1/2 way across the zone if you click it. Maybe a range is needed on response to Hail or Targeted.
Who is online
Users browsing this forum: No registered users and 0 guests