Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Skill Soul
- case 3570754:
- {
- switch (npcRequest.OptionID)
- {
- case 0:
- {
- dialog.Text("Hello friend. I am the Skill Souls master! Have you imagine if u could change your SkillS look.");
- dialog.Option("Okay, go a head", 1);
- dialog.Option("Sorry", 255);
- dialog.Send();
- break;
- }
- case 1:
- {
- dialog.Text("Choose its new style.");
- dialog.Option("Upgrade My Skill Souls", 25);
- dialog.Option("I'll think about it!", 255);
- dialog.Send();
- break;
- }
- #region edited
- case 25:
- {
- dialog.Text("Choose Skill you want.");
- foreach (var s in client.Spells.Values)
- {
- if (SkillSoul_Allowed.Contains(s.ID))
- {
- byte ID = (byte)(SkillSoul_Allowed.IndexOf(s.ID) + 2);
- #region New skill Soul
- // else
- {
- switch (s.ID)
- {
- default:
- {
- if (s.Souls < Spell.Soul_Level.Level_Two)
- {
- if (SpellTable.SpellInformations.ContainsKey(s.ID))
- {
- if (SpellTable.SpellInformations[s.ID].ContainsKey(s.Level))
- {
- if (SpellTable.SpellInformations[s.ID][s.Level].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- else
- {
- if (SpellTable.SpellInformations[s.ID][0].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][0].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][0].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- }
- }
- break;
- }
- case 10381:
- {
- if (s.Souls < Spell.Soul_Level.Level_Four)
- {
- if (SpellTable.SpellInformations.ContainsKey(s.ID))
- {
- if (SpellTable.SpellInformations[s.ID].ContainsKey(s.Level))
- {
- if (SpellTable.SpellInformations[s.ID][s.Level].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- else
- {
- if (SpellTable.SpellInformations[s.ID][0].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][0].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][0].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- }
- }
- }
- break;
- case 6001:
- case 1001:
- case 12080:
- {
- if (s.Souls < Spell.Soul_Level.Level_One)
- {
- if (SpellTable.SpellInformations.ContainsKey(s.ID))
- {
- if (SpellTable.SpellInformations[s.ID].ContainsKey(s.Level))
- {
- if (SpellTable.SpellInformations[s.ID][s.Level].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- else
- {
- if (SpellTable.SpellInformations[s.ID][0].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][0].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][0].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- }
- }
- }
- break;
- case 1046:
- case 1115:
- case 11190:
- case 10415:
- case 1002:
- {
- if (s.Souls < Spell.Soul_Level.Level_Three)
- {
- if (SpellTable.SpellInformations.ContainsKey(s.ID))
- {
- if (SpellTable.SpellInformations[s.ID].ContainsKey(s.Level))
- {
- if (SpellTable.SpellInformations[s.ID][s.Level].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][s.Level].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- else
- {
- if (SpellTable.SpellInformations[s.ID][0].Name != "")
- dialog.Option(SpellTable.SpellInformations[s.ID][0].Name + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- else
- dialog.Option(SpellTable.SpellInformations[s.ID][0].ID.ToString() + ", [Skill Soul Level] :" + s.Souls.ToString(), ID);
- }
- }
- }
- }
- break;
- }
- }
- #endregion New skill Soul
- }
- }
- dialog.Option("Nevermind.", 255);
- dialog.Send();
- break;
- }
- default:
- {
- byte i = (byte)(npcRequest.OptionID - 2);
- ushort skill = SkillSoul_Allowed[i];
- if (client.Spells.ContainsKey(skill))
- {
- {
- switch (client.Spells[skill].Souls)
- {
- case Spell.Soul_Level.Default:
- case Spell.Soul_Level.Level_One:
- case Spell.Soul_Level.Level_Two:
- case Spell.Soul_Level.Level_Three:
- {
- int lvl = Spell.SkillSoul_values.IndexOf(client.Spells[skill].Souls);
- lvl++;
- uint cost = (uint)(lvl * 100);
- if (client.Player.ConquerPoints >= cost)
- {
- client.Player.ConquerPoints -= cost;
- client.Spells[skill].Souls = Spell.SkillSoul_values[lvl];
- }
- else
- {
- dialog.Text("You Don't Have " + cost + "Cps Come When You Have it ");
- dialog.Option("Sorry ", 255);
- dialog.Send();
- return;
- }
- }
- break;
- }
- Network.GamePackets.Data data = new Data(true);
- data.UID = client.Player.UID;
- data.dwParam = client.Spells[skill].ID;
- data.ID = 109;
- client.Send(data);
- client.Send(new Spell(true)
- {
- ID = client.Spells[skill].ID,
- Level = client.Spells[skill].Level,
- PreviousLevel = client.Spells[skill].PreviousLevel,
- Experience = 0,
- Souls = client.Spells[skill].Souls,
- Available = true
- }.ToArray());
- client.Spells[skill].Send(client);
- SkillTable.SaveSpells(client);
- dialog.Text("you have upgraded your skills :" + client.Spells[skill].ID + " To SkillSoul level" + client.Spells[skill].Souls.ToString());
- dialog.Option("Good Job.", 255);
- dialog.Send();
- }
- }
- }
- break;
- #endregion
- }
- break;
- }
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement