im working on codeing reborn into it and it downgrades the items and all but when it gets to the skills it will not teach them could someone help me out and tell me where im going wrong
all code inside Spoiler
and i changed it so there first Profession reads as Profession not Profession1
any help would be great.
all code inside Spoiler
SetSkills.cs
Reborn.cs
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Albetros.Core;
using Albetros.Core.Enum;
using Albetros.Game.Objects;
namespace Albetros.Game
{
public partial class Handler
{
public static bool SetSkills(Player p)
{
bool KeepSkill = false;
if (KeepSkill)
{
#region Archer
if (p.Profession > 20 && p.Profession < 26)
{
#region Archer
if (p.Profession1 == 22)
{
p.AddSkill(5000, 0, 0);
}
#endregion
#region Fire
#endregion
#region Trojan
#endregion
#region Warrior
#endregion
#region Water
#endregion
#region Ninja
#endregion
#region Monk
#endregion
}
#endregion
#region Fire
if (p.Profession > 141 && p.Profession < 146)
{
#region Archer
if (p.Profession1 == 22)
{
p.AddSkill(1000, 0, 0);
p.AddSkill(1001, 0, 0);
p.AddSkill(1005, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Fire
if (p.Profession1 == 142)
{
p.AddSkill(3080, 0, 0);
}
#endregion
#region Trojan
if (p.Profession1 == 12)
{
p.AddSkill(1000, 0, 0);
p.AddSkill(1001, 0, 0);
p.AddSkill(1005, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Warrior
if (p.Profession1 == 42)
{
p.AddSkill(1000, 0, 0);
p.AddSkill(1001, 0, 0);
p.AddSkill(1005, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Water
if (p.Profession1 == 132)
{
p.AddSkill(1120, 0, 0);
}
#endregion
#region Ninja
if (p.Profession1 == 52)
{
p.AddSkill(1000, 0, 0);
p.AddSkill(1001, 0, 0);
p.AddSkill(1005, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Monk
if (p.Profession1 == 62)
{
p.AddSkill(1000, 0, 0);
p.AddSkill(1001, 0, 0);
p.AddSkill(1005, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
}
#endregion
#region Trojan
if (p.Profession > 11 && p.Profession < 16)
{
#region Archer
if (p.Profession1 == 22)
{
p.AddSkill(1110, 0, 0);
p.AddSkill(1190, 0, 0);
p.AddSkill(1270, 0, 0);
}
#endregion
#region Fire
if (p.Profession1 == 22)
{
p.AddSkill(1110, 0, 0);
p.AddSkill(1190, 0, 0);
p.AddSkill(1270, 0, 0);
}
#endregion
#region Trojan
if (p.Profession1 == 22)
{
p.AddSkill(3050, 0, 0);
}
#endregion
#region Warrior
if (p.Profession1 == 22)
{
p.AddSkill(1110, 0, 0);
p.AddSkill(1190, 0, 0);
p.AddSkill(1270, 0, 0);
p.AddSkill(5100, 0, 0);
}
#endregion
#region Water
if (p.Profession1 == 22)
{
p.AddSkill(1110, 0, 0);
p.AddSkill(1190, 0, 0);
p.AddSkill(1270, 0, 0);
}
#endregion
#region Ninja
if (p.Profession1 == 22)
{
p.AddSkill(1110, 0, 0);
p.AddSkill(1190, 0, 0);
p.AddSkill(1270, 0, 0);
}
#endregion
#region Monk
if (p.Profession1 == 22)
{
p.AddSkill(1110, 0, 0);
p.AddSkill(1190, 0, 0);
p.AddSkill(1270, 0, 0);
}
#endregion
}
#endregion
#region Warrior
if (p.Profession > 39 && p.Profession < 46)
{
#region Archer
if (p.Profession1 == 22)
{
p.AddSkill(1020, 0, 0);
p.AddSkill(1040, 0, 0);
}
#endregion
#region Fire
if (p.Profession1 == 142)
{
p.AddSkill(1020, 0, 0);
p.AddSkill(1040, 0, 0);
}
#endregion
#region Trojan
if (p.Profession1 == 12)
{
p.AddSkill(1015, 0, 0);
p.AddSkill(1040, 0, 0);
p.AddSkill(1320, 0, 0);
}
#endregion
#region Warrior
if (p.Profession1 == 22)
{
p.AddSkill(3060, 0, 0);
}
#endregion
#region Water
if (p.Profession1 == 22)
{
p.AddSkill(1025, 0, 0);
p.AddSkill(1020, 0, 0);
p.AddSkill(1040, 0, 0);
}
#endregion
#region Ninja
if (p.Profession1 == 22)
{
p.AddSkill(1015, 0, 0);
p.AddSkill(1040, 0, 0);
p.AddSkill(1320, 0, 0);
}
#endregion
#region Monk
if (p.Profession1 == 22)
{
p.AddSkill(1015, 0, 0);
p.AddSkill(1320, 0, 0);
}
#endregion
}
#endregion
#region Water
if (p.Profession > 131 && p.Profession < 136)
{
#region Archer
if (p.Profession1 == 22)
{
p.AddSkill(1005, 0, 0);
p.AddSkill(1075, 0, 0);
p.AddSkill(1090, 0, 0);
p.AddSkill(1095, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Fire
if (p.Profession1 == 132)
{
p.AddSkill(1100, 0, 0);
p.AddSkill(1175, 0, 0);
p.AddSkill(1075, 0, 0);
p.AddSkill(1055, 0, 0);
}
#endregion
#region Trojan
if (p.Profession1 == 12)
{
p.AddSkill(1005, 0, 0);
p.AddSkill(1085, 0, 0);
p.AddSkill(1090, 0, 0);
p.AddSkill(1095, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Warrior
if (p.Profession1 == 42)
{
p.AddSkill(1005, 0, 0);
p.AddSkill(1085, 0, 0);
p.AddSkill(1090, 0, 0);
p.AddSkill(1095, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Water
if (p.Profession1 == 132)
{
p.AddSkill(3090, 0, 0);
}
#endregion
#region Ninja
if (p.Profession1 == 52)
{
p.AddSkill(1085, 0, 0);
p.AddSkill(1090, 0, 0);
p.AddSkill(1095, 0, 0);
p.AddSkill(1195, 0, 0);
}
#endregion
#region Monk
if (p.Profession1 == 42)
{
p.AddSkill(1005, 0, 0);
p.AddSkill(1085, 0, 0);
p.AddSkill(1090, 0, 0);
p.AddSkill(1095, 0, 0);
p.AddSkill(1195, 0, 0);
p.AddSkill(1280, 0, 0);
p.AddSkill(1350, 0, 0);
}
#endregion
}
#endregion
#region Ninja
if (p.Profession > 51 && p.Profession < 56)
{
#region Archer
if (p.Profession1 == 22)
{
p.AddSkill(6001, 0, 0);//need to verify toxicfog
}
#endregion
#region Fire
if (p.Profession1 == 142)
{
p.AddSkill(6001, 0, 0);//need to verify toxicfog
}
#endregion
#region Trojan
if (p.Profession1 == 12)
{
p.AddSkill(6001, 0, 0);//need to verify toxicfog
}
#endregion
#region Warrior
if (p.Profession1 == 42)
{
p.AddSkill(6001, 0, 0);//need to verify toxicfog
}
#endregion
#region Water
if (p.Profession1 == 132)
{
p.AddSkill(6001, 0, 0);//need to verify toxicfog
}
#endregion
#region Ninja
#endregion
#region Monk
if (p.Profession1 == 142)
{
p.AddSkill(6001, 0, 0);//need to verify toxicfog
}
#endregion
}
#endregion
#region Monk
if (p.Profession > 61 && p.Profession < 66)
{
#region Archer
#endregion
#region Fire
#endregion
#region Trojan
#endregion
#region Warrior
if (p.Profession1 == 42)
{
p.AddSkill(6000, 0, 0);//need id for serentiry
}
#endregion
#region Water
#endregion
#region Ninja
#endregion
#region Monk
#endregion
}
#endregion
return true;
}
else
{
return false;
}
}
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Albetros.Game;
using Albetros.Game.Handlers;
using Albetros.Game.Objects;
namespace Albetros.Game.Handlers.Reborn
{
public class Reborn
{
public static void Rebirth(Player user)
{
Handler.LowerAllItems(user);
Handler.SetSkills(user);
user.RemoveItem(721259, 1);
user.AddSkill(4000, 0, 0);
user.Send(Packet.PlayerInfoPacket.Create(user));
}
}
}
and i changed it so there first Profession reads as Profession not Profession1
any help would be great.