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 SortCreationChoixRender(NubiaPlayer _owner, SortNubia _SortNubia) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; int largeur = 350; int hauteur = 300; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(col, line * scale, 2116, "Actuelle: " + m_SortNubia.render.ToString()); line++; line++; AddLabel(col, (line * scale), 2224, "Choix d'un rendu:"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 100, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Normal"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 101, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Assombri"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 102, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Eclairci"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 103, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Transparence (Sombre converti en transparence)"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 104, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Transparence (Haute)"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 105, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Transparence (Sur la couleur primaire)"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 106, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Negatif"); line++; line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Annuler"); }
public InternalTarget(SortNubia owner, NubiaPlayer maitre) : base(owner.distance, false, TargetFlags.Beneficial) { m_Owner = owner; m_maitre = maitre; m_maitre.SendMessage("Veuillez cibler votre élève"); }
public enseignementSortChoixComp(SortNubia _owner, NubiaPlayer Maitre, NubiaPlayer Eleve, SortEnergie[] cp) : base(50, 50) { m_owner = _owner; m_maitre = Maitre; m_eleve = Eleve; m_cp = cp; if (m_owner == null || m_maitre == null || m_eleve == null) { return; } int largeur = 300; int hauteur = 250; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; AddLabel(col, (line * scale), 0, m_owner.Owner.Name + " Souhaite vous enseigner une technique:"); line++; AddLabel(col, (line * scale), 2128, m_owner.Nom); line++; line++; AddLabel(col, (line * scale), 0, "Choix de la competence"); line++; for (int i = 0; i < m_cp.Length; i++) //10+ { AddButton(col, (line * scale), 0xFAB, 0xFAC, 10 + i, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 0, /*KonohaCompHelper.getNameComp((CompType)m_cp[i])*/ m_cp[i].ToString()); line++; } /*AddLabel( col, (line*scale), 0, "Disponible: "+m_eleve.pointApprentissage+" points"); * line++; * line++; * * AddButton( col, (line*scale), 0xFAB, 0xFAC, 5, GumpButtonType.Reply, 0 ); //Voir * AddLabel( col+40, line*scale, 2117, "Accepter" ); * line++;*/ line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 6, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 0, "Refuser"); line++; }
public SortCreationConfirm(NubiaPlayer _owner, SortNubia _SortNubia, bool creation) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; m_creation = creation; int largeur = 280; int hauteur = 250; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) if (m_creation) { AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); } else { AddLabel(col, (line * scale), 2224, "Apprentissage d'un nouveau SortNubia"); } line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(col, line * scale, 2116, "Confirmation ?"); line++; line++; AddLabel(col, (line * scale), 2224, "Vous allez obtenir un nouveau SortNubia"); line++; AddLabel(col + 40, line * scale, 0, "Nom: " + m_SortNubia.Nom); line++; AddLabel(col + 40, line * scale, 0, "Emote: " + m_SortNubia.Emote); line++; AddLabel(col + 40, line * scale, 0, "Niveau: " + m_SortNubia.GetCercle()); line++; line++; line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 100, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 2116, "Confirmer"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 103, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Retour"); line++; }
public SortCreationChoixPere(NubiaPlayer _owner, SortNubia _SortNubia) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; int largeur = 450; int hauteur = 450; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(col, line * scale, 2116, "Actuel: " + (m_SortNubia.SortNubiaPere == null ? "Aucun" : m_SortNubia.SortNubiaPere.Nom)); line++; line++; AddLabel(col, (line * scale), 2224, "Choix d'un SortNubia 'Père':"); line++; for (int i = 0; i < m_owner.Magie.sortList.Length; i++) // 100+ { if (!m_owner.Magie.sortList[i].canBePere) { continue; } AddButton(col - 40, (line * scale), 0xFAB, 0xFAC, 100 + i, GumpButtonType.Reply, 0); //Ajout int color = 0; AddLabel(col + 45, (line * scale), color, m_owner.Magie.sortList[i].Nom); line++; if (line > 18) { line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Annuler"); line = 8; col += 200; } } }
public SortCreationChoixCondition(NubiaPlayer _owner, SortNubia _SortNubia) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; int largeur = 300; int hauteur = 300; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(col, line * scale, 2116, "Actuelle: " + m_SortNubia.condition.ToString()); line++; line++; AddLabel(col, (line * scale), 2224, "Choix d'une condition:"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 100, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Aucune"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 101, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Mains nues/Mains libres"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 102, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Objet équipé (Type d'objet)"); line++; /*AddButton( col, (line*scale), 0xFAB, 0xFAC, 100, GumpButtonType.Reply, 0 ); * AddLabel( col+40, line*scale, 0, "Objet aux alentour (Type d'objet)" ); * line++;*/ AddButton(col, (line * scale), 0xFAB, 0xFAC, 103, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "SortNubia 'Père' actif"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Annuler"); line++; }
public enseignementSortPerso(SortNubia _owner, NubiaPlayer Maitre, NubiaPlayer Eleve) : base(50, 50) { m_owner = _owner; m_maitre = Maitre; m_eleve = Eleve; if (m_owner == null || m_maitre == null || m_eleve == null) { return; } int largeur = 300; int hauteur = 250; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; AddLabel(col, (line * scale), 0, "Personnalisation de la technique"); line++; AddLabel(col, line * scale, 0, "Nom :"); AddTextEntry(col + 40, line * scale, 250, 20, 0x480, 0, m_owner.Nom); line++; AddLabel(col, line * scale, 0, "Emote (Sans les '*') :"); AddTextEntry(col + 145, line * scale, 250, 20, 0x480, 1, m_owner.Emote); line++; if (m_owner is SortNubiaInvocationArme) { AddLabel(col, line * scale, 0, "Nom de l'arme:"); AddTextEntry(col + 135, line * scale, 250, 20, 0x480, 2, "Arme invoquée"); line++; } AddButton(col, (line * scale), 0xFAB, 0xFAC, 1000, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 2117, "Accepter"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 6, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 0, "Refuser"); line++; }
public SortCreationBonusGump(NubiaPlayer _owner, SortNubia _SortNubia, int bonusIndex) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; m_bonusIndex = bonusIndex; int largeur = 300; int hauteur = 300; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); //Voir AddLabel(col, line * scale, 2116, "Bonus " + m_bonusIndex); line++; line++; AddLabel(col, (line * scale), 2224, "Choix d'un composant:"); line++; /*for(int i = 0; i < m_SortNubia.Owner.Backpack.Items.Count; i++) * { * if(m_SortNubia.Owner.Backpack.Items[i] is BaseComposant) * { * BaseComposant compo = m_SortNubia.Owner.Backpack.Items[i] as BaseComposant; * AddButton( col, (line*scale), 0xFAB, 0xFAC, 100+i, GumpButtonType.Reply, 0 ); //Voir * AddLabel( col+40, line*scale, 0, compo.Name ); * line++; * } * }*/ AddButton(col, (line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 0, "Annuler"); line++; }
public SortCreationChoixEffet(NubiaPlayer _owner, SortNubia _SortNubia) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; int largeur = 450; int hauteur = 450; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(col, line * scale, 2116, "Actuel: " + m_SortNubia.effect.ToString()); line++; line++; AddLabel(col, (line * scale), 2224, "Choix d'un type d'effet:"); line++; for (int i = 0; i < 22; i++) //100+ { AddButton(col, (line * scale), 0xFAB, 0xFAC, 100 + i, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, SortNubiaHelper.getNameEffect((SortNubiaEffect)i)); line++; if (line > 18) { line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Annuler"); line = 8; col += 200; } } }
public SortCreationChoixCouleur(NubiaPlayer _owner, SortNubia _SortNubia) : base(50, 50) { m_owner = _owner; m_SortNubia = _SortNubia; int largeur = 350; int hauteur = 300; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; //18lignes max ;) AddLabel(col, (line * scale), 2224, "Création d'un nouveau SortNubia"); line++; //AddButton( col, (line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(col, line * scale, 2116, "Actuelle: " + m_SortNubia.couleur.ToString()); line++; line++; AddLabel(col, (line * scale), 2224, "Choix d'une colorie:"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 100, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Normal (couleur de base de l'effet)"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 101, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Chakra (couleur de votre chakra)"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 102, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Connaissance (couleur de la connaissance utilisée)"); line++; line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); AddLabel(col + 40, line * scale, 0, "Annuler"); }
public enseignementSortAccept(SortNubia _owner, NubiaPlayer Maitre, NubiaPlayer Eleve) : base(50, 50) { m_owner = _owner; m_maitre = Maitre; m_eleve = Eleve; if (m_owner == null || m_maitre == null || m_eleve == null) { return; } int largeur = 300; int hauteur = 250; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; AddLabel(col, (line * scale), 0, m_owner.Owner.Name + " Souhaite vous enseigner une technique:"); line++; AddLabel(col, (line * scale), 2128, m_owner.Nom); line++; line++; AddLabel(col, (line * scale), 0, "Coût de l'apprentissage: " + m_owner.GetCercle() + " points"); line++; AddLabel(col, (line * scale), 0, "Disponible: " + m_eleve.pointApprentissage + " points"); line++; line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 5, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 2117, "Accepter"); line++; AddButton(col, (line * scale), 0xFAB, 0xFAC, 6, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 0, "Refuser"); line++; }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile f = sender.Mobile; NubiaPlayer from = f as NubiaPlayer; if (info.ButtonID == 100) // Creation { bool GM = (from.AccessLevel >= AccessLevel.GameMaster); if (m_creation && (from.pointCreation >= m_SortNubia.GetCercle() || GM)) { if (!GM) { from.pointCreation -= m_SortNubia.GetCercle(); } //m_SortNubia.Owner = from; m_SortNubia.Createur = from.Name; from.Magie.addSort(m_SortNubia); return; } else if (!m_creation && (from.pointApprentissage >= m_SortNubia.GetCercle() || GM)) { if (!GM) { from.pointApprentissage -= m_SortNubia.GetCercle(); } //m_SortNubia.Owner = from; m_SortNubia.Createur = from.Name; from.Magie.addSort(m_SortNubia); return; } else { from.SendMessage("Vous n'avez pas assez de points..."); m_SortNubia.Owner = null; m_SortNubia = null; } //m_SortNubia.condition = SortNubiaCondition.MainNue; } if (info.ButtonID != 100) { //from.CloseGump(typeof(SortNubiaCreationChoixCondition)); from.SendGump(new SortCreationGump(m_owner, m_SortNubia)); } }
public SortCreationChoixEnergie(NubiaPlayer _owner, SortNubia _SortNubia) : base("Tissage de sort", 270, 270) { m_owner = _owner; m_SortNubia = _SortNubia; bool GM = (m_owner.AccessLevel >= AccessLevel.GameMaster); int largeur = 450; int hauteur = 450; int x = XBase; int y = YBase; int line = 0; int scale = 22; //18lignes max ;) AddLabel(x, (y + line * scale), ColorTextYellow, "Choix de l'energie"); line++; //AddButton( col, (y+line*scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0 ); AddLabel(x, y + line * scale, ColorTextGreen, "Actuelle: " + SortNubiaHelper.getEnergieString(m_SortNubia.energie)); line++; for (int i = (int)SortEnergie.All + 1; i < (int)SortEnergie.Maximum; i++) // 100+ { SortEnergie energie = (SortEnergie)i; bool allowComp = SortNubiaHelper.calculMaitriseEnergie(energie, m_owner.Energie) > 0; if (!allowComp) { continue; } AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 100 + i, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, ColorTextGreen, SortNubiaHelper.getEnergieString(energie)); line++; } line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 999, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, ColorTextRed, "Annuler"); }
public SortCreationChoixSort(NubiaPlayer _owner, SortNubia _SortNubia) : base("Tissage de sort", 270, 270) { m_owner = _owner; m_SortNubia = _SortNubia; if (m_owner == null || m_SortNubia == null) { Console.WriteLine("GROS WARNING: SortCreationTypeGump proprio ou SortNubia null"); return; } int x = XBase; int y = YBase; int line = 0; int scale = 22; //18lignes max ;) AddLabel(x, (y + line * scale), ColorTextYellow, "Choix du sort de base"); line++; AddLabel(x, y + line * scale, ColorTextGreen, "Actuel: " + SortNubiaHelper.formatName(_SortNubia)); line++; for (int s = 0; s < m_sorts.Length; s++) { if (SortNubiaHelper.calculMaitriseDomaine(m_sorts[s].Domaine, m_owner.Domaine) > 0) { AddButton(x, y + line * scale, 0xFAB, 0xFAC, 50 + s, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorText, SortNubiaHelper.formatName(m_sorts[s])); line++; } } line++; AddButton(x, y + line * scale, 0xFAB, 0xFAC, 1, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorTextRed, "Annuler"); }
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 SortInfoGump(SortNubia _owner) : base(50, 50) { m_owner = _owner; if (m_owner == null) { return; } int largeur = 300; int hauteur = 360; int _x = 50; int _y = 50; AddBackground(_x, _y, _x + largeur, _y + hauteur, 0x13BE); AddBackground(_x + 10, _y + 10, _x + largeur - 20, _y + hauteur - 15, 0x0DAC); AddImage(0, 0, 0x28C8); AddImage(largeur + 70, 0, 0x28C9); AddImage((largeur / 2) - 10, 30, 0x28D4); int y = 45 + _y; int line = 4; int scale = 22; int col = 35 + _y; AddLabel(col, (line * scale), 2128, m_owner.Nom); line++; //List général if (m_owner.Owner != null) { AddLabel(col, (line * scale), 0, "Lié à: " + m_owner.Owner.Name); line++; } if (m_owner.Createur != "") { AddLabel(col, (line * scale), 0, "Createur: " + m_owner.Createur); line++; } AddLabel(col, (line * scale), 0, "Niveau: " + m_owner.GetCercle()); line++; AddLabel(col, (line * scale), 0, "Type: " + m_owner.Domaine); line++; AddLabel(col, (line * scale), 0, "Tps d'execution: " + m_owner.TimeToCast + " secondes"); line++; AddLabel(col, (line * scale), 0, "Tps de chargement: " + m_owner.Delay + " secondes"); line++; AddLabel(col, (line * scale), 0, "Maitrise actuelle: " + m_owner.Maitrise + " %"); line++; if (m_owner.SortNubiaPere != null) { AddLabel(col, (line * scale), 0, "Fils de: " + m_owner.SortNubiaPere.Nom); line++; } //AddLabel( col1, (line*scale)+y, 0, "Créateur: "+ m_owner.Createur == null ? "Inconnu" : m_owner.Createur.Name ); //line++; //if( m_owner.JutsuType == jutsuType.destruction || m_owner.JutsuType == jutsuType.aide ) //{ AddLabel(col, (line * scale), 0, "Portée: " + m_owner.distance); line++; //} line++; AddLabel(col, (line * scale), 2120, "Chakra nessecaire: " + m_owner.chakra); line++; AddLabel(col, (line * scale), 2120, "Competence " + m_owner.energie.ToString() + ": " + m_owner.miniCompetence + " %"); line++; /* AddLabel( col, (line*scale), 2120, "Competence(uo) "+m_owner.skill.ToString()+ ": "+m_owner.miniSkill+" %"); * line++;*/ if (m_owner.Owner.Niveau >= 10 && m_owner.Maitrise >= 100.0) { AddButton(col, (line * scale), 0xFAB, 0xFAC, 5, GumpButtonType.Reply, 0); //Voir AddLabel(col + 40, line * scale, 2117, "Enseigner la technique"); line++; } }
public EquipObjectTarget(SortNubia owner) : base(owner.distance, false, TargetFlags.Harmful) { m_Owner = owner; }
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 SortCreationGump(NubiaPlayer _owner, SortNubia _SortNubia) : base("Tissage de sort", 400, 450) { m_owner = _owner; m_SortNubia = _SortNubia; //m_SortNubia.Owner = m_owner; if (m_owner == null || m_SortNubia == null) { Console.WriteLine("GROS WARNING: justuCreationGump proprio ou SortNubia null"); return; } int x = XBase; int y = YBase; int line = 0; int scale = 22; AddLabel(x, (y + line * scale), ColorTextYellow, "Tissage d'un nouveau sort"); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 998, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, SortNubiaHelper.getHueForPercent((int)SortNubiaHelper.calculMaitriseDomaine(m_SortNubia.Domaine, m_owner.Domaine)), SortNubiaHelper.formatName(m_SortNubia)); line++; if (m_SortNubia is SortNubiaTransformation) // 80+ { SortNubiaTransformation SortNubia = m_SortNubia as SortNubiaTransformation; /* if(SortNubia.toClone != null) * AddLabel( x, y+line*scale, 2122, "Connaissance: "+ KonohaCompHelper.getNameComp(SortNubia.toClone.competenceLie) ); * else * AddLabel( x, y+line*scale, 2122, "Connaissance: Aucune");*/ AddLabel(x, y + line * scale, ColorTextRed, "TODO / TODO / TODO / ..."); line++; } else if (m_SortNubia is SortNubiaInvocation) // 80+ { SortNubiaInvocation SortNubia = m_SortNubia as SortNubiaInvocation; /*if(SortNubia.toClone != null) * AddLabel( x, y+line*scale, 2122, "Connaissance: "+ KonohaCompHelper.getNameComp(SortNubia.toClone.competenceLie) ); * else*/ // AddLabel( x, y+line*scale, 2122, "Connaissance: Aucune"); AddLabel(x, y + line * scale, ColorTextRed, "TODO / TODO / TODO / ..."); line++; } else { AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 997, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, SortNubiaHelper.getHueForPercent((int)SortNubiaHelper.calculMaitriseEnergie(m_SortNubia.energie, m_owner.Energie)), "Energie: " + SortNubiaHelper.getEnergieString(m_SortNubia.energie)); line++; } AddLabel(x, y + line * scale, ColorTextGreen, "Niveau : " + m_SortNubia.GetCercle()); line++; AddLabel(x, y + line * scale, ColorText, "Nom :"); AddTextEntry(x + 40, y + line * scale, 250, 20, 0x480, 0, m_SortNubia.Nom); line++; AddLabel(x, y + line * scale, ColorText, "Emote (Sans les '*') :"); AddTextEntry(x + 145, y + line * scale, 250, 20, 0x480, 1, m_SortNubia.Emote); line++; if (m_SortNubia is SortNubiaDestruction) // 50+ { SortNubiaDestruction SortNubia = m_SortNubia as SortNubiaDestruction; AddLabel(x, y + line * scale, ColorText, "Dégat Mini: "); AddTextEntry(x + 80, y + line * scale, 250, 20, ColorTextLight, 50, SortNubia.minDegat.ToString()); line++; AddLabel(x, y + line * scale, ColorText, "Dégat Maxi: "); AddTextEntry(x + 80, y + line * scale, 250, 20, ColorTextLight, 51, SortNubia.maxDegat.ToString()); line++; AddLabel(x, y + line * scale, ColorText, "Distance: "); AddTextEntry(x + 80, y + line * scale, 250, 20, ColorTextLight, 52, SortNubia.distance.ToString()); line++; AddLabel(x, y + line * scale, ColorText, "Nombre de cible: "); AddTextEntry(x + 105, y + line * scale, 250, 20, ColorTextLight, 53, SortNubia.number.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 54, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorText, "Ciblage: " + (SortNubia.canCible ? "Oui" : "Non")); line++; } if (m_SortNubia is SortNubiaSoin) // 75+ { SortNubiaSoin SortNubia = m_SortNubia as SortNubiaSoin; AddLabel(x, y + line * scale, ColorText, "Soin Mini: "); AddTextEntry(x + 80, y + line * scale, 250, 20, ColorTextLight, 75, SortNubia.minDegat.ToString()); line++; AddLabel(x, y + line * scale, ColorText, "Soin Maxi: "); AddTextEntry(x + 80, y + line * scale, 250, 20, ColorTextLight, 76, SortNubia.maxDegat.ToString()); line++; AddLabel(x, y + line * scale, ColorText, "Distance: "); AddTextEntry(x + 80, y + line * scale, 250, 20, ColorTextLight, 77, SortNubia.distance.ToString()); line++; AddLabel(x, y + line * scale, ColorText, "Nombre de cible: "); AddTextEntry(x + 105, y + line * scale, 250, 20, ColorTextLight, 78, SortNubia.number.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 79, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorText, "Ciblage: " + (SortNubia.canCible ? "Oui" : "Non")); line++; } if (m_SortNubia is SortNubiaTransformation) // 80+ { SortNubiaTransformation SortNubia = m_SortNubia as SortNubiaTransformation; if (SortNubia.toClone == null) { AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 80, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, ColorText, "Ajouter une rune de vie"); line++; } else { AddLabel(x, y + line * scale, ColorTextGreen, "Transformation: " + SortNubia.toClone.Name); line++; /*AddLabel( x, y+line*scale, 0, "Connaissance: " + SortNubia.toClone.competenceLie ); * line++;*/ /* SkillName[] sk = TransfoHelper.getSkillBonus(SortNubia.toClone.competenceLie); * for(int i = 0; i < sk.Length; i++) * { * AddLabel( x, y+line*scale, 0, "Bonus sur: " + sk[i].ToString() ); * line++; * }*/ AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 80, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, ColorTextGreen, "Modifier la rune de vie"); line++; line++; } } if (m_SortNubia is SortNubiaInvocationArme) // 90+ { SortNubiaInvocationArme SortNubia = m_SortNubia as SortNubiaInvocationArme; AddLabel(x, y + line * scale, 0, "L'arme progressera avec vous"); line++; double ratio = SortNubia.wSpeed / 5.0; int MaxDamage = (int)(100 / ratio + (m_owner.Niveau / 2)); int MinDamage = (int)(90 / ratio + (m_owner.Niveau / 3)); AddLabel(x, y + line * scale, 0, "Nom de l'arme: "); AddTextEntry(x + 90, y + line * scale, 250, 20, 0x480, 93, SortNubia.wNom); line++; AddLabel(x, y + line * scale, 0, "Vitesse: "); AddTextEntry(x + 55, y + line * scale, 250, 20, 0x480, 90, SortNubia.wSpeed.ToString()); line++; AddLabel(x, y + line * scale, 0, "Degats approximatifs:"); line++; AddLabel(x + 40, y + line * scale, 0, "- Mini: " + MaxDamage); line++; AddLabel(x + 40, y + line * scale, 0, "- Maxi: " + MinDamage); line++; /*AddButton( x, (y+line*scale), 0xFAB, 0xFAC, 91, GumpButtonType.Reply, 0 ); * AddLabel( x+40, y+line*scale, 0, "Modifier la couleur" ); * line++;*/ AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 92, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, 0, "Modifier l'apparence"); line++; line++; } if (m_SortNubia is SortNubiaTao) // 100+ { SortNubiaTao SortNubia = m_SortNubia as SortNubiaTao; AddLabel(x, y + line * scale, 0, "Dégats bonus: "); AddTextEntry(x + 90, y + line * scale, 250, 20, 0x480, 100, SortNubia.degats.ToString()); line++; AddLabel(x, y + line * scale, 0, "Nbrs de Tours: "); AddTextEntry(x + 90, y + line * scale, 250, 20, 0x480, 101, SortNubia.turn.ToString()); line++; AddLabel(x, y + line * scale, 0, "Sonnage (en secondes x.x): "); AddTextEntry(x + 140, y + line * scale, 250, 20, 0x480, 102, SortNubia.stun.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 103, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Enchainement rapide: " + (SortNubia.rapide ? "Oui":"Non")); line++; } if (m_SortNubia is SortNubiaParalyze) // 110+ { SortNubiaParalyze SortNubia = m_SortNubia as SortNubiaParalyze; AddLabel(x, y + line * scale, 0, "Temps Mini: "); AddTextEntry(x + 80, y + line * scale, 250, 20, 0x480, 110, SortNubia.minDegat.ToString()); line++; AddLabel(x, y + line * scale, 0, "Temps Maxi: "); AddTextEntry(x + 80, y + line * scale, 250, 20, 0x480, 111, SortNubia.maxDegat.ToString()); line++; AddLabel(x, y + line * scale, 0, "Distance: "); AddTextEntry(x + 80, y + line * scale, 250, 20, 0x480, 112, SortNubia.distance.ToString()); line++; AddLabel(x, y + line * scale, 0, "Nombre de cible: "); AddTextEntry(x + 105, y + line * scale, 250, 20, 0x480, 113, SortNubia.number.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 114, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Ciblage: " + (SortNubia.canCible ? "Oui":"Non")); line++; } if (m_SortNubia is SortNubiaPoison) // 120+ { SortNubiaPoison SortNubia = m_SortNubia as SortNubiaPoison; AddLabel(x, y + line * scale, 0, "Note: Le niveau d'un poison va de 0 a 3"); line++; AddLabel(x, y + line * scale, 0, "Niveau du Poison: "); AddTextEntry(x + 80, y + line * scale, 250, 20, 0x480, 120, SortNubia.PoisonLevel.ToString()); line++; AddLabel(x, y + line * scale, 0, "Distance: "); AddTextEntry(x + 80, y + line * scale, 250, 20, 0x480, 121, SortNubia.distance.ToString()); line++; AddLabel(x, y + line * scale, 0, "Nombre de cible: "); AddTextEntry(x + 105, y + line * scale, 250, 20, 0x480, 122, SortNubia.number.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 123, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Ciblage: " + (SortNubia.canCible ? "Oui":"Non")); line++; } if (m_SortNubia is SortNubiaInvocation) // 130+ { SortNubiaInvocation SortNubia = m_SortNubia as SortNubiaInvocation; if (SortNubia.toClone == null) { AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 130, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, 0, "Ajouter une rune de vie"); line++; } else { AddLabel(x, y + line * scale, 0, "Invocation: " + SortNubia.toClone.Name); line++; /*AddLabel( x, y+line*scale, 0, "Connaissance: " + SortNubia.toClone.competenceLie ); * line++;*/ /*SkillName[] sk = TransfoHelper.getSkillBonus(SortNubia.toClone.competenceLie); * for(int i = 0; i < sk.Length; i++) * { * AddLabel( x, y+line*scale, 0, "Bonus sur: " + sk[i].ToString() ); * line++; * }*/ AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 130, GumpButtonType.Reply, 0); AddLabel(x + 40, y + line * scale, 0, "Modifier la rune de vie"); line++; line++; } } if (m_SortNubia is SortNubiaMur) // 135++ { SortNubiaMur SortNubia = m_SortNubia as SortNubiaMur; AddLabel(x, y + line * scale, 0, "Attention, un mur qui bloque ne fait pas de dégats"); line++; AddLabel(x, y + line * scale, 0, "Si vous activez le bloque, mettez les dégats à 0"); line++; AddLabel(x, y + line * scale, 0, "Degats: "); AddTextEntry(x + 80, y + line * scale, 250, 20, 0x480, 135, SortNubia.damageWalk.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 136, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Bloque: " + (SortNubia.block ? "Oui":"Non")); line++; } if (m_SortNubia.playEffect) { AddLabel(x, y + line * scale, 2122, "Effet Visuel"); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 975, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Effet: " + SortNubiaHelper.getNameEffect(m_SortNubia.effect)); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 976, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Couleur: " + m_SortNubia.couleur.ToString()); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 977, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, 0, "Rendu: " + m_SortNubia.render.ToString()); line++; } /*AddLabel( x, y+line*scale, 2122, "Bonus" ); * line++; * AddButton( x, (y+line*scale), 0xFAB, 0xFAC, 950, GumpButtonType.Reply, 0 ); //Voir * AddLabel( x+40, y+line*scale, 0, "Bonus 1" ); * line++; * AddButton( x, (y+line*scale), 0xFAB, 0xFAC, 951, GumpButtonType.Reply, 0 ); //Voir * AddLabel( x+40, y+line*scale, 0, "Bonus 2"); * line++;*/ AddLabel(x, y + line * scale, 2122, "Condition"); line++; AddButton(x, (y + line * scale), 0xFAB, 0xFAC, 925, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorTextLight, m_SortNubia.condition.ToString()); line++; if (m_SortNubia.ObjectToEquip != null) { AddLabel(x + 40, y + line * scale, ColorTextLight, "Objet: " + (m_SortNubia.ObjectToEquip.Name == "" ? m_SortNubia.ObjectToEquip.GetType().ToString() : m_SortNubia.ObjectToEquip.Name)); } if (m_SortNubia.SortNubiaPere != null) { AddLabel(x + 40, y + line * scale, ColorTextLight, "Pere: " + m_SortNubia.SortNubiaPere.Nom); } line++; x += 160; AddButton(x, y + line * scale, 0xFA5, 0xFA7, 999, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorTextYellow, "Mise à jour"); x += 120; AddButton(x, y + line * scale, 0xFA5, 0xFA7, 1000, GumpButtonType.Reply, 0); //Voir AddLabel(x + 40, y + line * scale, ColorTextRed, "Création"); }