How to change the armor requirement on an item? menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Corosive720's Avatar Member
    Reputation
    11
    Join Date
    Nov 2007
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to change the armor requirement on an item?

    The title says it all, how do you change the the armor requirement a piece of armor requires to equip? I want to change plate items in the DB to have clothies be able to wear them visa versa. I already changed the Material column in the Items_template table, but all that changes is the in-game sound it makes when you equip it.

    Btw im using TrinityCore if you didnt read the Prefix

    How to change the armor requirement on an item?
  2. #2
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could always just have a gossip NPC that teaches plate (spell 750)

    Code:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(50, player, 0)
    unit:GossipMenuAddItem(0, "Learn Plate Mail", 1, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 1) then
    player:LearnSpell(750)
    end
    
    RegisterUnitGossipEvent(UNITIDHERE, 1, "On_Gossip")
    RegisterUnitGossipEvent(UNITIDHERE, 2, "Gossip_Submenus")
    OR for an even easier solution:

    Code:
    function LearnPlate(event, plr, message, pType, pLanguage, pMisc)
    plr:LearnSpell(750)
    end
    
    RegisterServerHook(4, "LearnPlate")
    This one will effect all new, and existing players.

    Hope this helped.
    Last edited by choweyiii; 11-18-2011 at 09:19 PM.

  3. #3
    Corosive720's Avatar Member
    Reputation
    11
    Join Date
    Nov 2007
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by choweyiii View Post
    You could always just have a gossip NPC that teaches plate (spell 750)

    Code:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(50, player, 0)
    unit:GossipMenuAddItem(0, "Learn Plate Mail", 1, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 1) then
    player:LearnSpell(750)
    end
    
    RegisterUnitGossipEvent(UNITIDHERE, 1, "On_Gossip")
    RegisterUnitGossipEvent(UNITIDHERE, 2, "Gossip_Submenus")
    OR for an even easier solution:

    Code:
    function LearnPlate(event, plr, message, pType, pLanguage, pMisc)
    plr:LearnSpell(750)
    end
    
    RegisterServerHook(4, "LearnPlate")
    This one will effect all new, and existing players.

    Hope this helped.
    Well i would do this but i am using Trinity and sadly they don't support LuA or even have an engine for it lol

  4. #4
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    150/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Create a new C++ script -> hook on player enter world -> if !player has spell (plate) { player->learnspell(plate); }

    You get the general idea... Better start learning C++, it's a simple script.

  5. #5
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Those scripts are not what he's asking for, although it's an alternative. Whether hooking up a script to it is smart (as opposed to editing the playercreateinfo tables) is debatable. Anyway, he wants to change the armor requirements, which need to be done through the DB. This is relatively easy given you have a basic understanding of SQL, which every WoW server developer should have in the very least.
    As not to discourage you, take a look at Item template tc2 - TrinityCore Wiki. On there you will find which columns you need to edit. I recommend you bookmark the site for future troubleshooting. Anyhow, if it's just a few items you need to edit I'd do it case by case; but you might want to change all of them at once. The query statement you need for this is UPDATE and a WHERE clause that selects only armor items. We wouldn't want to change every item to change to armor, right? I'll let you figure out the rest.
    One last note, delete your cache and restart WoW once you have applied these changes, otherwise you still won't be able to equip plate as a clothie and vice versa.
    Ignorance is bliss.

Similar Threads

  1. Replies: 11
    Last Post: 03-18-2009, 06:52 AM
  2. Replies: 2
    Last Post: 01-01-2009, 07:04 PM
  3. [Question] how to change the wow trial to connect to my server?
    By ridders in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-05-2007, 03:40 PM
  4. How to change the 'Loading Screens'?
    By Elesia in forum World of Warcraft General
    Replies: 6
    Last Post: 08-16-2007, 09:48 AM
  5. How to change the Barrens trees
    By Naralesca in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 07-31-2007, 11:22 PM
All times are GMT -5. The time now is 08:19 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search