Jump to content

NPC gives an Itemset to the player


Guest arthaswow

Recommended Posts

Search in this file (http://github.com/mangos/mangos/blob/master/src/game/Level3.cpp) for

bool ChatHandler::HandleAddItemSetCommand(char* args)

and you will see how to look up items by item set in the core, which is what darkstalker meant, but I don't think this can be done in scripts.

"additemset" is a method in the player class which is derived from the unit class.

so do research on your own before posing...

There is no "additemset" method in Player class. The closest is AddItemsSetItem() and this is not related to what the OP wanted.

Link to comment
Share on other sites

you can create a custom vendor for itemset with this sql (example for T7.0 vendor)

-- create a vendor template
INSERT INTO creature_template (entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid_A, modelid_A2, modelid_H, modelid_H2, NAME, subname, IconName, gossip_menu_id, minlevel, maxlevel, minhealth, maxhealth, minmana, maxmana, armor, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, TYPE, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, PetSpellDataId, mingold, maxgold, AIName, MovementType, InhabitType, unk16, unk17, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName) VALUES
(460002, 0, 0, 0, 0, 0, 26353, 0, 26353, 0, 'Vendor Name', 'Vendor Subname', '',0, 80, 80, 1337, 1337, 1337, 1337, 9730, 35, 35, 4224, 1, 1.14286, 2, 1, 420, 630, 0, 157, 3.2, 2000, 2000, 1, 6, 0, 0, 0, 0, 0, 0, 336, 504, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'', 0, 3, 1.0, 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, '');

-- add item set(s) to vendor
DELETE FROM npc_vendor WHERE entry = 460002;
INSERT INTO npc_vendor (entry, item)
SELECT 460002 AS entry, it.entry FROM item_template AS it WHERE it.itemset IN
(787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805)
AND it.ItemLevel = 200 AND it.AllowableRace != -1;

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use