|
|
المشاركات 1,940 |
+التقييم 0.95 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل windows 7 |
رقم العضوية 1 |
if (client.Entity.Class >= 80 && client.Entity.Class <= 85)
if (client.Entity.Class >= 160 && client.Entity.Class <= 165)
{
can2hand = true;
can2wpn = true;
}
if (client.Entity.Class >= 100
if (client.Entity.Class >= 100 && client.Entity.Class <= 145)
#region Windwalker
case 160: if (client.Entity.Class <= 165 && client.Entity.Class >= 160) return true; break;
case 161: if (client.Entity.Class <= 165 && client.Entity.Class >= 161) return true; break;
case 162: if (client.Entity.Class <= 165 && client.Entity.Class >= 162) return true; break;
case 163: if (client.Entity.Class <= 165 && client.Entity.Class >= 163) return true; break;
case 164: if (client.Entity.Class <= 165 && client.Entity.Class >= 164) return true; break;
case 165: if (client.Entity.Class == 165) return true; break;
#endregion
public static ushort ItemPosition(uint ID)
UInt32 iType = ID / 1000;
if (ID >= 170000 && ID <= 170309)
return ConquerItem.Head;
if (ID >= 101000 && ID <= 101309)
return ConquerItem.Armor;
if (ID >= 626003 && ID <= 626439)
return ConquerItem.RightWeapon;
if (ID >= 626003 && ID <= 626439)
return ConquerItem.LeftWeapon;
UInt32 iType = itemid / 1000;
if (iType == 170)
return Positions.Head;
if (iType == 101)
return Positions.Armor;
if (iType == 626)
return Positions.Right;
switch (eC.Class)
{
case 0:
case 1: eC.Class = 100; break;
case 2:
case 3: eC.Class = 10; break;
case 4:
case 5: eC.Class = 40; break;
case 6:
case 7: eC.Class = 20; break;
case 8:
case 9: eC.Class = 50; break;
case 10:
case 11: eC.Class = 60; break;
case 12:
case 13: eC.Class = 70; break;
case 14:
case 15: eC.Class = 80; break;
case 16:
case 17:
{
eC.Class = 160;
client.Entity.Windwalker = (byte)8;//Cshser
break;
}
case 18:
case 19:
{
eC.Class = 160;
client.Entity.Windwalker = (byte)0;//Stmper
break;
}
default: { Console.WriteLine("Error Class = " + eC.Class); } break;
}
public const ushort
TimeStamp = 4,
Mesh = 8,
UID = 12,
GuildID = 16,
GuildRank = 20,
Unknown = 24,
StatusFlag = 26,
StatusFlag2 = 34,
StatusFlag3 = 42,
StatusFlag4 = 50,
Appearance = 54,
Head = 56,
Garment = 60,
Armor = 64,
LeftWeapon = 68,
RightWeapon = 72,
LeftWeaponAccessory = 76,
RightWeaponAccessory = 80,
Steed = 84,
MountArmor = 88,
Wing = 92,
WingPlus = 96,
WingProgress = 97,
Hitpoints = 111,
MonsterLevel = 117,
X = 119,
Y = 121,
HairStyle = 123,
Facing = 125,
Action = 126,
Action2 = 128,
Reborn = 133,
Level = 134,
WindowSpawn = 136,
Away = 137,
ExtraBattlePower = 138,
Flower = 154,
NobilityRank = 158,
ArmorColor = 162,
LeftWeaponColor = 164,
HeadColor = 166,
QuizPoints = 168,
SteedPlus = 172,
SteedColor = 174,
Enlighten = 178,
TotalInnerScore = 182,
ClanUID = 194,
ClanRank = 198,
ClanSharedBp = 202,
TitleActivated = 206,
EntitySize = 208,
GuildSharedBp = 213,
ShowArenaGlow = 217,
Boss = 220,
HeadSoul = 221,
RaceItem = 222,
ArmorSoul = 225,
LeftWeaponSoul = 229,
RightWeaponSoul = 233,
SubPro = 237,
SubProActive = 238,
FirstRebornClass = 246,
SecondRebornClass = 248,
Class = 250,
CountryFlag = 252,
EquipmentColor = 258,
JiangHuTalen = 262,
JiangHuActive = 263,
ServerID = 265,
OwnerPet = 271,
OwnerPet1 = 272,
OwnerUID = 274,
UnionID = 278,
UnionExploits = 282,
Offical_Harem_Guards = 286,
UnionRank = 290,
UnionType = 291,
MyTitle = 292,
MyTitleScore = 296,
MyWing = 300,
Windwalker = 304,
Name = 312;
case "class":
{
byte _class = client.Entity.Class;
byte.TryParse(Data[1], out _class);
_class = Math.Min((byte)145, Math.Max((byte)1, _class));
client.Entity.Class = _class;
if (client.Entity.Reborn == 0)
{
Database.DataHolder.GetStats(_class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
}
break;
}
_class = Math.Min((byte)145, Math.Max((byte)1, _class));
case "class":
{
byte _class = client.Entity.Class;
byte.TryParse(Data[1], out _class);
_class = Math.Min((byte)165, Math.Max((byte)1, _class));
client.Entity.Class = _class;
if (client.Entity.Reborn == 0)
{
Database.DataHolder.GetStats(_class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
}
break;
}
client.Entity.Class = reader.ReadByte("Class");
if (reader.ReadByte("Class") >= 160 && reader.ReadByte("Class") <= 165)
client.Entity.Windwalker = reader.ReadByte("Windwalker");
.Set("Windwalker", e.Windwalker)
switch (eC.Class)
using (var cmd = new MySqlCommand(MySqlCommandType.INSERT))
.Execute();
.Insert("Windwalker", client.Entity.Windwalker)
public byte[] ToArray()
if (client.Entity.Class >= 160 && client.Entity.Class <= 165)
Writer.WriteUInt32(this.client.Entity.Windwalker, 89, level);
Windwalker bigint 20 0 -1 0 0 0 0 0 0 0 0
static SafeDictionary<byte, string> MonkStats = new SafeDictionary<byte, string>(130);
static SafeDictionary<byte, string> WindwalkerStats = new SafeDictionary<byte, string>(130);
public static bool IsMonk(byte Job) { return Job >= 60 && Job <= 65; }
public static bool IsWindwalker(byte Job) { return Job >= 160 && Job <= 165; }
job = "Monk[" + lvl + "]";
job = "Windwalker[" + lvl + "]";
Data = IniFile.ReadString("Stats", job);
WindwalkerStats.Add(lvl, Data);
public static void GetStats(
case 60: Class = "Monk"; break;
case 160: Class = "Windwalker"; break;
else if (Class == "Monk")
else if (Class == "Windwalker")
Data = WindwalkerStats[inLevel].Split(',');
Windwalker[1]=5,3,2,0
Windwalker[2]=3,6,4,0
Windwalker[3]=4,7,5,0
Windwalker[4]=4,9,6,0
Windwalker[5]=5,10,7,0
Windwalker[6]=6,10,9,0
Windwalker[7]=7,11,10,0
Windwalker[8]=7,13,11,0
Windwalker[9]=8,14,12,0
Windwalker[10]=9,15,13,0
Windwalker[11]=10,16,14,0
Windwalker[12]=10,17,15,0
Windwalker[13]=11,19,16,0
Windwalker[14]=12,20,17,0
Windwalker[15]=13,21,18,0
Windwalker[16]=13,23,19,0
Windwalker[17]=14,24,20,0
Windwalker[18]=15,25,21,0
Windwalker[19]=16,25,23,0
Windwalker[20]=17,26,24,0
Windwalker[21]=18,28,25,0
Windwalker[22]=18,29,26,0
Windwalker[23]=19,30,27,0
Windwalker[24]=19,32,28,0
Windwalker[25]=20,33,29,0
Windwalker[26]=21,34,30,0
Windwalker[27]=22,35,31,0
Windwalker[28]=22,37,32,0
Windwalker[29]=23,38,33,0
Windwalker[30]=24,39,34,0
Windwalker[31]=24,40,36,0
Windwalker[32]=25,41,37,0
Windwalker[33]=26,42,38,0
Windwalker[34]=27,43,39,0
Windwalker[35]=28,44,40,0
Windwalker[36]=28,46,41,0
Windwalker[37]=29,47,42,0
Windwalker[38]=30,48,43,0
Windwalker[39]=31,49,44,0
Windwalker[40]=32,50,45,0
Windwalker[41]=32,52,46,0
Windwalker[42]=33,53,47,0
Windwalker[43]=33,54,48,0
Windwalker[44]=34,55,50,0
Windwalker[45]=35,56,51,0
Windwalker[46]=36,57,52,0
Windwalker[47]=37,58,53,0
Windwalker[48]=37,60,54,0
Windwalker[49]=38,61,55,0
Windwalker[50]=39,62,56,0
Windwalker[51]=40,63,57,0
Windwalker[52]=40,65,58,0
Windwalker[53]=41,66,59,0
Windwalker[54]=42,67,60,0
Windwalker[55]=43,68,61,0
Windwalker[56]=43,69,63,0
Windwalker[57]=44,70,64,0
Windwalker[58]=45,71,65,0
Windwalker[59]=46,72,66,0
Windwalker[60]=46,74,67,0
Windwalker[61]=47,75,68,0
Windwalker[62]=48,76,69,0
Windwalker[63]=49,77,70,0
Windwalker[64]=49,79,71,0
Windwalker[65]=50,80,72,0
Windwalker[66]=51,81,73,0
Windwalker[67]=52,82,74,0
Windwalker[68]=52,84,75,0
Windwalker[69]=53,84,77,0
Windwalker[70]=54,85,78,0
Windwalker[71]=55,86,79,0
Windwalker[72]=55,88,80,0
Windwalker[73]=56,89,81,0
Windwalker[74]=57,90,82,0
Windwalker[75]=58,91,83,0
Windwalker[76]=58,93,84,0
Windwalker[77]=59,94,85,0
Windwalker[78]=60,95,86,0
Windwalker[79]=61,96,87,0
Windwalker[80]=61,98,88,0
Windwalker[81]=62,98,90,0
Windwalker[82]=63,99,91,0
Windwalker[83]=64,100,92,0
Windwalker[84]=64,102,93,0
Windwalker[85]=65,103,94,0
Windwalker[86]=66,104,95,0
Windwalker[87]=67,105,96,0
Windwalker[88]=67,107,97,0
Windwalker[89]=68,108,98,0
Windwalker[90]=69,109,99,0
Windwalker[91]=70,110,100,0
Windwalker[92]=70,112,101,0
Windwalker[93]=71,113,102,0
Windwalker[94]=72,113,104,0
Windwalker[95]=73,114,105,0
Windwalker[96]=73,116,106,0
Windwalker[97]=74,117,107,0
Windwalker[98]=75,118,108,0
Windwalker[99]=76,119,109,0
Windwalker[100]=76,121,110,0
Windwalker[101]=77,122,111,0
Windwalker[102]=78,123,112,0
Windwalker[103]=79,124,113,0
Windwalker[104]=79,126,114,0
Windwalker[105]=80,127,115,0
Windwalker[106]=81,127,117,0
Windwalker[107]=82,128,118,0
Windwalker[108]=82,130,119,0
Windwalker[109]=83,131,120,0
Windwalker[110]=84,132,121,0
Windwalker[111]=85,133,122,0
Windwalker[112]=85,135,123,0
Windwalker[113]=86,136,124,0
Windwalker[114]=87,137,125,0
Windwalker[115]=88,138,126,0
Windwalker[116]=88,140,127,0
Windwalker[117]=89,141,128,0
Windwalker[118]=90,142,129,0
Windwalker[119]=91,142,131,0
Windwalker[120]=91,144,132,0
public class Flags4
{//By Mina
public const ulong
Omnipotence = 1UL << 192,
JusticeChant = 1UL << 194,
BlockFrostGaze = 1UL << 195,
HealingSnow = 1UL << 196,
ChillingSnow = 1UL << 197,
xChillingSnow = 1UL << 198,
FreezingPelter = 1UL << 200,
xFreezingPelter = 1UL << 201,
RevengeTaill = 1UL << 202,
WindwalkerTop = 1UL << 203,
ShadowofChaser = 1UL << 204;
}
public void AppendFull(byte type, ulong val1, ulong val2, ulong val3, ulong val4)
{
UpdateCount = UpdateCount + 1;
ushort offset = (ushort)(16 + ((UpdateCount - 1) * 28));
WriteUInt32(type, offset, Buffer);
WriteUInt64(val1, offset + 4, Buffer);
WriteUInt64(val2, offset + 12, Buffer);
WriteUInt64(val3, offset + 20, Buffer);
WriteUInt64(val4, offset + 28, Buffer);
}
public void Append(ulong val1, ulong val2, ulong val3, uint val4, uint val5, uint val6, uint val7)
{
WriteUInt32(val4, 24, Buffer);
WriteUInt32(val6, 32, Buffer);
}
private ulong _Stateff4 = 0;
public ulong StatusFlag4
{
get { return _Stateff4; }
set
{
ulong OldV = StatusFlag4;
if (value != OldV)
{
_Stateff4 = value;
WriteUInt64(value, Offset.StatusFlag4, SpawnPacket);
UpdateEffects(true);
}
}
}
public void AddFlag4(ulong flag)
{
StatusFlag4 |= flag;
}
public void RemoveFlag4(ulong flag)
{
if (ContainsFlag4(flag))
{
StatusFlag4 &= ~flag;
}
}
public bool ContainsFlag4(ulong flag)
{
ulong aux = StatusFlag4;
aux &= ~flag;
return !(aux == StatusFlag4);
}
public void UpdateEffects(bool screen)
update.AppendFull(0x19, StatusFlag, StatusFlag2, StatusFlag3, StatusFlag4);
#region WindWalker
#region Chaser
#region ThunderCloud(Passive)
case 12840:
{
if (Time64.Now >= attacker.TCSpellUse.AddSeconds(59))
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.X = X;
suse.Y = Y;
suse.SpellID = spell.ID;
attacker.Owner.SendScreen(suse, true);
//////////////////////////////////////////////////
///////////////////////////////////////////////////
uint UID = Kernel.Maps[attacker.MapID].EntityUIDCounter.Next;
uint Mesh = 980;
//////////////////////////////////////////////////////
byte[] Buffer = new byte[68 + 8];
Writer.Write(Buffer.Length - 8, 0, Buffer);
Writer.Write(2035, 2, Buffer);//Packet ID
Writer.Write(UID, 4, Buffer);//FlowerUID
Writer.Write(4264, 8, Buffer);
Buffer[12] = 3;
Writer.Write(Mesh, 16, Buffer);//FloorItemID
Buffer[24] = 14;//AttackRange
Writer.Write(X, 26, Buffer);
Writer.Write(Y, 28, Buffer);
Writer.Write("Thundercloud", 30, Buffer);
//////////////////////////////////////////////////
///////////////////////////////////////////////////
//////////////////////////////////////////////////////
Entity ThunderCloud = new Entity(Game.EntityFlag.Monster, true);
ThunderCloud.Name = "Thundercloud";
ThunderCloud.Mesh = Mesh;
ThunderCloud.UID = UID;
ThunderCloud.GuildID = attacker.GuildID;
ThunderCloud.MaxHitpoints = attacker.MaxHitpoints;
ThunderCloud.Level = 140;
ThunderCloud.X = X;
ThunderCloud.Y = Y;
ThunderCloud.Facing = attacker.Facing;
ThunderCloud.Boss = 1;
ThunderCloud.MapID = attacker.MapID;
Writer.Write(3, 308, ThunderCloud.SpawnPacket);
Writer.Write(15, 272, ThunderCloud.SpawnPacket);
Writer.Write(3, 271, ThunderCloud.SpawnPacket);//AttackUser
//Writer.Write(attacker.Owner.UnionID, 278, ThunderCloud.SpawnPacket);//UnionID
ThunderCloud.CUID = attacker.UID;
ThunderCloud.Owner = new Client.GameClient(null);
ThunderCloud.Owner.Entity = ThunderCloud;
ThunderCloud.MonsterInfo = new MonsterInformation();
ThunderCloud.MonsterInfo.AttackType = 24;
ThunderCloud.MonsterInfo.AttackSpeed = 1000;
ThunderCloud.MonsterInfo.AttackRange = 14;
ThunderCloud.MonsterInfo.Boss = true;
ThunderCloud.MonsterInfo.BoundX = X;
ThunderCloud.Companion = true;
ThunderCloud.MonsterInfo.Guard = false;
ThunderCloud.MonsterInfo.BoundY = Y;
ThunderCloud.MonsterInfo.Defence = attacker.Defence;
ThunderCloud.MonsterInfo.Hitpoints = 10000;
ThunderCloud.MonsterInfo.Mesh = 980;
ThunderCloud.MonsterInfo.MoveSpeed = int.MaxValue;
ThunderCloud.MonsterInfo.Name = "Thundercloud";
ThunderCloud.MonsterInfo.Owner = attacker;
ThunderCloud.MonsterInfo.ViewRange = 14;
ThunderCloud.MonsterInfo.RespawnTime = 0;
ThunderCloud.MonsterInfo.RunSpeed = int.MaxValue;
ThunderCloud.MonsterInfo.SpellID = 13190;
ThunderCloud.Hitpoints = 10000;
Kernel.Maps[ThunderCloud.MapID].AddEntity(ThunderCloud);
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
/////////////////////////////////////////////
Network.GamePackets.Data d = new Data(true);
d.UID = UID;
d.ID = Data.AddEntity;
d.Facing = attacker.Facing;
d.X2 = ThunderCloud.X;
d.Y2 = ThunderCloud.Y;
///////////////////////////////////////////////
////////////////////////////////////////////
/////////////////////////////////////////
attacker.Owner.SendScreen(Buffer, true);
attacker.Owner.SendScreen(ThunderCloud.SpawnPacket, true);
attacker.Owner.SendScreenSpawn(ThunderCloud, true);
attacker.Owner.SendScreen(d, true);
ThunderCloud.ThunderCloudStamp = Time64.Now;
Program.World.Register(ThunderCloud);
attacker.AttackPacket = null;
}
}
break;
}
#endregion
#region ShadowofChaser(Active)
case 13090:
{
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser))
{
attacker.RemoveFlag4(Update.Flags4.ShadowofChaser);
attacker.AttackPacket = null;
break;
}
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.AddTarget(attacker.UID, 0, attack);
attack = new Attack(true);
attack.Attacker = attack.Attacked = attacker.UID;
attack.X = attacker.X; attack.Y = attacker.Y;
attack.AttackType = 24;
attack.SpellID = spell.ID;
attacker.Owner.SendScreen(suse, true);
attacker.AddFlag4(Update.Flags4.ShadowofChaser);
attacker.AttackPacket = null;
}
break;
}
#endregion
#region TripleBlasts(Passive)
case 12850:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attackedsob == null ? attacked.UID : attackedsob.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
if (attackedsob == null)
{
if (CanAttack(attacker, attacked, spell, false))
{
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser) && attacker.IsChaser2())
{
var spell2 = Database.SpellTable.GetSpell(13090, attacker.Owner);
if (spell2 != null)
{
spell2.CanKill = true;
if (Kernel.Rate(spell2.Percent))
{
ShadowofChaser(attacker, attacked, attack, 1);
break;
}
}
}
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack);
damage = (uint)(damage * 0.2);
ReceiveAttack(attacker, attacked, attack,damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
attacker.Owner.SendScreen(suse, true);
}
}
else
{
if (CanAttack(attacker, attackedsob, spell))
{
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
attacker.Owner.SendScreen(suse, true);
}
}
}
break;
}
#endregion
#region swirlingStor
case 12890:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
spell.UseStamina = 40;
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
Sector sector = new Sector(attacker.X, attacker.Y, X, Y);
sector.Arrange(spell.Sector, spell.Distance);
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
attacked = _obj as Entity;
if (sector.Inside(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
attack.Effect = Attack.AttackEffects.None;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack);
damage = (uint)(damage - spell.Power / 10);
suse.Effect = attack.Effect;
ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (sector.Inside(attackedsob.X, attackedsob.Y))
{
if (CanAttack(attacker, attackedsob, spell))
attack.Effect = Attack.AttackEffects.None;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
damage = (uint)(damage - spell.Power / 10);
suse.Effect = attack.Effect;
suse.AddTarget(attackedsob.UID, damage, attack);
attacker.Owner.SendScreen(suse, true);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
#region ThunderBolt(Active)
case 12970:
{
if (!attacker.Owner.Spells.ContainsKey(12840)) break;
foreach (var th in Kernel.Maps[attacker.MapID].Entities.Values.Where(i => i.Name == "Thundercloud"))
{
if (th.CUID == attacker.UID)
{
if (Kernel.GetDistance(attacker.X, attacker.Y, th.X, th.Y) <= th.MonsterInfo.AttackRange)
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.X = X;
suse.Y = Y;
suse.SpellID = spell.ID;
suse.AddTarget(th.UID, 0, null);
Writer.Write(128, 50, th.SpawnPacket);//Flag4(128)
attacker.Owner.SendScreen(suse, true);
attacker.AttackPacket = null;
foreach (var client in Kernel.GamePool.Values.Where(i => Kernel.GetDistance(th.X, th.Y, i.Entity.X, i.Entity.Y) < 17))
{
client.Send(th.SpawnPacket);
}
}
}
}
}
break;
}
#endregion
#region Omnipotence(XP)
case 12860:
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
if (attacker.ContainsFlag(Update.Flags.XPList))
{
attacker.AddFlag4(Update.Flags4.Omnipotence);
attacker.OmnipotenceStamp = Time64.Now;
attacker.RemoveFlag(Update.Flags.XPList);
attacker.Owner.SendScreen(suse, true);
}
else
{
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Player)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell) / 10;
ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range)
{
if (CanAttack(attacker, attackedsob, spell))
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) * 350 / 100;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) * 350 / 100;
ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
}
}
}
}
attacker.Owner.SendScreen(suse, true);
attacker.AttackPacket = null;
break;
}
#endregion
#region FrostGaze(I-II-III)
case 12830:
case 13070:
case 13080:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
attacker.Owner.SendScreen(suse, true);
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
if (_obj.MapObjType == MapObjectType.Player)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
int Rate = 100;
int diff = attacked.BattlePower - attacker.BattlePower;
if (diff < 0) diff = 0;
Rate -= (byte)(diff * 5);
if (Rate < 0) Rate = 0;
if (Kernel.Rate(Rate))
{
if (attacked.Stamina >= (byte)spell.Power)
attacked.Stamina -= (byte)spell.Power;
else attacked.Stamina = 0;
}
}
}
}
}
}
break;
}
#endregion
#endregion
#region Stomper
#region ChillingSnow(Active)
case 12960:
{
if (attacker.ContainsFlag4(Update.Flags4.ChillingSnow))
{
attacker.RemoveFlag4(Update.Flags4.ChillingSnow);
attacker.AttackPacket = null;
break;
}
if (CanUseSpell(spell, attacker.Owner))
{
attacker.RemoveFlag4(Update.Flags4.HealingSnow);
attacker.RemoveFlag4(Update.Flags4.FreezingPelter);
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
suse.AddTarget(attacker.UID, 0, attack);
attacker.Owner.SendScreen(suse, true);
attacker.AddFlag4(Update.Flags4.ChillingSnow);
attacker.AttackPacket = null;
}
break;
}
#endregion
#region HealingSnow(Active)
case 12950:
{
if (attacker.ContainsFlag4(Update.Flags4.HealingSnow))
{
attacker.RemoveFlag4(Update.Flags4.HealingSnow);
attacker.AttackPacket = null;
break;
}
if (CanUseSpell(spell, attacker.Owner))
{
attacker.RemoveFlag4(Update.Flags4.ChillingSnow);
attacker.RemoveFlag4(Update.Flags4.FreezingPelter);
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
suse.AddTarget(attacker.UID, 0, attack);
attacker.Owner.SendScreen(suse, true);
attacker.AddFlag4(Update.Flags4.HealingSnow);
attacker.AttackPacket = null;
}
break;
}
#endregion
#region FreezingPelter(Active)
case 13020:
{
if (attacker.ContainsFlag4(Update.Flags4.FreezingPelter))
{
attacker.RemoveFlag4(Update.Flags4.FreezingPelter);
attacker.Owner.LoadItemStats();
attacker.AttackPacket = null;
break;
}
if (CanUseSpell(spell, attacker.Owner))
{
attacker.RemoveFlag4(Update.Flags4.ChillingSnow);
attacker.RemoveFlag4(Update.Flags4.HealingSnow);
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
suse.AddTarget(attacker.UID, 0, attack);
attacker.Owner.SendScreen(suse, true);
attacker.AddFlag4(Update.Flags4.FreezingPelter);
attacker.Owner.LoadItemStats();
attacker.AttackPacket = null;
}
break;
}
#endregion
#region RevengeTail(Active)
case 13030:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
suse.AddTarget(attacker.UID, 0, attack);
attacker.Owner.SendScreen(suse, true);
attacker.AddFlag4(Update.Flags4.RevengeTaill);
attacker.RevengeTaillStamp = Time64.Now;
attacker.AttackPacket = null;
}
break;
}
#endregion
#region BurntFrost(Passive)
case 12940:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector);
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance + 1)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj == null)
continue;
attacked = _obj as Entity;
if (attacked == null) continue;
if (sector.IsInFan(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
uint damage = Calculate.Melee(attacker, attacked, ref attack, spell);
damage = (uint)(damage * 0.6);
ReceiveAttack(attacker, attacked, attack,damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
if (_obj == null)
continue;
attackedsob = _obj as SobNpcSpawn;
if (attackedsob == null) continue;
if (sector.IsInFan(attackedsob.X, attackedsob.Y))
{
if (CanAttack(attacker, attackedsob, spell))
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
}
}
}
}
}
attacker.Owner.SendScreen(suse, true);
attacker.AttackPacket = null;
}
break;
}
#endregion
#region RageofWar(Passive)
case 12930:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Game.Attacking.InLineAlgorithm ila = new Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
attacker.Owner.SendScreen(suse, true);
bool first = false;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
if (_obj.MapObjType == MapObjectType.Player)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attacked.X;
flooritem.MapID = map.ID;
flooritem.Y = attacked.Y;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time64.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = Calculate.Melee(attacker, attacked, ref attack, spell);
damage = (uint)(damage * 0.6);
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack,damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attacked.X;
flooritem.MapID = map.ID;
flooritem.Y = attacked.Y;
flooritem.Type = FloorItem.Effect;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time64.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = (uint)(Game.Attacking.Calculate.Melee(attacker, attacked, ref attack) * (spell.Power - 30000) / 100);
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack,damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (attackedsob == null) continue;
if (ila.InLine(attackedsob.X, attackedsob.Y))
{
if (!CanAttack(attacker, attackedsob, spell))
continue;
if (Kernel.GetDistance(attackedsob.X, attackedsob.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attackedsob.X;
flooritem.MapID = map.ID;
flooritem.Y = attackedsob.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time64.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = (uint)(Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) * (spell.Power - 30000) / 100);
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
}
}
}
attacker.Owner.SendScreen(suse, true);
attacker.AttackPacket = null;
}
break;
}
#endregion
#endregion
#endregion
public static bool Allyss(Entity attacker, Entity attacked)
public static void ShadowofChaser(Entity attacker, Entity attacked, Attack attack, byte oneortwo)
{
#region ShadowofChaser(Active)
IMapObject lastAttacked = attacked;
if (oneortwo == 1)
{
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser) && attacker.IsChaser2())
{
#region FloorItem
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.ShadowofChaser;
flooritem.X = lastAttacked.X;
flooritem.MapID = attacker.MapID;
flooritem.Y = lastAttacked.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 14;
flooritem.FlowerType = 3;
flooritem.Unknown37 = 1;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.Attack = attack;
flooritem.OwnerUID = attacker.UID;
flooritem.Owner = attacker.Owner;
flooritem.OwnerGuildUID = attacker.GuildID;
flooritem.OnFloor = Time64.Now;
flooritem.Name2 = "ShadowofChaser";
flooritem.ShadowofChaserAttacked = attacked;
flooritem.ShadowofChaserAttacker = attacker;
attacker.Owner.Map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
#endregion
return;
}
}
else if (oneortwo == 2)
{
var spell = Database.SpellTable.GetSpell(13090, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
if (CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
Handle.ReceiveAttack(attacker, attacked, attack,damage, spell);
suse.AddTarget(attacked.UID, damage, null);
}
attacker.Owner.SendScreen(suse, true);
SpellUse suse2 = new SpellUse(true);
suse2.Attacker = attacker.UID;
suse2.SpellID = spell.ID;
suse2.SpellLevel = spell.Level;
suse2.X = attacked.X;
suse2.Y = attacked.Y;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj == null) continue;
var attacked1 = _obj as Entity;
if (lastAttacked.UID == attacked1.UID) continue;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 4)
{
if (CanAttack(attacker, attacked1, spell, false))
{
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
ReceiveAttack(attacker, attacked1, attack, damage, spell);
suse2.AddTarget(attacked1.UID, damage, null);
}
}
}
}
attacker.Owner.SendScreen(suse2, true);
}
#endregion
attacker.AttackPacket = null;
}
#region ShadowofChaser
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser))
{
var spell = Database.SpellTable.GetSpell(13090, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
/*****************/
attacker.Owner.SendScreen(suse, true);
ushort _X = attacker.X, _Y = attacker.Y;
ushort _tX = X, _tY = Y;
// byte dist = 18;
var Array = attacker.Owner.Screen.Objects;
var map = attacker.Owner.Map;
// if (!map.Floor[X, Y, MapObjectType.Item, null])
// return;
Game.Attacking.InLineAlgorithm algo = new Game.Attacking.InLineAlgorithm(attacked.X,
X, attacked.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
// InLineAlgorithm algo = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, dist,
// InLineAlgorithm.Algorithm.DDA);
var count = (double)algo.lcoords.Count / 1;
for (int i = 0; i < 1; i++)
{
var selected = i * (int)count;
selected = Math.Min(algo.lcoords.Count - 1, selected);
X = (ushort)algo.lcoords[selected].X;
Y = (ushort)algo.lcoords[selected].Y;
FloorItem floorItem = new FloorItem(true);
floorItem.ItemID = 1550;
floorItem.ItemColor = (Enums.Color)(i + 1);
floorItem.MapID = attacker.MapID;
floorItem.Type = FloorItem.Effect;
floorItem.X = X;
floorItem.Y = Y;
floorItem.OnFloor = Time64.Now;
floorItem.Owner = attacker.Owner;
while (map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
map.AddFloorItem(floorItem);
attacker.Owner.SendScreenSpawn(floorItem, true);
}
/****************/
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj.UID == attacked.UID) continue;
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked1, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attacked1, attack, damage, spell);
suse.AddTarget(attacked1.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
#region RageofWar
if (attacker.ContainsFlag4(Update.Flags4.RageofWar))
{
var spell = Database.SpellTable.GetSpell(12930, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
/*****************/
attacker.Owner.SendScreen(suse, true);
ushort _X = attacker.X, _Y = attacker.Y;
ushort _tX = X, _tY = Y;
// byte dist = 18;
var Array = attacker.Owner.Screen.Objects;
var map = attacker.Owner.Map;
// if (!map.Floor[X, Y, MapObjectType.Item, null])
// return;
Game.Attacking.InLineAlgorithm algo = new Game.Attacking.InLineAlgorithm(attacked.X,
X, attacked.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
// InLineAlgorithm algo = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, dist,
// InLineAlgorithm.Algorithm.DDA);
var count = (double)algo.lcoords.Count / 1;
for (int i = 0; i < 1; i++)
{
var selected = i * (int)count;
selected = Math.Min(algo.lcoords.Count - 1, selected);
X = (ushort)algo.lcoords[selected].X;
Y = (ushort)algo.lcoords[selected].Y;
FloorItem floorItem = new FloorItem(true);
floorItem.ItemID = 1500;
floorItem.ItemColor = (Enums.Color)(i + 1);
floorItem.MapID = attacker.MapID;
floorItem.Type = FloorItem.Effect;
floorItem.X = X;
floorItem.Y = Y;
floorItem.OnFloor = Time64.Now;
floorItem.Owner = attacker.Owner;
while (map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
map.AddFloorItem(floorItem);
attacker.Owner.SendScreenSpawn(floorItem, true);
}
/****************/
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj.UID == attacked.UID) continue;
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked1, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attacked1, attack, damage, spell);
suse.AddTarget(attacked1.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
#region HorrorOfStomper
if (attacker.ContainsFlag4(Update.Flags4.HorrorOfStomper))
{
var spell = Database.SpellTable.GetSpell(12990, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
/*****************/
attacker.Owner.SendScreen(suse, true);
ushort _X = attacker.X, _Y = attacker.Y;
ushort _tX = X, _tY = Y;
// byte dist = 18;
var Array = attacker.Owner.Screen.Objects;
var map = attacker.Owner.Map;
// if (!map.Floor[X, Y, MapObjectType.Item, null])
// return;
Game.Attacking.InLineAlgorithm algo = new Game.Attacking.InLineAlgorithm(attacked.X,
X, attacked.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
// InLineAlgorithm algo = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, dist,
// InLineAlgorithm.Algorithm.DDA);
var count = (double)algo.lcoords.Count / 1;
for (int i = 0; i < 1; i++)
{
var selected = i * (int)count;
selected = Math.Min(algo.lcoords.Count - 1, selected);
X = (ushort)algo.lcoords[selected].X;
Y = (ushort)algo.lcoords[selected].Y;
FloorItem floorItem = new FloorItem(true);
floorItem.ItemID = 1530;
floorItem.ItemColor = (Enums.Color)(i + 1);
floorItem.MapID = attacker.MapID;
floorItem.Type = FloorItem.Effect;
floorItem.X = X;
floorItem.Y = Y;
floorItem.OnFloor = Time64.Now;
floorItem.Owner = attacker.Owner;
while (map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
map.AddFloorItem(floorItem);
attacker.Owner.SendScreenSpawn(floorItem, true);
}
/****************/
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj.UID == attacked.UID) continue;
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked1, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attacked1, attack, damage, spell);
suse.AddTarget(attacked1.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
#region PeaceofStomper
if (attacker.ContainsFlag4(Update.Flags4.PeaceofStomper))
{
var spell = Database.SpellTable.GetSpell(13000, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
/*****************/
attacker.Owner.SendScreen(suse, true);
ushort _X = attacker.X, _Y = attacker.Y;
ushort _tX = X, _tY = Y;
// byte dist = 18;
var Array = attacker.Owner.Screen.Objects;
var map = attacker.Owner.Map;
// if (!map.Floor[X, Y, MapObjectType.Item, null])
// return;
Game.Attacking.InLineAlgorithm algo = new Game.Attacking.InLineAlgorithm(attacked.X,
X, attacked.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
// InLineAlgorithm algo = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, dist,
// InLineAlgorithm.Algorithm.DDA);
var count = (double)algo.lcoords.Count / 1;
for (int i = 0; i < 1; i++)
{
var selected = i * (int)count;
selected = Math.Min(algo.lcoords.Count - 1, selected);
X = (ushort)algo.lcoords[selected].X;
Y = (ushort)algo.lcoords[selected].Y;
FloorItem floorItem = new FloorItem(true);
floorItem.ItemID = 1540;
floorItem.ItemColor = (Enums.Color)(i + 1);
floorItem.MapID = attacker.MapID;
floorItem.Type = FloorItem.Effect;
floorItem.X = X;
floorItem.Y = Y;
floorItem.OnFloor = Time64.Now;
floorItem.Owner = attacker.Owner;
while (map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
map.AddFloorItem(floorItem);
attacker.Owner.SendScreenSpawn(floorItem, true);
}
/****************/
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj.UID == attacked.UID) continue;
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked1, spell, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attacked1, attack, damage, spell);
suse.AddTarget(attacked1.UID, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
suse.Effect = attack.Effect;
damage = damage + damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
#region TripleBeast
if (attacker.ContainsFlag3(Update.Flags4.TripleBeast))
{
var spell = Database.SpellTable.GetSpell(12850, attacker.Owner);
if (spell != null && Kernel.Rate(30))
{
spell.CanKill = true;
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
damage = damage * 160 / 100;
p++;
suse.Effect = attack.Effect;
attack.Damage = 0;
Handle.ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
suse.Effect = attack.Effect = Attack.AttackEffects.None;
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (p > 5) break;
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
if (_obj.UID == attacked.UID) continue;
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5 && attacked.UID != attacked1.UID)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked1, ref attack, spell);
if (p == 1)
{
damage = damage * 80 / 100;
}
if (p == 2)
{
damage = damage * 60 / 100;
}
if (p == 3)
{
damage = damage * 40 / 100;
}
else if (p > 3)
{
damage = damage * 20 / 100;
}
suse.Effect = attack.Effect;
Handle.ReceiveAttack(attacker, attacked1, attack, damage, spell);
suse.AddTarget(attacked1.UID, damage, attack);
suse.Effect = attack.Effect = Attack.AttackEffects.None;
p++;
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
suse.Effect = attack.Effect;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
suse.Effect = attack.Effect = Attack.AttackEffects.None;
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
public static void ReceiveAttack(Game.Entity attacker, Game.Entity attacked, Attack attack, uint damage, Database.SpellInformation spell)
#region ThunderCloud
if (attacked.Name == "Thundercloud")
{
if (spell != null && spell.ID != 0)
{
if (Kernel.Rate(75)) damage = 1;
else damage = 0;
}
else if (spell == null || spell.ID == 0)
{
damage = 1;
}
}
foreach (var th in Kernel.Maps[attacker.MapID].Entities.Values.Where(i => i.Name == "Thundercloud"))
{
if (th.CUID == attacked.UID)
{
if (attacker == null || Kernel.GetDistance(attacker.X, attacker.Y, th.X, th.Y) > th.MonsterInfo.AttackRange || attacker.Dead) break;
th.MonsterInfo.InSight = attacker.UID;
break;
}
}
#endregion
#region RevengeTaill
if (attacked.ContainsFlag4(Network.GamePackets.Update.Flags4.RevengeTaill))
{
if (attacked.Owner != null && attacked.Owner.Spells != null && attacked.Owner.Spells.ContainsKey(13030))
{
var spelll = Database.SpellTable.GetSpell(13030, attacked.Owner);
if (damage <= spelll.Power)
{
SpellUse suses = new SpellUse(true);
suses.Attacker = attacked.UID;
suses.Attacker1 = attacker.UID;
suses.SpellID = 13030;
suses.SpecialEffect = 1;
suses.AddTarget(attacker.UID, damage, null);
if (attacker.Hitpoints <= damage)
{
attacker.Die(attacked);
}
else
{
attacker.Hitpoints -= damage;
}
attacked.Owner.SendScreen(suses, true);
}
}
}
#endregion
#region ChillingSnow
if (attacked.ContainsFlag4(Update.Flags4.ChillingSnow) && attacked.IsStomper2() && attacker.EntityFlag == EntityFlag.Player)
{
var spell1 = Database.SpellTable.GetSpell(12960, attacked.Owner);
int rate = 95;
int diff = attacker.BattlePower - attacked.BattlePower;
if (diff < 0) diff = 0;
rate -= (byte)(diff * 5);
if (rate < 0) rate = 0;
if (Kernel.Rate(rate))
{
attacker.AddFlag4(Update.Flags4.xChillingSnow);
attacker.ChillingSnowStamp = Time64.Now;
attacker.ChillingSnow = (byte)(spell1.Level + 1);
}
}
#endregion
#region FreezingPelter
if (attacked.ContainsFlag4(Update.Flags4.FreezingPelter) && attacked.IsStomper2() && attacker.EntityFlag == EntityFlag.Player)
{
var spell1 = Database.SpellTable.GetSpell(13020, attacked.Owner);
int rate = 30;
int diff = attacker.BattlePower - attacked.BattlePower;
if (diff < 0) diff = 0;
rate -= (byte)(diff * 5);
if (rate < 0) rate = 0;
if (Kernel.Rate(rate))
{
attacker.AddFlag4(Update.Flags4.xFreezingPelter);
attacker.FreezingPelterStamp = Time64.Now;
byte num = 0;
if (spell1.Level == 0) num = 1;
if (spell1.Level == 1) num = 1;
if (spell1.Level == 2) num = 2;
if (spell1.Level == 3) num = 2;
if (spell1.Level == 4) num = 3;
if (spell1.Level == 5) num = 3;
if (spell1.Level == 5) num = 4;
attacker.FreezingPelter = num;
}
}
#endregion
attacker.AttackStamp = Time64.Now;
#region ThunderCloud
foreach (var th in Kernel.Maps[attacker.MapID].Entities.Values.Where(i => i.Name == "Thundercloud"))
{
if (th.CUID == attacker.UID)
{
if (attacked == null || Kernel.GetDistance(attacked.X, attacked.Y, th.X, th.Y) > th.MonsterInfo.AttackRange || attacked.Dead) break;
th.MonsterInfo.InSight = attacked.UID;
break;
}
}
#endregion
public static bool CanAttack(Game.Entity attacker, Game.Entity attacked, Database.SpellInformation spell, bool melee)
#region ThunderCloud
if (attacked.Name == "Thundercloud")
{
if (attacked.CUID == attacker.UID) return false;
if (!Constants.PKForbiddenMaps.Contains(attacker.MapID))
{
if (attacker.PKMode != Game.Enums.PKMode.PK &&
attacker.PKMode != Game.Enums.PKMode.Team)
return false;
else
{
attacker.AddFlag(Network.GamePackets.Update.Flags.FlashingName);
attacker.FlashingNameStamp = Time64.Now;
attacker.FlashingNameTime = 20;
return true;
}
}
else return false;
}
#endregion
#region Monster -> Player \ Monster
if (attacked.EntityFlag == EntityFlag.Player)
{
if (attacker.Companion && attacker.Name != "Thundercloud")
{
if (Constants.PKForbiddenMaps.Contains(attacker.MapID))
return;
}
#region ThunderCloud
if (attacker.Name == "Thundercloud")
{
if (Kernel.GamePool.ContainsKey(attacker.CUID))
{
var owner = Kernel.GamePool[attacker.CUID];
var spell = Database.SpellTable.GetSpell(12840, owner);
var spell2 = Database.SpellTable.GetSpell(12970, owner);
byte percent = 0;
if (spell2 != null)
{
if (spell2.Level == 0) percent = 130;
if (spell2.Level == 1) percent = 140;
if (spell2.Level == 2) percent = 150;
if (spell2.Level == 3) percent = 160;
if (spell2.Level == 4) percent = 170;
if (spell2.Level == 5) percent = 180;
if (spell2.Level == 6) percent = 200;
}
attack = new Attack(true);
attack.Attacker = attacker.UID;
attack.Attacked = attacked.UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = attacked.X;
attack.Y = attacked.Y;
attack.Damage = 1;
uint damage2 = (uint)(Calculate.Melee(owner.Entity, attacked, ref attack) * spell.FirstDamage / 100);
if (attacker.SpawnPacket[50] == 128)//ThunderBolt
damage2 = (uint)(damage2 * percent / 100);
SpellUse suse2 = new SpellUse(true);
suse2.Attacker = attacker.UID;
suse2.Attacker1 = attacked.UID;
suse2.SpellID = 13190;
suse2.X = attacked.X;
suse2.Y = attacked.Y;
suse2.AddTarget(attacked.UID, damage2, attack);
attacker.MonsterInfo.SendScreen(suse2);
if (attacked.Hitpoints <= damage2)
{
attacked.Die(attacker);
attack.ResponseDamage = damage2;
attacker.MonsterInfo.SendScreen(attack);
}
else
{
attacked.Hitpoints -= damage2;
}
return;
}
else
return;
}
#endregion
#region ThunderCloudSight
foreach (var th in Kernel.Maps[attacker.MapID].Entities.Values.Where(i => i.Name == "Thundercloud"))
{
if (th.CUID == attacked.UID)
{
if (attacker == null || Kernel.GetDistance(attacker.X, attacker.Y, th.X, th.Y) > th.MonsterInfo.AttackRange || attacker.Dead) break;
th.MonsterInfo.InSight = attacker.UID;
break;
}
}
#endregion
attack.Effect = Attack.AttackEffects.None;
#region ThunderCloud
if (attacker.Name == "Thundercloud")
{
if (Kernel.GamePool.ContainsKey(attacker.CUID))
{
var owner = Kernel.GamePool[attacker.CUID];
var spell = Database.SpellTable.GetSpell(12840, owner);
var spell2 = Database.SpellTable.GetSpell(12970, owner);
uint damage2 = (uint)(Calculate.Melee(owner.Entity, attacked, ref attack) * (spell.Level < 8 ? spell.FirstDamage : 50) / 100);
if (attacker.SpawnPacket[50] == 128)
damage2 = (uint)(damage2 * spell2.FirstDamage);
SpellUse suse2 = new SpellUse(true);
suse2.Attacker = attacker.UID;
suse2.Attacker1 = attacked.UID;
suse2.SpellID = 13190;
suse2.X = attacked.X;
suse2.Y = attacked.Y;
suse2.AddTarget(attacked.UID, damage2, attack);
attacker.MonsterInfo.SendScreen(suse2);
if (attacked.Hitpoints <= damage2)
{
attacked.Die(attacker);
attack = new Attack(true);
attack.Attacker = attacker.UID;
attack.Attacked = attacked.UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = attacked.X;
attack.Y = attacked.Y;
attack.Damage = 1;
attack.ResponseDamage = damage2;
attacker.MonsterInfo.SendScreen(attack);
}
else
{
attacked.Hitpoints -= damage2;
}
return;
}
else
return;
}
#endregion
if (weapons.Item1.ID / 1000 != 500 && weapons.Item1.ID / 1000 != 613 && weapons.Item1.ID
if (weapons.Item1.ID / 1000 != 500 && weapons.Item1.ID / 1000 != 613 && weapons.Item1.ID / 1000 != 626) return;
#region WindWalker
public Time64 TCSpellUse;
public Time64 SwirlingStamp;
public bool IsStomper()
{
if (EntityFlag == Game.EntityFlag.Player)
{
if (this.Class >= 160 && this.Class <= 165)
if (this.Windwalker == 8 || this.Windwalker == 9 || this.Windwalker == 15)
return true;
}
return false;
}
public bool IsStomper1()
{
if (EntityFlag == Game.EntityFlag.Player)
{
var weapons = Owner.Weapons;
if (weapons.Item1 != null)
if (weapons.Item1.ID / 1000 == 626)
if (this.Class >= 160 && this.Class <= 165)
if (this.Windwalker == 8 || this.Windwalker == 9 || this.Windwalker == 15)
return true;
}
return false;
}
public bool IsStomper2()
{
if (EntityFlag == Game.EntityFlag.Player)
{
var weapons = Owner.Weapons;
if (weapons.Item2 != null)
if (weapons.Item2.ID / 1000 == 626)
if (this.Class >= 160 && this.Class <= 165)
if (this.Windwalker == 8 || this.Windwalker == 9 || this.Windwalker == 15)
return true;
}
return false;
}
public bool IsChaser()
{
if (EntityFlag == Game.EntityFlag.Player)
{
if (this.Class >= 160 && this.Class <= 165)
if (this.Windwalker == 0 || this.Windwalker == 7 || this.Windwalker == 1)
return true;
}
return false;
}
public bool IsChaser1()
{
if (EntityFlag == Game.EntityFlag.Player)
{
var weapons = Owner.Weapons;
if (weapons.Item1 != null)
if (weapons.Item1.ID / 1000 == 626)
if (this.Class >= 160 && this.Class <= 165)
if (this.Windwalker == 0 || this.Windwalker == 7 || this.Windwalker == 1)
return true;
}
return false;
}
public bool IsChaser2()
{
if (EntityFlag == Game.EntityFlag.Player)
{
var weapons = Owner.Weapons;
if (weapons.Item2 != null)
if (weapons.Item2.ID / 1000 == 626)
if (this.Class >= 160 && this.Class <= 165)
if (this.Windwalker == 0 || this.Windwalker == 7 || this.Windwalker == 1)
return true;
}
return false;
}
public Time64 OmnipotenceStamp, RevengeTaillStamp, StomperStaminaStamp, ChaserStaminaStamp, HealingSnowStamp, ThunderCloudStamp, ChillingSnowStamp, FreezingPelterStamp;
public byte ChillingSnow = 0, FreezingPelter = 0;
#endregion
#region WindWalker.
public String Branch = "";
private byte _ChangeBranch;
public byte ChangeBranch
{
get
{
return _ChangeBranch;
}
set
{
_ChangeBranch = value;
}
}
public Time64 TripleBeastStamp = Time64.Now;
public bool SwirlingStorm = false;
public float SwirlingStormPercent;
public byte _Windwalker;
public byte Windwalker
{
get
{
SpawnPacket[304] = _Windwalker;
return _Windwalker;
}
set
{
_Windwalker = value;
SpawnPacket[304] = value;
if (value > 0)
AddFlag4(Network.GamePackets.Update.Flags4.JusticeChant);
}
}
public bool PWindWalker()
{
if (EntityFlag == Game.EntityFlag.Player)
{
var weapons = Owner.Weapons;
if (weapons.Item2 != null)
if (weapons.Item2.ID / 1000 == 626)
return true;
}
return false;
}
#endregion
public uint Mesh
{
get
{
return BitConverter.ToUInt32(SpawnPacket, _Mesh);
}
set
{
Writer.Write(value, _Mesh, SpawnPacket);
}
}
RageOfWarTrap = 1500,
ShadowofChaser = 1550,
public Game.Entity ShadowofChaserAttacker, ShadowofChaserAttacked;
public Attack Attack;
public byte Unknown37
{
get { return Buffer[37]; }
set { Buffer[37] = value; }
}
public string Name2
{
get { return Program.Encoding.GetString(Buffer, 93, 16); }
set { Writer.Write(value, 93, Buffer); }
}
public ushort X2
{
get { return BitConverter.ToUInt16(Buffer, 61); }
set { Writer.Write(value, 61, Buffer); }
}
public ushort Y2
{
get { return BitConverter.ToUInt16(Buffer, 63); }
set { Writer.Write(value, 63, Buffer); }
}
public enum MapObjectType
public ushort X2
{
get
{
return BitConverter.ToUInt16(Buffer, 28);
}
set
{
Writer.Write(value, 28, Buffer);
}
}
public ushort Y2
{
get
{
return BitConverter.ToUInt16(Buffer, 30);
}
set
{
Writer.Write(value, 30, Buffer);
}
}
public bool Register(Entity ThunderCloudd)
{
if (ThunderCloudd.Owner.TimerSubscriptions == null)
{
ThunderCloudd.Owner.TimerSyncRoot = new object();
ThunderCloudd.Owner.TimerSubscriptions = new IDisposable[]
{
ThunderCloud.Add(ThunderCloudd)
};
return true;
}
return false;
}
public void Unregister(Entity Thundercloud)
{
if (Thundercloud.Owner == null || Thundercloud.Owner.TimerSubscriptions == null) return;
lock (Thundercloud.Owner.TimerSyncRoot)
{
if (Thundercloud.Owner.TimerSubscriptions != null)
{
foreach (var timer in Thundercloud.Owner.TimerSubscriptions)
timer.Dispose();
Thundercloud.Owner.TimerSubscriptions = null;
}
}
}
public TimerRule<Entity> ThunderCloud;
private void ThunderCloudTimer(Entity ThunderCloud, int time)
{
if (ThunderCloud == null) return;
if (Time64.Now >= ThunderCloud.ThunderCloudStamp.AddSeconds(1))
{
ThunderCloud.ThunderCloudStamp = Time64.Now;
if (ThunderCloud.Hitpoints > 400)
ThunderCloud.Hitpoints -= 400;
else
{
Kernel.Maps[ThunderCloud.MapID].RemoveEntity(ThunderCloud);
Data data = new Data(true);
data.UID = ThunderCloud.UID;
data.ID = Data.RemoveEntity;
ThunderCloud.MonsterInfo.SendScreen(data);
ThunderCloud.MonsterInfo.SendScreen(data);
foreach (var client in Kernel.GamePool.Values)
{
if (Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, client.Entity.X, client.Entity.Y) > 16) continue;
client.RemoveScreenSpawn(ThunderCloud, true);
}
Unregister(ThunderCloud);
return;
}
}
if ((ThunderCloud.SpawnPacket[50] == 0 && Time64.Now >= ThunderCloud.MonsterInfo.LastMove.AddMilliseconds(750)) || ThunderCloud.SpawnPacket[50] == 128)
{
ThunderCloud.MonsterInfo.LastMove = Time64.Now;
if (ThunderCloud.MonsterInfo.InSight == 0)
{
foreach (var one in Kernel.Maps[ThunderCloud.MapID].Entities.Values.Where(i => Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, i.X, i.Y) <= ThunderCloud.MonsterInfo.AttackRange))
{
if (one == null || one.Dead || one.MonsterInfo.Guard || one.Companion) continue;
ThunderCloud.MonsterInfo.InSight = one.UID;
Entity insight = null;
if (Kernel.Maps[ThunderCloud.MapID].Entities.ContainsKey(ThunderCloud.MonsterInfo.InSight))
insight = Kernel.Maps[ThunderCloud.MapID].Entities[ThunderCloud.MonsterInfo.InSight];
else if (Kernel.GamePool.ContainsKey(ThunderCloud.MonsterInfo.InSight))
insight = Kernel.GamePool[ThunderCloud.MonsterInfo.InSight].Entity;
if (insight == null || insight.Dead || (insight.MonsterInfo != null && insight.MonsterInfo.Guard))
{
ThunderCloud.MonsterInfo.InSight = 0;
break;
}
new Game.Attacking.Handle(null, ThunderCloud, insight);
break;
}
}
else
{
Entity insight = null;
if (Kernel.Maps[ThunderCloud.MapID].Entities.ContainsKey(ThunderCloud.MonsterInfo.InSight))
insight = Kernel.Maps[ThunderCloud.MapID].Entities[ThunderCloud.MonsterInfo.InSight];
else if (Kernel.GamePool.ContainsKey(ThunderCloud.MonsterInfo.InSight))
insight = Kernel.GamePool[ThunderCloud.MonsterInfo.InSight].Entity;
if (insight == null || insight.Dead || (insight.MonsterInfo != null && insight.MonsterInfo.Guard))
{
ThunderCloud.MonsterInfo.InSight = 0;
return;
}
new Game.Attacking.Handle(null, ThunderCloud, insight);
}
}
}
public Npcs(GameClient client)
public static string WindwalkerSkills(GameClient client, ushort spellid)
{
byte level = 0;
if (spellid == 12830 || spellid == 13070 || spellid == 13080) level = 120;
if (spellid == 12840 || spellid == 12960 || spellid == 13000) level = 70;
if (spellid == 12850 || spellid == 12930 || spellid == 12990) level = 40;
if (spellid == 12860 || spellid == 12870) level = 3;
if (spellid == 12890 || spellid == 12940 || spellid == 12950 || spellid == 13090) level = 15;
if (spellid == 12970 || spellid == 13020 || spellid == 13030) level = 100;
var spell = Database.SpellTable.GetSpell(spellid, client);
if (!client.Spells.ContainsKey(spellid) && client.Entity.Level >= level) return "Available";
else if (client.Spells.ContainsKey(spellid)) return "Learned";
else return "N/A";
}
#region WindwalkerLord
case 5158:
{
switch (npcRequest.OptionID)
{
case 0:
{
if (client.Entity.Class >= 160 && client.Entity.Class <= 165)
{
dialog.Text("Our Windwalker school was founded by Saint Wan on the principle of KINDNESS and JUSTICE. Once you decide to");
dialog.Text("~join us as a Windwalker, you take the responsibility for the security of the country against alien invaders and devils.");
if (client.Entity.Class != 165)
{
dialog.Option("I~want~to~get~promoted.", 1);
}
dialog.Option("Learn~skills.", 2);
dialog.Option("Switch~to~another~branch.", 4);
dialog.Option("I`ll~talk~to~you~later.", 255);
dialog.Send();
}
else
{
dialog.Text("You don`t look like a Windwalker. What`s the matter? If you were ever a Windwalker in either of the previous two lives, you can learn [Frost Gaze I] from me.");
dialog.Option("Learn~Frost~Gaze~I.", 3);
dialog.Send();
}
break;
}
#region Promocion
case 1:
{
if (client.Entity.Class >= 160 && client.Entity.Class <= 165)
{
if (client.Entity.Class == 165)
{
dialog.Text("You cannot be promoted anymore. You have mastered your class.");
dialog.Option("Thank you master.", 255);
dialog.Send();
}
else
{
dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
dialog.Option("Promote me sir.", 7);
dialog.Send();
}
}
else
{
dialog.Text("I will not tell any of the Windwalker secrets to another class, so, good bye.");
dialog.Option("Alright.", 255);
dialog.Send();
}
break;
}
case 7:
{
if (client.Entity.Class >= 160 && client.Entity.Class <= 165)
{
if (client.Entity.Class == 165)
{
dialog.Text("You cannot be promoted anymore. You have mastered your class.");
dialog.Option("Thank you master.", 255);
dialog.Send();
}
else
{
if (client.PromoteItemNeed == 721020)
{
if (client.Inventory.Remove("moonbox"))
{
client.Entity.Update(10, "end_task", true);
client.Inventory.Add(client.PromoteItemGain, 0, 1);
client.Entity.Class++;
dialog.Text("Congratulations! You have been promoted.");
dialog.Option("Thank you master.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't meet the requierments.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
return;
}
if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
{
client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
client.Inventory.Add(client.PromoteItemGain, 0, 1);
client.Entity.Class++;
client.Entity.Update(10, "end_task", true);
dialog.Text("Congratulations! You have been promoted.");
dialog.Option("Thank you master.", 255);
dialog.Send();
}
else
{
dialog.Text("You don't meet the requierments.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
}
}
else
{
dialog.Text("I will not tell any of the WindWalker secrets to another class, so, good bye.");
dialog.Option("Alright.", 255);
dialog.Send();
}
break;
}
#endregion
case 4:
{
if (client.Entity.IsChaser())
{
dialog.Text(" *Branches of Windwalker School*");
dialog.Text("،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ");
dialog.Text("Stomper: Excels in melee combat with excellent attack range and remarkable recovery ability. Stomper`s exclusive skill");
dialog.Text(" can freeze enemies` blood to extend their skill cooldown time and response time.");
dialog.Text("Chaser: Excels in ranged combat. With a unique focusing skill, Chaser is able to control the power of wind to attack");
dialog.Text(" enemies far away.");
dialog.Text("،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ");
dialog.Text("(You`re currently on the [RangedChaser] branch. Each Windwalker can switch his/her branch once every 30 days, free of charge.)");
dialog.Option("Switch~to~[MeleeStomper]~branch.", 5);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Send();
}
else if (client.Entity.IsStomper())
{
dialog.Text(" *Branches of Windwalker School*");
dialog.Text("،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ");
dialog.Text("Stomper: Excels in melee combat with excellent attack range and remarkable recovery ability. Stomper`s exclusive skill");
dialog.Text(" can freeze enemies` blood to extend their skill cooldown time and response time.");
dialog.Text("Chaser: Excels in ranged combat. With a unique focusing skill, Chaser is able to control the power of wind to attack");
dialog.Text(" enemies far away.");
dialog.Text("،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ،ھ");
dialog.Text("(You`re currently on the [MeleeStomper] branch. Each Windwalker can switch his/her branch once every 30 days, free of charge.)");
dialog.Option("Switch~to~[RangedChaser]~branch.", 6);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Send();
}
break;
}
case 5:
{
if (client.Entity.IsStomper())
client.Entity.Windwalker = 0;
else if (client.Entity.IsChaser())
client.Entity.Windwalker = 8;
else break;
Update upd = new Update(true);
upd.UID = client.Entity.UID;
upd.UpdateCount = 1;
upd.SwitchWindwalker(3277209, 1);
client.SendScreen(upd, true);
Update upd2 = new Update(true);
upd2.UID = client.Entity.UID;
upd2.UpdateCount = 1;
upd2.SwitchWindwalker(71, client.Entity.Windwalker);
client.SendScreen(upd2, true);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.JusticeChant);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.ChillingSnow);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.FreezingPelter);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.HealingSnow);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.RevengeTaill);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.ShadowofChaser);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.Omnipotence);
dialog.Text("Okay, I`ve changed your branch to [MeleeStomper].");
dialog.Option("Thanks!", 255);
dialog.Send();
break;
}
case 6:
{
if (client.Entity.IsStomper())
client.Entity.Windwalker = 0;
else if (client.Entity.IsChaser())
client.Entity.Windwalker = 8;
else break;
Update upd = new Update(true);
upd.UID = client.Entity.UID;
upd.UpdateCount = 1;
upd.SwitchWindwalker(3277209, 1);
client.SendScreen(upd, true);
Update upd2 = new Update(true);
upd2.UID = client.Entity.UID;
upd2.UpdateCount = 1;
upd2.SwitchWindwalker(71, client.Entity.Windwalker);
client.SendScreen(upd2, true);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.JusticeChant);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.ChillingSnow);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.FreezingPelter);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.HealingSnow);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.RevengeTaill);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.ShadowofChaser);
client.Entity.RemoveFlag4((ulong)Network.GamePackets.Update.Flags4.Omnipotence);
dialog.Text("Okay, I`ve changed your branch to [RangedChaser].");
dialog.Option("Thanks!", 255);
dialog.Send();
break;
}
case 3:
{
if (client.Entity.FirstRebornClass == 0)
{
client.AddSpell(LearnableSpell(12830));
break;
}
else if (client.Entity.FirstRebornClass == 165)
{
client.AddSpell(LearnableSpell(13070));
break;
}
else if (client.Entity.FirstRebornClass == 165 & client.Entity.SecondRebornClass == 165)
{
client.AddSpell(LearnableSpell(13080));
break;
}
else
{
client.MessageBox("You`re not qualified to learn this skill.");
break;
}
}
case 2:
{
dialog.Text("Our Windwalker school is divided into two branches: Chaser and Stomper. Chaser focuses on");
dialog.Text("~ranged combat, while Stomper excels in melee combat. I`m here representing the Chief to");
dialog.Text("~impart distinctive skills to the Windwalkers.");
dialog.Option("Learn~skills~of~Stomper.", 10);
dialog.Option("Learn~skills~of~Chaser.", 11);
dialog.Option("Learn~rebirth~skill.", 12);
dialog.Option("Learn~universal~skills.", 13);
dialog.Send();
break;
}
case 12:
{
dialog.Text("Frost Gaze is an exclusive rebirth skill for Windwalker. The heroes who got reborn to be Windwalker can learn Frost Gaze I. If both of your precious andd");
dialog.Text("~current Class are Windwalker, you can learn Frost Gaze II. While for Windwalkers who were also a Windwalker in previous two lives, they can learn Frost Gaze III.");
if (client.Entity.FirstRebornClass == 0)
dialog.Option("Frost~Gaze~I.", 3);
if (client.Entity.FirstRebornClass == 165)
dialog.Option("Frost~Gaze~II.", 3);
if (client.Entity.SecondRebornClass == 165)
dialog.Option("Frost~Gaze~III.", 3);
dialog.Option("I~want~to~learn~other~skills.", 2);
dialog.Option("I`ll~talk~to~you~later.", 255);
dialog.Send();
break;
}
case 13:
{
dialog.Text("Omnipotence and Justice Chant are basic skills for Windwalker, which are available to both Chaser and Stomper learners. I`ll teach you if you want.");
dialog.Option("Omnipotence~[Lv.3].~(" + WindwalkerSkills(client, 12860) + ")", 40);
dialog.Option("JusticeChant~[Lv.3].~(" + WindwalkerSkills(client, 12870) + ")", 41);
dialog.Option("I~want~to~learn~other~skills.", 2);
dialog.Option("I`ll~talk~to~you~later.", 255);
dialog.Send();
break;
}
case 40:
case 41:
{
ushort spellid = 12800;
switch (npcRequest.OptionID)
{
case 40: { spellid += 60; break; }
case 41: { spellid += 70; break; }
}
if (WindwalkerSkills(client, spellid) == "Learned")
{
dialog.Text("FellowBrother has already acquired this skill. Go practice and feel its power.");
dialog.Option("Okay.", 2);
dialog.Send();
break;
}
else if (WindwalkerSkills(client, spellid) == "Available")
{
client.AddSpell(LearnableSpell(spellid));
}
else
{
dialog.Text("The study of [" + SpellTable.GetSpell(spellid, 0).Name + "] requires FellowBrother to reach a certain level. FellowBrother, you can find me when you reach the required Level.");
dialog.Option("I`ll~see~you!", 2);
dialog.Send();
}
break;
}
case 10:
{
dialog.Text("The Stomper branch has developed overwhelming melee skills which enable the caster to disable an enemy with swift and flexible fighting moves.");
dialog.Text("~FellowBrother, which skill would you like to learn?");
dialog.Option("AngerofStomper~[Lv.1].~(" + WindwalkerSkills(client, 12980) + ")", 20);
dialog.Option("BurntFrost~[Lv.15].~(" + WindwalkerSkills(client, 12940) + ")", 21);
dialog.Option("HealingSnow~[Lv.15].~(" + WindwalkerSkills(client, 12950) + ")", 22);
dialog.Option("RageofWar~[Lv.40].~(" + WindwalkerSkills(client, 12930) + ")", 23);
dialog.Option("HorrorofStomper~[Lv.40].~(" + WindwalkerSkills(client, 12990) + ")", 24);
dialog.Option("ChillingSnow~[Lv.70].~(" + WindwalkerSkills(client, 12960) + ")", 25);
dialog.Option("PeaceofStomper~[Lv.70].~(" + WindwalkerSkills(client, 13000) + ")", 26);
dialog.Option("Next.", 27);
dialog.Send();
break;
}
case 27:
{
dialog.Text("The Stomper branch has developed overwhelming melee skills which enable the caster to disable an enemy with swift and flexible fighting moves.");
dialog.Text("~FellowBrother, which skill would you like to learn?");
dialog.Option("RevengeTail~[Lv.100].~(" + WindwalkerSkills(client, 13030) + ")", 28);
dialog.Option("FreezingPelter~[Lv.100].~(" + WindwalkerSkills(client, 13020) + ")", 29);
dialog.Option("I~want~to~learn~other~skills.", 2);
dialog.Option("I`ll~talk~to~you~later.", 255);
dialog.Option("Previous.", 10);
dialog.Send();
break;
}
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 28:
case 29:
{
ushort spellid = 12900;
switch (npcRequest.OptionID)
{
case 20: { spellid += 80; break; }
case 21: { spellid += 40; break; }
case 22: { spellid += 50; break; }
case 23: { spellid += 30; break; }
case 24: { spellid += 90; break; }
case 25: { spellid += 60; break; }
case 26: { spellid += 100; break; }
case 28: { spellid += 130; break; }
case 29: { spellid += 120; break; }
}
if (WindwalkerSkills(client, spellid) == "Learned")
{
dialog.Text("FellowBrother has already acquired this skill. Go practice and feel its power.");
dialog.Option("Okay.", 2);
dialog.Send();
break;
}
else if (WindwalkerSkills(client, spellid) == "Available")
{
client.AddSpell(LearnableSpell(spellid));
}
else
{
dialog.Text("The study of [" + SpellTable.GetSpell(spellid, 0).Name + "] requires FellowBrother to reach a certain level. FellowBrother, you can find me when you reach the required Level.");
dialog.Option("I`ll~see~you!", 2);
dialog.Send();
}
break;
}
case 11:
{
dialog.Text("The Chaser branch is famous for its ability to control wind and outstanding ranged attacks.");
dialog.Text("~FellowBrother, which skill would you like to learn?");
dialog.Option("SwirlingStorm~[Lv.15].~(" + WindwalkerSkills(client, 12890) + ")", 30);
dialog.Option("ShadowofChaser~[Lv.15].~(" + WindwalkerSkills(client, 13090) + ")", 31);
dialog.Option("TripleBlasts~[Lv.40].~(" + WindwalkerSkills(client, 12850) + ")", 32);
dialog.Option("Thundercloud~[Lv.70]~[" + WindwalkerSkills(client, 12840) + "]", 33);
dialog.Option("Thunderbolt~[Lv.100]~[" + WindwalkerSkills(client, 12970) + "]", 34);
dialog.Option("I~want~to~learn~other~skills.", 2);
dialog.Option("I`ll~talk~to~you~later.", 255);
dialog.Send();
break;
}
case 30:
case 31:
case 32:
case 33:
case 34:
{
ushort spellid = 12800;
switch (npcRequest.OptionID)
{
case 30: { spellid += 90; break; }
case 31: { spellid += 290; break; }
case 32: { spellid += 50; break; }
case 33: { spellid += 40; break; }
case 34: { spellid += 170; break; }
}
if (WindwalkerSkills(client, spellid) == "Learned")
{
dialog.Text("FellowBrother has already acquired this skill. Go practice and feel its power.");
dialog.Option("Okay.", 2);
dialog.Send();
break;
}
else if (WindwalkerSkills(client, spellid) == "Available")
{
client.AddSpell(LearnableSpell(spellid));
}
else
{
dialog.Text("The study of [" + SpellTable.GetSpell(spellid, 0).Name + "] requires FellowBrother to reach a certain level. FellowBrother, you can find me when you reach the required Level.");
dialog.Option("I`ll~see~you!", 2);
dialog.Send();
}
break;
}
}
break;
}
#endregion
#region RebirthMaster
case 59558:
{
dialog.Avatar(67);
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("I devote all my life to the research of eternity. And finally I Know the secret of");
dialog.Text(" rebirth! Well, anything I can help you with?");
dialog.Option("1st Rebirth.", 1);
dialog.Option("2nd Rebirth.", 2);
dialog.Option("Reincarnation.", 3);
dialog.Option("Reallot my Attribute Points.", 4);
dialog.Option("Just Passing By.", 255);
dialog.Send();
break;
}
case 175:
{
dialog.Text("It`s a magic stone which is required for the 1st rebirth. There`re 2 ways you can get it: a) Buy it from the Shopping Mall,");
dialog.Text("~b) Collect 7 Normal gems and a bottle of Clean Water, swap them for a Celestial Stone from Celestine (Twin City 365,92).");
dialog.Text("~Tips: You can dig for gems in Mine Caves in main cities. As to the Clean Water, you try your luck on the Water Devil in the Adventure Islands.");
dialog.Option("I~see.", 255);
dialog.Send();
break;
}
case 176:
{
dialog.Text("After the rebirth, you`ll receive some extra attribute points and start from Level 15. Every time you level up, you`ll gain some attribute points, which you can allot to different attributes at your will.");
dialog.Option("Back.", 1);
dialog.Option("I~see.", 255);
dialog.Send();
break;
}
case 177:
{
dialog.Text("Some of the skills you`ve leant are completely forgotten after the rebirth, while the others are forgotten for the moment.");
dialog.Text("~They can have an epiphany. The epiphany makes the skill leap, after it reaches to half of the former level before rebirth.");
dialog.Option("Back.", 1);
dialog.Option("I~see.", 255);
dialog.Send();
break;
}
case 190:
{
dialog.Text("It`s a magic stone which is required for the 1st rebirth. There`re 2 ways you can get it: a) Buy it from the Shopping Mall,");
dialog.Text("~b) Collect 7 Normal gems and a bottle of Clean Water, swap them for a Celestial Stone from Celestine (Twin City 365,92).");
dialog.Text("~Tips: You can dig for gems in Mine Caves in main cities. As to the Clean Water, you try your luck on the Water Devil in the Adventure Islands.");
dialog.Option("I~see.", 255);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Level >= 120 || client.Entity.Class > 100 && client.Entity.Level >= 110)
{
if (client.Entity.Class % 10 == 5)
{
if (client.Inventory.Contains(721259, 1))
{
dialog.Text("If you want to get reborn, you should reach at least Level 120 (Level 110 if you`re a Water Taoist), and be promoted to the highest job title.");
dialog.Text("~Besides, you should give me a Celestial Stone. After rebirth, you`ll be able to freely allot your attribute points and learn more powerful skills.");
dialog.Option("Celestial~Stone?", 175);
dialog.Option("Allot~attribute~points?", 176);
dialog.Option("Powerful~skills?", 177);
dialog.Option("I~would~like~to~be~reborn.", 12);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Send();
}
else
{
dialog.Text("I`m really sorry, but I can`t do anything without the Celestial Stone.");
dialog.Option("Celestial~Stone?", 190);
dialog.Send();
}
}
else
{
dialog.Text("You need to master your class. First!.");
dialog.Option("I~see.", 255);
dialog.Send();
}
}
else
{
dialog.Text("Your~Level~is~lower~than~the~required.~Please~train~harder.");
dialog.Option("I~see.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You~have~been~reborn.~Please~work~harder.");
dialog.Option("Oh,~I~see.", 255);
dialog.Send();
}
break;
}
case 12:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text("There`re 2 ways to get reborn. Attention: Only the items you equipped will be degraded during the rebirth.");
dialog.Option("Blessed~rebirth.", 181);
dialog.Option("Normal~rebirth.", 180);
dialog.Send();
}
else
{
dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
case 181:
{
dialog.Text("I dedicate myself to studying the blessed force of eternity, which absorbs the essences of the universe.");
dialog.Text("~During the rebirth, a random piece of your equipment will be added with blessed attribute.");
dialog.Text("But please be noted that epic weapons can only be blessed when you get reborn into the same class (for instance: Trojan-Trojan, Ninja-Ninja).");
dialog.Option("I~agree.", 13);
dialog.Option("Back.", 12);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Send();
break;
}
case 180:
{
dialog.Text("Unlike blessed rebirth, you won`t get blessed attribute added to your equipment.");
dialog.Text("~However, you will receive a Super gem, instead. So, select a class for your new life, first!");
dialog.Option("Okay.", 15);
dialog.Option("Back.", 12);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Send();
break;
}
case 15:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text("Select the super gem you desire.");
dialog.Option("SuperPhoenixGem.", 203);
dialog.Option("SuperDragonGem.", 213);
dialog.Option("SuperFuryGem.", 223);
dialog.Option("SuperRainbowGem.", 233);
dialog.Option("SuperVioletGem.", 253);
dialog.Option("SuperMoonGem.", 254);
dialog.Option("SuperKylinGem.", 243);
dialog.Option("Nothing thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
break;
}
else
{
dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
case 185:
{
dialog.Text("You`ve reached the highest of the class. Now, you can select one of the followings as your new class:");
dialog.Option("Pirate.", (byte)(70 + 13));
dialog.Option("Wind.Guard.", (byte)(161 + npcRequest.OptionID));
dialog.Option("Dragon-Warror.", (byte)(80 + 13));
dialog.Option("Previous~page.", 13);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Send();
break;
}
case 13:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text("You`ve reached the highest of the class. Now, you can select one of the followings as your new class:");
dialog.Option("Trojan.", (byte)(10 + npcRequest.OptionID));
dialog.Option("Warrior.", (byte)(20 + npcRequest.OptionID));
dialog.Option("Archer.", (byte)(40 + npcRequest.OptionID));
dialog.Option("WaterTaoist.", (byte)(132 + npcRequest.OptionID));
dialog.Option("FireTaoist.", (byte)(142 + npcRequest.OptionID));
dialog.Option("Ninja.", (byte)(50 + npcRequest.OptionID));
dialog.Option("Monk.", (byte)(60 + npcRequest.OptionID));
dialog.Option("More~choices.", 185);
dialog.Send();
}
else
{
dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
break;
}
else
{
dialog.Text("You have been reborn. Please work harder.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
#region Reincarnation
case 3:
{
dialog.Text("From now on, have total control of your life! If you've been Reborn twice and are at least Level 110, just bring me some Oblivion Dew and I'll help you become Reincarnated! After the Reincarnation, your class skills will revert to level 0,");
dialog.Text("~but they`ll return to their previous levels when you reach Level 110, again. If your classes have been the same for all three lives, including your current one, you can learn the Pure Skills from your class trainer,");
dialog.Text("~in the job center.");
dialog.Option("I~want~to~get~Reincarnated.", 5);
dialog.Option("Where~can~I~get~the~Dew?", 6);
dialog.Send();
break;
}
case 5:
{
if (client.Entity.Reborn == 2 && client.Entity.Level >= 120)
{
client.Send(new Data(true)
{
UID = client.Entity.UID,
ID = Data.OpenWindow,
dwParam = Data.WindowCommands.Reincarnation,
wParam1 = client.Entity.X,
wParam2 = client.Entity.Y
});
}
else
{
dialog.Text("You have not been Reborn twice. I`m afraid you will not withstand the power of the Oblivion Dew. Come to me when you get stronger.");
dialog.Option("Got~it!~Thanks!", 255);
dialog.Send();
}
break;
}
case 6:
{
dialog.Text("Oblivion Dew is available in the Honor Store and the Horse Race Store. You can use your Honor Points or Horse Race Points to purchase one.");
dialog.Option("Got~it!~Thanks!", 255);
dialog.Send();
break;
}
#endregion
#region Reallot Attributes
case 4:
{
dialog.Text("Reborn~level~70+~players~can~redistribute~their~attribute~points~at~the~cost~of~a~dragonball.");
dialog.Option("I~will~reallot~my~points.", 8);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Send();
break;
}
case 8:
{
if (client.Entity.Reborn > 0)
{
if (client.Entity.Level >= 70)
{
if (client.Inventory.Contains(1088000, 1))
{
client.Inventory.Remove(1088000, 1);
if (client.Entity.Reborn != 0)
{
client.Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 1;
client.Entity.Spirit = 0;
if (client.Entity.Reborn == 1)
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel)
+ 52 + 3 * (client.Entity.Level - 15));
}
else
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) +
client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15));
}
}
}
else
{
dialog.Text("Although~you~are~reborn,~you~have~not~reached~level~70.~Please~put~in~more~efforts.");
dialog.Option("I~see.", 255);
dialog.Send();
}
}
else
{
dialog.Text("Sorry,~you~do~not~have~a~dragonball.");
dialog.Option("I~see.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You~cannot~reallot~your~ability~points~unless~you~are~reborn~and~above~level~70.");
dialog.Option("I~see.", 255);
dialog.Send();
}
break;
}
#endregion
#region 2nd reborn
case 2:
{
if (client.Entity.Reborn == 1)
{
dialog.Text("Good. You`ve met the requirements for the second rebirth. You`ll face ElmistRo challenges till you complete the big quest.");
dialog.Text("~Once you manage to get reborn, you will receive unique aura, be able to learn Bless, and enjoy many benefits.");
dialog.Text("~If you don`t want to bother with the quest, just go buy an Exemption Token!");
dialog.Option("Exemption~Token?", 9);
dialog.Option("Hear~about~the~quest.", 254);
dialog.Option("Back.", 255);
dialog.Option("Never~mind.~I~quit.", 255);
dialog.Send();
}
else if (client.Entity.Reborn == 2)
{
dialog.Text("Impressive! You are already reborn twice!");
dialog.Option("Take me to the Evil Abyss.", 254);
dialog.Option("Yup!", 255);
dialog.Send();
}
break;
}
case 9:
{
if (client.Entity.Reborn == 1)
{
if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text("Select the class you want to reborn in.");
dialog.Option("Trojan.", 11);
dialog.Option("Warrior.", 21);
dialog.Option("Archer.", 41);
dialog.Option("WaterTaoist.", 132);
dialog.Option("FireTaoist.", 142);
dialog.Option("Ninja.", 51);
dialog.Option("Monk.", 61);
dialog.Option("Pirate.", 71);
dialog.Option("Wind.Guard.", 161);
dialog.Option("Dragon-Warror", 81);
dialog.Send();
}
else
{
dialog.Text("If you are a water saint you need level 110+, else you need 120+.");
dialog.Option("I'll just leave", 255);
dialog.Send();
break;
}
}
else
{
dialog.Text("Impressive! You are already reborn twice!");
dialog.Option("Take me to the Evil Abyss.", 254);
dialog.Option("Yup!", 255);
dialog.Send();
break;
}
break;
}
case 11:
case 21:
case 41:
case 51:
case 61:
case 71:
case 81:
case 132:
case 142:
case 161:
{
if (npcRequest.OptionID == 255) return;
if (client.Entity.Reborn == 1)
{
if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
if (client.Inventory.Contains(723701, 1) || client.Quests.GetQuest(QuestID.SecondQuestStageFour) != null && client.Quests.CheckQuest(QuestID.SecondQuestStageFour) == QuestPacket.QuestData.QuestStatus.Finished)
{
if (client.Reborn(npcRequest.OptionID))
{
client.Inventory.Remove(723701, 1);
}
else
{
dialog.Text("You need two free slots in your inventory.");
dialog.Option("I'll just leave", 255);
dialog.Send();
break;
}
}
}
else
{
dialog.Text("If you are a water saint you need level 110+, else you need 120+.");
dialog.Option("I'll just leave", 255);
dialog.Send();
break;
}
}
else
{
dialog.Text("You need to be in the second life to be able to get the third life.");
dialog.Option("I'll just leave", 255);
dialog.Send();
break;
}
break;
}
case 254:
{
if (client.Entity.Reborn == 1 && client.Quests.GetQuest(QuestID.SecondQuestStageFour) != null && client.Quests.CheckQuest(QuestID.SecondQuestStageFour) == QuestPacket.QuestData.QuestStatus.Finished)
{
dialog.Text("You have completed your quests with protect performance. you can take your");
dialog.Text(" Second Rebirth now.");
dialog.Option("I want second rebirth.", 9);
dialog.Option("I don't want second rebirth.", 255);
dialog.Send();
}
else
{
dialog.Text("It`s a really ElmistRo way to go... You`re going to meet many trials in the Evil Abyss. What`s more, after you get reborn,"); dialog.Text("~you will need to start over again and make triple efforts to level-up. You`d better think it over before making such a vital decision."); dialog.Text("~If you`ve made up your mind to accept this quest, I`ll send you to the Evil Abyss.");
dialog.Option("Yes,~please!", 253);
dialog.Option("I~don`t~want~to~risk~my~life.", 255);
dialog.Send();
}
break;
}
case 253:
{
var coords = Kernel.Maps[1700].RandomCoordinates(692, 709, 40);
client.Entity.TeleportTeam(1700, coords.Item1, coords.Item2);
break;
}
#endregion
default:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
if (npcRequest.OptionID == 255)
return;
if (npcRequest.OptionID >= 200 && npcRequest.OptionID <= 254)
{
client.SelectedGem = (byte)(npcRequest.OptionID % 100);
if (client.SelectedGem == 54)
client.SelectedGem = 63;
if (client.Entity.Reborn == 0)
{
byte id = 4;
dialog.Text("Select the class you want to reborn in.");
dialog.Option("Trojan.", (byte)(10 + id));
dialog.Option("Warrior.", (byte)(20 + id));
dialog.Option("Archer.", (byte)(40 + id));
dialog.Option("WaterTaoist.", (byte)(132 + id));
dialog.Option("FireTaoist.", (byte)(142 + id));
dialog.Option("Ninja.", (byte)(50 + id));
dialog.Option("Monk.", (byte)(60 + id));
dialog.Option("Pirate.", (byte)(70 + id));
dialog.Option("Wind.Guard.", (byte)(161 + id));
dialog.Option("Dragon-Warror.", (byte)(80 + id));
dialog.Send();
break;
}
else
{
dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
}
else
{
if (client.Inventory.Contains(721259, 1))
{
byte _class = (byte)(npcRequest.OptionID - npcRequest.OptionID % 10);
if (_class > 100)
_class += 2;
byte type = (byte)(npcRequest.OptionID - _class);
if (_class < 100)
_class++;
if (type != 4)
{
_class -= 10;
}
if (client.Reborn(_class))
{
client.Inventory.Remove(721259, 1);
if (type == 4)
{
if (client.SelectedGem != 0)
{
uint gemid = (uint)(client.SelectedGem + 700000);
client.Inventory.Add(gemid, 0, 1);
}
}
else
{
int availableshots = 0;
for (byte count = 0; count < 19; count++)
{
if (!client.Equipment.Free(count))
{
if (client.Equipment.TryGetItem(count).Bless == 0)
{
availableshots++;
}
}
}
if (availableshots != 0)
{
byte ex = (byte)Kernel.Random.Next(20);
if (!client.Equipment.Free(ex) && client.Equipment.Objects[ex - 1].Position != (byte)PacketHandler.Positions.Steed)
{
if (client.Equipment.TryGetItem(ex).Bless == 0)
{
var item = client.Equipment.TryGetItem(ex);
item.Bless = 1;
item.Mode = ElmistRo.Game.Enums.ItemMode.Update;
item.Send(client);
ElmistRo.Database.ConquerItemTable.UpdateBless(item);
}
}
}
}
}
else
{
dialog.Text("Sorry, but you need atleast 2 free spaces in your inventory.");
dialog.Option("Ohh.", 255);
dialog.Send();
}
}
}
}
else
{
dialog.Text("You have been reborn. Please work harder.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
}
break;
}
}
break;
}
#endregion
#region Remove Extra Skill
if (client.Entity.FirstRebornClass == 165 && client.Entity.SecondRebornClass == 165 && client.Entity.Class == 165)
{
WontAdd(ElmistRo.Game.Enums.SkillIDs.FrostGazeI);
}
switch (client.Entity.FirstRebornClass)
case 165:
{
Add(Game.Enums.SkillIDs.FrostGazeI);
Add(Game.Enums.SkillIDs.Thundercloud);
Add(Game.Enums.SkillIDs.TripleBlasts);
Add(Game.Enums.SkillIDs.Omnipotence);
Add(Game.Enums.SkillIDs.JusticeChant);
Add(Game.Enums.SkillIDs.BurntFrost);
Add(Game.Enums.SkillIDs.HealingSnow);
Add(Game.Enums.SkillIDs.ChillingSnow);
Add(Game.Enums.SkillIDs.Thunderbolt);
Add(Game.Enums.SkillIDs.AngerofStomper);
Add(Game.Enums.SkillIDs.HorrorofStomper);
Add(Game.Enums.SkillIDs.RageofWar);
Add(Game.Enums.SkillIDs.PeaceofStomper);
Add(Game.Enums.SkillIDs.FreezingPelter);
Add(Game.Enums.SkillIDs.RevengeTail);
Add(Game.Enums.SkillIDs.Circle);
Add(Game.Enums.SkillIDs.Rectangle);
Add(Game.Enums.SkillIDs.FrostGazeII);
Add(Game.Enums.SkillIDs.FrostGazeIII);
Add(Game.Enums.SkillIDs.ShadowofChaser);
Add(Game.Enums.SkillIDs.ThundercloudAttack);
Add(Game.Enums.SkillIDs.DestinyFire);
Add(Game.Enums.SkillIDs.FireShower);
Add(Game.Enums.SkillIDs.WheelOfDevastation);
break;
}
}
FrostGazeI = 12830,
Thundercloud = 12840,
TripleBlasts = 12850,
Omnipotence = 12860,
JusticeChant = 12870,
SwirlingStorm = 12890,
RageofWar = 12930,
BurntFrost = 12940,
HealingSnow = 12950,
ChillingSnow = 12960,
Thunderbolt = 12970,
AngerofStomper = 12980,
HorrorofStomper = 12990,
PeaceofStomper = 13000,
FreezingPelter = 13020,
RevengeTail = 13030,
Circle = 13050,
Rectangle = 13060,
FrostGazeII = 13070,
FrostGazeIII = 13080,
ShadowofChaser = 13090,
ThundercloudAttack = 13190,
DestinyFire = 13362,
FireShower = 13363,
WheelOfDevastation = 13364,
switch (client.Entity.SecondRebornClass)
case 165:
{
Add(Game.Enums.SkillIDs.FrostGazeI);
Add(Game.Enums.SkillIDs.Thundercloud);
Add(Game.Enums.SkillIDs.TripleBlasts);
Add(Game.Enums.SkillIDs.Omnipotence);
Add(Game.Enums.SkillIDs.JusticeChant);
Add(Game.Enums.SkillIDs.BurntFrost);
Add(Game.Enums.SkillIDs.HealingSnow);
Add(Game.Enums.SkillIDs.ChillingSnow);
Add(Game.Enums.SkillIDs.Thunderbolt);
Add(Game.Enums.SkillIDs.AngerofStomper);
Add(Game.Enums.SkillIDs.HorrorofStomper);
Add(Game.Enums.SkillIDs.RageofWar);
Add(Game.Enums.SkillIDs.PeaceofStomper);
Add(Game.Enums.SkillIDs.FreezingPelter);
Add(Game.Enums.SkillIDs.RevengeTail);
Add(Game.Enums.SkillIDs.Circle);
Add(Game.Enums.SkillIDs.Rectangle);
Add(Game.Enums.SkillIDs.FrostGazeII);
Add(Game.Enums.SkillIDs.FrostGazeIII);
Add(Game.Enums.SkillIDs.ShadowofChaser);
Add(Game.Enums.SkillIDs.ThundercloudAttack);
Add(Game.Enums.SkillIDs.DestinyFire);
Add(Game.Enums.SkillIDs.FireShower);
Add(Game.Enums.SkillIDs.WheelOfDevastation);
break;
}
#region Low level items
#region Windwalker
case 165:
{
switch (Second)
{
case 61: break;
default:
WontAdd(Enums.SkillIDs.FrostGazeI);
WontAdd(Enums.SkillIDs.Thundercloud);
WontAdd(Enums.SkillIDs.TripleBlasts);
WontAdd(Enums.SkillIDs.Omnipotence);
WontAdd(Enums.SkillIDs.JusticeChant);
WontAdd(Enums.SkillIDs.SwirlingStorm);
WontAdd(Enums.SkillIDs.RageofWar);
WontAdd(Enums.SkillIDs.BurntFrost);
WontAdd(Enums.SkillIDs.HealingSnow);
WontAdd(Enums.SkillIDs.ChillingSnow);
WontAdd(Enums.SkillIDs.Thunderbolt);
WontAdd(Enums.SkillIDs.AngerofStomper);
WontAdd(Enums.SkillIDs.HorrorofStomper);
WontAdd(Enums.SkillIDs.PeaceofStomper);
WontAdd(Enums.SkillIDs.FreezingPelter);
WontAdd(Enums.SkillIDs.RevengeTail);
WontAdd(Enums.SkillIDs.Circle);
WontAdd(Enums.SkillIDs.Rectangle);
WontAdd(Enums.SkillIDs.FrostGazeII);
WontAdd(Enums.SkillIDs.FrostGazeIII);
WontAdd(Enums.SkillIDs.ShadowofChaser);
WontAdd(Enums.SkillIDs.ThundercloudAttack);
WontAdd(Enums.SkillIDs.DestinyFire);
WontAdd(Enums.SkillIDs.FireShower);
WontAdd(Enums.SkillIDs.WheelOfDevastation);
break;
}
break;
}
#endregion
#region Windwalker
if (PreviousClass == 165)
{
if (client.Entity.Class != 161)
{
switch (spell.ID)
{
case 12830:
case 12840:
case 12850:
case 12860:
case 12870:
case 12880:
case 12890:
case 12930:
case 12940:
case 12950:
case 12960:
case 12970:
case 12980:
case 12990:
case 13000:
case 13020:
case 13030:
case 13190:
case 13050:
case 13060:
case 13070:
case 13080:
case 13090:
case 13360:
client.RemoveSpell(spell);
break;
}
}
}
#endregion
#region Windwalker
if (PreviousClass == 165)
{
if (client.Entity.Class != 161)
{
switch (aspell.ID)
{
case 12830:
case 12840:
case 12850:
case 12860:
case 12870:
case 12880:
case 12890:
case 12930:
case 12940:
case 12950:
case 12960:
case 12970:
case 12980:
case 12990:
case 13000:
case 13020:
case 13030:
case 13190:
case 13050:
case 13060:
case 13070:
case 13080:
case 13090:
case 13360:
client.RemoveSpell(aspell);
break;
}
}
}
#endregion
#region Add Extra Skill
if (client.Entity.FirstRebornClass == 165 && client.Entity.SecondRebornClass == 165 && client.Entity.Class == 165)
{
WontAdd(ElmistRo.Game.Enums.SkillIDs.FrostGazeI);
WontAdd(ElmistRo.Game.Enums.SkillIDs.FrostGazeIII);
}
|
الذين يشاهدون محتوى الموضوع الآن : 5 ( الأعضاء 0 والزوار 5) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
سورس بورتو كامل بي شخصية الجديده بعد التعديل شخصية ثور + باتش[نسخة ماتريكس] | Mr.X | سورسات كونكر | 87 | 2024-09-04 03:21 PM |
شفرة تقوية شخصية | body2020 | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2020-05-14 03:40 AM |
مشكلة بخصوص WindWalker | Mostafa Shalby | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2020-01-31 01:13 PM |
حل مشكله النزول بشخصية Windwalker | Tefa | تطوير سيرفرات كونكر | 5 | 2019-11-01 11:01 AM |
انبي سي توب windwalker | محمد ياسر | تطوير سيرفرات كونكر | 0 | 2019-05-13 02:55 AM |