SphereCommunity
Is there a way to implement vendor buy in an enhanced client? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Is there a way to implement vendor buy in an enhanced client? (/Thread-Is-there-a-way-to-implement-vendor-buy-in-an-enhanced-client)



Is there a way to implement vendor buy in an enhanced client? - midikit - 12-20-2018 11:58 AM

Thank you for creating the sphereserver.

I am an old issue that I already know.
If use vendor buy in Enhanced client, can not use it because the purchase list is not displayed.
I am only using the Enhanced client, and I am also scripting the sphereserver to the enhanced client.
Now there is a problem with the vendor buy function, so can not use the player vendor.
So, I am replacing the problem of the player vendor with a script like the vending machine.
NPC vendor is very inconvenient, but we run temporary scripts so that you can buy the necessities.
Is it difficult to implement the vendor buy of the enhanced client in the future in the sphereserver?
I sincerely hope that the vendor buy issue will be resolved in the sphereserver, and I am waiting for the vendor buy issue to be resolved each time a new build comes up.


RE: Is there a way to implement vendor buy in an enhanced client? - darksun84 - 12-20-2018 08:45 PM

04-07-2017, Nolok
- Fixed: random ranges ( e.g.: {i_dagger 1 i_gold 1} ) sometimes returned a totally random and unexpected value.
If the value was used to create an item, it could either create a random item or not create it at all, without logging any error.
- Fixed: vendors couldn't re-sell the items bought from the players.
- Fixed: with the current User Interface (the blue one, not the orange which is older) of the Enhanced Client, in the buy gump
the paperdoll of the vendor often was missing on the left.

IMPORTANT: with the same UI of the EC the buy gump may not work, because it doesn't show the items in stock.
This occurs with the new UI (blue) and not with the old (orange) because the new one wants the vendor to have
its name inclusive of the title. If the "the" keyword and the following title aren't found, the code of the interface
generates an internal error and halts the execution of the remaining code (which renders the items in the list).
As example: if the vendor name is Greg the items don't show, but if you set the NAME (and not the TITLE property)
to Greg the Butcher ("the" word is mandatory) the items are finally shown.
Since the client retrieves the name with the tooltip data (Cliloc 1042971) the server sends, if you want a workaround
to this requirement, you can leave untouched the NAME property and send a custom name cliloc which contains also the work/trade title:
ADDCLILOC 1042971, <NAME> The <QVAL <ISEMPTY <TITLE>> ? Vendor : <TITLE>>

The change is only on the xperimental version i think


RE: Is there a way to implement vendor buy in an enhanced client? - Coruja - 12-21-2018 06:51 AM

to make the vendor buy/sell gump work on enhanced clients you must enable VendorTradeTitle=1 on sphere.ini

this will make all vendors display its trade title on the name by default (eg: "[char name] the [char title]"), which is required by enhanced clients to consider the char as vendor and enable vendor features


RE: Is there a way to implement vendor buy in an enhanced client? - midikit - 12-21-2018 10:40 AM

Thank you for reply.
VendorTradeTitle = 1 had been done in previous builds, but vendor buy did not show up in the purchase list.
I have tested again in build 719, but I still do not see the purchase list of vendor buy.
vendor sell will always display the sales list as normal.


RE: Is there a way to implement vendor buy in an enhanced client? - Coruja - 12-22-2018 05:15 AM

probably you had changed your script to show just "bowyer" instead "the bowyer", so to make it work you must change it back to "the bowyer"

I have no idea why, but enhanced clients have some internal checks that will only display the vendor buy/sell gump on NPCs with names like "[vendor name] the [vendor title]"


RE: Is there a way to implement vendor buy in an enhanced client? - midikit - 12-24-2018 02:16 PM

Thanks coruja Smile
Thanks to this, a long standing problem has been resolved. Big Grin
It seems that a long time ago I removed all 'the' in the title for the NPC @clienttooltip configuration.
This time, I checked the Enhanced client.
I noticed that the 'vendor buy' gump works because of the title or whatever method use to include 'the'.
I am creating 'LocalizedStrings.uop' for language display and some reasons.
It created a cliloc and contained 'the' in its contents.
Also, the 'weblink' command does not work by default, but when modify certain parts of UOSA.exe, also know that the weblink of the modified address works.