public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID == 101) //Main nue { m_SortNubia.condition = MagieCondition.MainNue; } if (info.ButtonID == 102) //Objet equiper { m_SortNubia.condition = MagieCondition.None; from.Target = new EquipObjectTarget(m_SortNubia); } if (info.ButtonID == 103) //SortNubia père { m_SortNubia.condition = MagieCondition.None; from.CloseGump(typeof(SortCreationChoixCondition)); from.SendGump(new SortCreationChoixPere(m_owner, m_SortNubia)); //from.Target = new EquipObjectTarget(m_SortNubia); } if (info.ButtonID != 102 && info.ButtonID != 103) { from.CloseGump(typeof(SortCreationChoixCondition)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID >= 100 && info.ButtonID < 200) //Jutsu Cast { from.Magie.executeSort(info.ButtonID - 100); } if (info.ButtonID >= 200 && info.ButtonID < 300) { from.CloseGump(typeof(SortInfoGump)); from.SendGump(new SortInfoGump(m_owner.Magie.getSort(info.ButtonID - 200))); } if (info.ButtonID >= 300 && info.ButtonID < 500) { from.CloseGump(typeof(SortInfoGump)); from.SendGump(new PropertiesGump(from, m_owner.Magie.getSort(info.ButtonID - 300))); } if (info.ButtonID >= 500) //Extraire un parchemin { from.CloseGump(typeof(SortInfoGump)); try { SortNubia jutsu = (SortNubia)NubiaHelper.CopyItem(m_owner.Magie.getSort(info.ButtonID - 500)); jutsu.MoveToWorld(from.Location, from.Map); from.SendMessage("Copy faite"); } catch { from.SendMessage("Copy impossible!"); } //from.SendGump( new PropertiesGump( from, from.getJutsu(info.ButtonID-300) ) ); } }
public override void OnUse(NubiaPlayer p) { p.SendLocalizedMessage(1011350); // What do you wish to track? p.CloseGump(typeof(TrackWhatGump)); p.CloseGump(typeof(TrackWhoGump)); p.SendGump(new TrackWhatGump(p)); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; from.CloseGump(typeof(SortCreationChoixSort)); from.CloseGump(typeof(SortCreationBonusGump)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID >= 50 && info.ButtonID < 200) { AbstractBaseBuff buff = m_owner.BuffList[info.ButtonID - 50] as AbstractBaseBuff; from.CloseGump(typeof(GumpInfo)); from.CloseGump(typeof(GumpBuff)); from.SendGump(new GumpInfo(buff.Icone, buff.Descrip, buff.Name)); from.SendGump(new GumpBuff(m_owner)); } }
public static void gestion_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; p.CloseGump(typeof(GumpCotation)); p.SendGump(new GumpCotation(p)); }
public static void dons_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; p.CloseGump(typeof(GumpDons)); p.SendGump(new GumpDons(p, null)); }
public static void maitrise_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; p.CloseGump(typeof(SortMaitriseGump)); p.SendGump(new SortMaitriseGump(p)); }
public static void reputation_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; p.CloseGump(typeof(GumpFactions)); p.SendGump(new GumpFactions(p)); }
public static void magiegm_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; if (checkAffinite(p)) { p.CloseGump(typeof(SortListGump)); p.SendGump(new SortListGump(p, true)); } }
public static void tissage_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; if (checkAffinite(p)) { SortNubia newJutsu = new SortNubiaDestruction(); p.CloseGump(typeof(SortCreationGump)); p.SendGump(new SortCreationGump(p, newJutsu)); } }
protected override void OnTarget(Mobile from, object o) { if (o is BaseWeapon) { BaseWeapon bw = o as BaseWeapon; m_Owner.wId = bw.ItemID; m_Owner.wSkill = bw.Skill; player.CloseGump(typeof(SortCreationGump)); player.SendGump(new SortCreationGump(player, m_Owner)); } }
protected override void OnTarget(Mobile from, object o) { if (o is NubiaPlayer) { m_maitre.CloseGump(typeof(SortInfoGump)); NubiaPlayer eleve = o as NubiaPlayer; eleve.SendGump(new enseignementSortAccept(m_Owner, m_maitre, eleve)); m_maitre.SendMessage("Vous proposez l'apprentissage de '" + m_Owner.Nom + "' à " + eleve.Name); eleve.SendMessage(m_maitre.Name + " vous propose d'apprendre '" + m_Owner.Nom + "'"); return; } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID >= 100 && info.ButtonID < 200) { m_SortNubia.SortNubiaPere = from.Magie.sortList[info.ButtonID - 100]; } from.CloseGump(typeof(SortCreationChoixPere)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID == 5) { from.Target = new InternalTarget(m_owner, from); return; } from.CloseGump(typeof(SortListGump)); from.SendGump(new SortListGump(from, false)); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID >= 100 && info.ButtonID < 200) { m_SortNubia.effect = (SortNubiaEffect)(info.ButtonID - 100); } from.CloseGump(typeof(SortCreationChoixCondition)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); }
public static void fiche_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; if (p.Created) { p.CloseGump(typeof(GumpFichePerso)); p.SendGump(new GumpFichePerso(p, p)); } else { p.SendMessage("Vous devez valider la création du personnage"); } }
public static void deguisement_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; if (p.Competences[CompType.Deguisement].getPureMaitrise() >= 2) { p.RemoveDeguisement(); p.CloseGump(typeof(GumpDeguisement)); p.SendGump(new GumpDeguisement(p)); } else { p.SendMessage("Vous devez avoir au moin 2 en déguisement"); } }
protected override void OnTarget(Mobile f, object o) { NubiaPlayer from = f as NubiaPlayer; if (o is Item) { Item item = o as Item; if (item is BaseClothing) { from.SendMessage("Habits non autorisé"); from.CloseGump(typeof(SortCreationChoixCondition)); from.SendGump(new SortCreationChoixCondition(from, m_Owner)); return; } m_Owner.ObjectToEquip = item; from.SendMessage(item.Name + " Selectionner en condition d'équipement"); from.CloseGump(typeof(SortCreationChoixCondition)); from.SendGump(new SortCreationGump(from, m_Owner)); return; } from.SendMessage("Cible invalide pour la condition 'L'Objet doit être équipé'"); from.CloseGump(typeof(SortCreationChoixCondition)); from.SendGump(new SortCreationChoixCondition(from, m_Owner)); }
protected override void OnTarget(Mobile from, object o) { if (o is RuneVie) { RuneVie rune = o as RuneVie; if (rune.creature == null) { player.SendMessage("Cette rune est vide"); } else { m_Owner.toClone = NubiaHelper.CopyCreature(rune.creature); // m_Owner.competence = rune.creature.competenceLie; } player.CloseGump(typeof(SortCreationGump)); player.SendGump(new SortCreationGump(player, m_Owner)); } }
public static void magie_OnCommand(CommandEventArgs e) { NubiaPlayer p = e.Mobile as NubiaPlayer; if (checkAffinite(p)) { p.CloseGump(typeof(NewSortListGump)); p.SendGump(new NewSortListGump(p)); } /* if (e.Arguments.Length <= 0) * { * p.SendMessage("Utilisation: .magie [nom_de_classe] ( ex: .magie magicien )"); * return; * } * else * { * string clstr = e.Arguments[0]; * Console.WriteLine(" Magie: " + clstr); * try * { * ClasseType cl = ClasseType.None; * for (int c = 0; c < (int)ClasseType.Maximum; c++) * { * if (clstr.ToLower() == ((ClasseType)c).ToString().ToLower()) * { * cl = (ClasseType)c; * break; * } * } * * if (cl != ClasseType.None) * p.SendGump(new GumpLivreMagie(p, cl)); * else * p.SendMessage("Mauvais nom de classe"); * * } * catch (Exception ex) { } * }*/ }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; int id = info.ButtonID; if (id >= 50) { int s = id - 50; m_SortNubia = m_sorts[s]; for (int i = 0; i < m_sorts.Length; i++) { if (i != s) { m_sorts[i].Delete(); } } } from.CloseGump(typeof(SortCreationChoixSort)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); }
public void Maj(NubiaPlayer from, RelayInfo info) { TextRelay tName = info.GetTextEntry(0); m_SortNubia.Nom = (tName == null) ? "Sort nubien" : tName.Text; TextRelay tEmote = info.GetTextEntry(1); m_SortNubia.Emote = (tEmote == null) ? "incante" : tEmote.Text; if (m_SortNubia is SortNubiaDestruction) { SortNubiaDestruction newSortNubia = m_SortNubia as SortNubiaDestruction; TextRelay tminDeg = info.GetTextEntry(50); string min = (tminDeg == null) ? "0" : tminDeg.Text; try{ newSortNubia.minDegat = Convert.ToInt32(min); }catch {} TextRelay tmaxDeg = info.GetTextEntry(51); string max = (tmaxDeg == null) ? "0" : tmaxDeg.Text; try{ newSortNubia.maxDegat = Convert.ToInt32(max); }catch {} TextRelay tDistance = info.GetTextEntry(52); string dist = (tDistance == null) ? "0" : tDistance.Text; try{ newSortNubia.distance = Convert.ToInt32(dist); }catch {} TextRelay tNumber = info.GetTextEntry(53); string num = (tNumber == null) ? "0" : tNumber.Text; try{ newSortNubia.number = Convert.ToInt32(num); }catch {} } if (m_SortNubia is SortNubiaSoin) { SortNubiaSoin newSortNubia = m_SortNubia as SortNubiaSoin; TextRelay tminDeg = info.GetTextEntry(75); string min = (tminDeg == null) ? "0" : tminDeg.Text; try{ newSortNubia.minDegat = Convert.ToInt32(min); }catch {} TextRelay tmaxDeg = info.GetTextEntry(76); string max = (tmaxDeg == null) ? "0" : tmaxDeg.Text; try{ newSortNubia.maxDegat = Convert.ToInt32(max); }catch {} TextRelay tDistance = info.GetTextEntry(77); string dist = (tDistance == null) ? "0" :tDistance.Text; try{ newSortNubia.distance = Convert.ToInt32(dist); }catch {} TextRelay tNumber = info.GetTextEntry(78); string num = (tNumber == null) ? "0" : tNumber.Text; try{ newSortNubia.number = Convert.ToInt32(num); }catch {} } if (m_SortNubia is SortNubiaInvocationArme) { SortNubiaInvocationArme newSortNubia = m_SortNubia as SortNubiaInvocationArme; TextRelay tspeed = info.GetTextEntry(90); string speed = (tspeed == null) ? "0" : tspeed.Text; try{ newSortNubia.wSpeed = Convert.ToInt32(speed); }catch {} TextRelay twName = info.GetTextEntry(93); string wname = (twName == null) ? "0" : twName.Text; try{ newSortNubia.wNom = wname; }catch {} // newSortNubia.color = KonohaCompHelper.getCompColor(newSortNubia.competence); } if (m_SortNubia is SortNubiaTao) { SortNubiaTao newSortNubia = m_SortNubia as SortNubiaTao; TextRelay tdegs = info.GetTextEntry(100); string degs = (tdegs == null) ? "0" : tdegs.Text; try{ newSortNubia.degats = Convert.ToInt32(degs); }catch {} TextRelay tTurn = info.GetTextEntry(101); string tt = (tTurn == null) ? "0" : tTurn.Text; try{ newSortNubia.turn = Convert.ToInt32(tt); }catch {} TextRelay tstun = info.GetTextEntry(102); string st = (tstun == null) ? "0" : tstun.Text; try{ newSortNubia.stun = Convert.ToDouble(st); }catch {} //newSortNubia.color = KonohaCompHelper.getCompColor(newSortNubia.competence); } if (m_SortNubia is SortNubiaParalyze) { SortNubiaParalyze newSortNubia = m_SortNubia as SortNubiaParalyze; TextRelay tminDeg = info.GetTextEntry(110); string min = (tminDeg == null) ? "0" : tminDeg.Text; try{ newSortNubia.minDegat = Convert.ToInt32(min); }catch {} TextRelay tmaxDeg = info.GetTextEntry(111); string max = (tmaxDeg == null) ? "0" : tmaxDeg.Text; try{ newSortNubia.maxDegat = Convert.ToInt32(max); }catch {} TextRelay tDistance = info.GetTextEntry(112); string dist = (tDistance == null) ? "0" : tDistance.Text; try{ newSortNubia.distance = Convert.ToInt32(dist); }catch {} TextRelay tNumber = info.GetTextEntry(113); string num = (tNumber == null) ? "0" : tNumber.Text; try{ newSortNubia.number = Convert.ToInt32(num); }catch {} } if (m_SortNubia is SortNubiaPoison) { SortNubiaPoison newSortNubia = m_SortNubia as SortNubiaPoison; TextRelay tminDeg = info.GetTextEntry(120); string min = (tminDeg == null) ? "0" : tminDeg.Text; int plev = 0; try{ plev = Convert.ToInt32(min); }catch {} if (plev > 3) { plev = 3; } if (plev < 0) { plev = 0; } newSortNubia.PoisonLevel = plev; TextRelay tDistance = info.GetTextEntry(121); string dist = (tDistance == null) ? "0" : tDistance.Text; try{ newSortNubia.distance = Convert.ToInt32(dist); }catch {} TextRelay tNumber = info.GetTextEntry(122); string num = (tNumber == null) ? "0" : tNumber.Text; try{ newSortNubia.number = Convert.ToInt32(num); }catch {} } if (m_SortNubia is SortNubiaMur) { SortNubiaMur newSortNubia = m_SortNubia as SortNubiaMur; TextRelay tdegWalk = info.GetTextEntry(135); string dwalk = (tdegWalk == null) ? "0" : tdegWalk.Text; try{ newSortNubia.damageWalk = Convert.ToInt32(dwalk); }catch {} } from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID == 0) //Changer la connaissance { m_SortNubia.Owner = null; m_SortNubia = null; } if (info.ButtonID == 997) //Changer la connaissance { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationChoixEnergie(m_owner, m_SortNubia)); } if (info.ButtonID == 998) //Changer le type { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationChoixSort(m_owner, m_SortNubia)); } if (info.ButtonID == 975) //Changer l'effet { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationChoixEffet(m_owner, m_SortNubia)); } if (info.ButtonID == 976) //Changer la couleur { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationChoixCouleur(m_owner, m_SortNubia)); } if (info.ButtonID == 977) //Changer le rendu { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationChoixRender(m_owner, m_SortNubia)); } if (info.ButtonID == 950 || info.ButtonID == 951) //Bonus { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationBonusGump(m_owner, m_SortNubia, (info.ButtonID - 949))); } if (info.ButtonID == 925) //Bonus { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationChoixCondition(m_owner, m_SortNubia)); } //DESTRUCTION (50+) if (info.ButtonID == 54) //ciblage { SortNubiaDestruction newSortNubia = m_SortNubia as SortNubiaDestruction; newSortNubia.canCible = !newSortNubia.canCible; Maj(from, info); } //Soin (75+) if (info.ButtonID == 79) //ciblage { SortNubiaSoin newSortNubia = m_SortNubia as SortNubiaSoin; newSortNubia.canCible = !newSortNubia.canCible; Maj(from, info); } //Transfo (80+) if (info.ButtonID == 80) { from.Target = new TransfoTarget((SortNubiaTransformation)m_SortNubia, from); } //Invoc Arme (90+) if (info.ButtonID == 92) //cible d'arme model { from.Target = new ciblageArmeTarget((SortNubiaInvocationArme)m_SortNubia, from); } //TaiSortNubia if (info.ButtonID == 103) //ciblage { SortNubiaTao newSortNubia = m_SortNubia as SortNubiaTao; newSortNubia.rapide = !newSortNubia.rapide; Maj(from, info); } //PARALYZE (110+) if (info.ButtonID == 114) //ciblage { SortNubiaParalyze newSortNubia = m_SortNubia as SortNubiaParalyze; newSortNubia.canCible = !newSortNubia.canCible; Maj(from, info); } //PARALYZE (110+) if (info.ButtonID == 123) //ciblage { SortNubiaPoison newSortNubia = m_SortNubia as SortNubiaPoison; newSortNubia.canCible = !newSortNubia.canCible; Maj(from, info); } //Invocation (130+) if (info.ButtonID == 130) { from.Target = new InvocTarget((SortNubiaInvocation)m_SortNubia, from); } //Mur (136+) if (info.ButtonID == 136) //ciblage { SortNubiaMur newSortNubia = m_SortNubia as SortNubiaMur; newSortNubia.block = !newSortNubia.block; Maj(from, info); } //MAJ if (info.ButtonID == 999) //maj { Maj(from, info); } //CREATION if (info.ButtonID == 1000) { bool GM = (from.AccessLevel >= AccessLevel.GameMaster); //m_SortNubia.skill = KonohaCompHelper.getSkillFromCat(m_SortNubia.categorie); //GM = false; //pour test if (GM) { from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationConfirm(m_owner, m_SortNubia, true)); return; } else { if (m_SortNubia.GetCercle() > from.Niveau) { from.SendMessage("Vous ne pouvez pas créer un sort aussi puissant"); Maj(from, info); return; } else if (!m_SortNubia.canCast(from)) { from.SendMessage("Il vous manque des connaissances ou de le puissance pour ce sort"); Maj(from, info); return; } else { from.SendMessage("Nouveau SortNubia '" + m_SortNubia.Nom + "' élaboré. Félicitation !"); from.CloseGump(typeof(SortCreationGump)); from.SendGump(new SortCreationConfirm(m_owner, m_SortNubia, true)); } } } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID == 99) { int m = choix; Type type = null; try { type = Classe.GetClasse((ClasseType)m); } catch (Exception ex) { from.SendMessage(ex.Message); } if (type != null) { from.LastClasse = (ClasseType)m; int classeNiv = 1; foreach (Classe cl in from.GetClasses()) { if (cl.CType == from.LastClasse) { classeNiv = cl.Niveau + 1; } } //if (creation) //from.GiveNiveau(0); from.MakeClasse(type, classeNiv); // from.GiveNiveau(from.Niveau + 1); } else if (creation) { from.SendGump(new GumpChoixClasse(m_owner, creation)); from.SendMessage(43, "Vous devez choisir une classe"); } from.CloseGump(typeof(GumpChoixClasse)); if (creation) { for (int i = 0; i < from.Skills.Length; i++) { from.Skills[i].Cap = 20.0; from.Skills[i].Base = 0.0; } from.Frozen = false; from.SendGump(new GumpMenuCreation(from)); } else { from.SendGump(new GumpFichePerso(m_owner, m_owner)); } return; } else { choix = info.ButtonID - 100; } from.CloseGump(typeof(GumpChoixClasse)); from.SendGump(new GumpChoixClasse(m_owner, creation, choix)); }