• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] [Trinity] Trying to build wiered query to update costs for items

Status
Not open for further replies.

Synth

Exalted Member
Hello Emudevs,well i'm making a query that i can update costs on npc_vendor by the itemlevels so les't say i have this query for npc_vendor:

Code:
INSERT INTO `npc_vendor` SELECT 55560,0,`entry`,0,0,0 
FROM `item_template` WHERE  `InventoryType`= 6  AND  `ItemLevel` = 277 AND NAME NOT LIKE "%Gladiator%";

I want now to update cost for those itemslevel by using ExtendedCost:
I try that but its wrong cz its updating costs like create 1 for free and the other costed with same items id i try that:

Code:
INSERT INTO `npc_vendor` SELECT 55560,0,`entry`,0,0,[COLOR="#00FF00"]33001[/COLOR] -- Cost ID
FROM `item_template` WHERE  `InventoryType`= 6  AND  `ItemLevel` = 277 AND NAME NOT LIKE "%Gladiator%";

If someone can find for me another way that make it work without creating the items double time so just set cost for this item level.

Thank you!
Best regards,
Synth !
 

Tommy

Founder
I want now to update cost for those itemslevel by using ExtendedCost:
I try that but its wrong cz its updating costs like create 1 for free and the other costed with same items id i try that:

Code:
INSERT INTO `npc_vendor` SELECT 55560,0,`entry`,0,0,[COLOR="#00FF00"]33001[/COLOR] -- Cost ID
FROM `item_template` WHERE  `InventoryType`= 6  AND  `ItemLevel` = 277 AND NAME NOT LIKE "%Gladiator%";

If someone can find for me another way that make it work without creating the items double time so just set cost for this item level.

Thank you!
Best regards,
Synth !

It made sense until I started to read the ExtendedCost stuff you mentioned. I can't see the problem when I can't understand what you wrote. XD



If someone can find for me another way that make it work without creating the items double time so just set cost for this item level.

What do you mean by double time?

I ran the query and the data looks like this in npc_vendor:

Wn1rx3I.png


Tell me what you don't want within those rows.
 

Synth

Exalted Member
It made sense until I started to read the ExtendedCost stuff you mentioned. I can't see the problem when I can't understand what you wrote. XD





What do you mean by double time?

I ran the query and the data looks like this in npc_vendor:

Wn1rx3I.png


Tell me what you don't want within those rows.
Well nevermind now its fixed i just use my mind and did this query:
Code:
update npc_vendor set ExtendedCost=3045 where item in(select entry from item_template where itemlevel=258 AND name not like "%Gladiator%" and InventoryType= 6);
 
Status
Not open for further replies.
Top