Quote:
Originally Posted by Uthgaard
[You must be logged in to view images. Log in or Register.]
You posted an update query that was syntactically a disaster, and would have introduced a larger problem than it would have fixed. Modifying the sellrate also modifies what you get for an item, not just what the npc charges to sell it back, making an easy to obtain item vendor for 8k plat.
|
Like I said, it was based off of the PEQ database, I dont know the fieldnames or Table Names of the P1999 database, but im damn sure it was used as a basis. The Sell Rate is what the Vendor marks up the buy price at
(EDIT: PRICE is the Fieldname on PEQ), shit I can even give you the line of the EQEmu Server Code where it calculates the price if you want that. The Buying Price doesn't change, the "syntax" is fine. I write SQL and Programs for a living, I know how to write a Query.
Using the Query I gave you, It would update the SELLRATE field of the Golem Metal Wand (I could write you another query so I didnt need to find the damn ItemID of the Wand if you really want).
Ok, hows this, so you dont need to find the actual ItemID, just rely on the Name of the Item.
Code:
update items
set sellrate = sellrate + 1000.0 -- Arbitrary increase
where [id] in (select [id] from items where UPPER([name]) like '%GOLEM METAL WAND%')
-- Notice im not touching the PRICE field which sets the Price a merchant buys it at