Welcome to AC Web.
Results 1 to 2 of 2
  1. #1

    LUA script help needed - getting player hair colour.


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    So, I have a script on my server to change the display ID of troll druids in cat and bear form. It functions well for this purpose, though lacks one specific feature I desire.

    This script (originally created by Deathorous from Model-Changing.net for my needs) is currently what I am using. I need to modify it to check the player's hair colour to choose the correctly-coloured display ID.

    Code:
    local function Troll_OnSpellCast(event, player, spell, skipCheck)
    	local race = player:GetRace()
    	
    	if ( race == 8 ) then
    		player:RegisterEvent(trollDruidDisplayChange, 10, 1)
    	end
    end
    
    function trollDruidDisplayChange(event, delay, pCall, player)
    	local displayId = player:GetDisplayId()
    	
    	if ( displayId == 2289 ) then
    		player:SetDisplayId( 36002 )
    	elseif ( displayId == 8571 ) then
    		player:SetDisplayId( 36003 )
    	end
    end
    
    RegisterPlayerEvent(5, Troll_OnSpellCast)
    What can I use to check for the hairColor used for a character in the database? And how can I make it so that the function that changes the display ID checks for both the original display ID of the druid form (to check for cat or bear form), and the hair colour of the character?

  2. #2

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Just go in characters > characters > haircolor.
    Then just do so it check hair before and after u enter w/e form it switch back to old value

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •