- Code: Select all
if ((player.RaceName == "Norseman") && (player.PlayerCharacter.Gender == 0)) player.Out.SendMessage("Additionally, you can also choose to become a [Valkyrie].", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
- Code: Select all
case "Valkyrie":
if (((player.RaceName == "Norseman") || (player.RaceName == "Frostalf")) && (player.CharacterClass.ID == 35) && (player.PlayerCharacter.Gender == 0))
PromotePlayer(player, (int)eCharacterClass.Valkyrie, "Arise, " + player.Name + ", and know that you are no longer a simple " + player.CharacterClass.BaseName + ". You are now a Valkyrie");
[15:03:04,591] Script compilation failed because:
[15:03:04,591] The name 'PlayerCharacter' does not exist in the current context
[15:03:04,591] c:\DOLsource\release\scripts\customnpc\Auto.CS Line:536 Col:142
I'm still very new to scripting and I understand that apparently before I can use player.PlayerCharacter.Gender, the script needs to know where it can find that, and I am not sure what I am missing to tell it where to look for it. I thought the "using" statements on the top of the file were for that? Or do I need some sort of public bool int Player.Character.gender line or something to tell it what kind of info the variable stores?
I've looked in the valkyrie trainer script and it uses player.PlayerCharacter.Gender. So I am lost