Heyo.
So i've created new "thing" in player.cs
Code:
public bool ascended;
Then in player.useitem.cs i've added that thing:
Code:
case ActivateEffects.AscendHero:
{
int maxed = GetMaxed().Count;
switch (maxed)
{
case 8:
SendInfo("The God blessed you with ancient magic. You ascended!");
ascended = true;
break;
default:
SendInfo("The God thinks you're not ready for blessing.");
ascended = false;
break;
GetNameColor();
UpdateCount++;
}
SaveToCharacter();
}
break;
And in worldcommands.cs
Code:
internal class AscendCommand : Command
{
public AscendCommand() : base("asc", new Ranks[] { Ranks.User, Ranks.Spriter, Ranks.Developer, Ranks.DeveloperManager, Ranks.Moderator, Ranks.Admin, Ranks.HeadModerator, Ranks.HeadAdmin, Ranks.ServerHead }) { }
protected override bool Process(Player player, string args)
{
if (player.ascended == true)
{
player.SendInfo("God heard your pray and thinks you are Ascended.");
}
else
{
player.SendInfo("God heard your pray but unfortunately didn't choosen you as Ascended.");
}
return true;
throw new NotImplementedException();
}
}
And when i use item with AscendHero when im maxed, it says "The god blessed you..." and when i use 'asc' command it says "God heard your pray and thinks...", but when i enter any portal and i use 'asc" commands it says "God heard your pray but unfortunately...". So like item changes ascended bool only until i enter other portal.