Oynadimiz bi oyun var ve son degisiklikten sonra hata aldik LUTFEN cok acill ekledigimiz yeni script
acilll
Kod:
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Menus;
using Server.Menus.Questions;
using Server.Accounting;
using Server.Mobiles;
using Server.Commands;
using Server.Misc;
using Server.Multis;
namespace Server.Engines.Help
{
* * public class ContainedMenu : QuestionMenu
* *{
* * * * private Mobile m_From;
* * * * public ContainedMenu(Mobile from)
* * * * * * : base("Bize gonderdiginiz yardim talebi halen sirada beklemekte. Silinsin mi?", new string[] { "Hayir", "Evet" })
* * * * {
* * * * * * m_From = from;
* * * * }
* * * * public override void OnCancel(NetState state)
* * * * {
* * * * }
* * * * public override void OnResponse(NetState state, int index)
* * * * {
* * * * * * if (index == 1)
* * * * * * {
* * * * * * * * PageEntry entry = PageQueue.GetEntry(m_From);
* * * * * * * * if (entry != null && entry.Handler == null)
* * * * * * * * {
* * * * * * * * * * m_From.SendMessage("Yardım talebini iptal ettiniz.");
* * * * * * * * * * PageQueue.Remove(entry);
* * * * * * * * }
* * * * * * * * else
* * * * * * * * {
* * * * * * * * * * m_From.SendMessage("Yardım talebiniz okunmak üzere sırada bekliyor.");
* * * * * * * * }
* * * * * * }
* * * * }
* * }
* * public class Baslik
* * {
* * * * private String m_Title;
* * * * private int m_ID;
* * * * public String Title
* * * * {
* * * * * * get { return m_Title; }
* * * * * * set { m_Title = value; }
* * * * }
* * * * public int ID
* * * * {
* * * * * * get { return m_ID; }
* * * * * * set { m_ID = value; }
* * * * }
* * * * public Baslik(int id, String title)
* * * * {
* * * * * * m_ID = id;
* * * * * * m_Title = title;
* * * * }
* * }
* * public class Konu
* * {
* * * * private string m_Title;
* * * * private string m_Text;
* * * * private int m_ItemID;
* * * * public String Title
* * * * {
* * * * * * get { return m_Title; }
* * * * * * set { m_Title = value; }
* * * * }
* * * * public String Text
* * * * {
* * * * * * get { return m_Text; }
* * * * * * set { m_Text = value; }
* * * * }
* * * * public int ItemID
* * * * {
* * * * * * get { return m_ItemID; }
* * * * * * set { m_ItemID = value; }
* * * * }
* * * * public Konu(string title, string text, int id)
* * * * {
* * * * * * m_Title = title;
* * * * * * m_Text = text;
* * * * * * m_ItemID = id;
* * * * }
* * }
* * public class HelpGump : Gump
* * {
* * * * public static void Initialize()
* * * * {
* * * * * * EventSink.HelpRequest += new HelpRequestEventHandler(EventSink_HelpRequest);
* * * * }
* * * * private static void EventSink_HelpRequest(HelpRequestEventArgs e)
* * * * {
* * * * * * foreach (Gump g in e.Mobile.NetState.Gumps)
* * * * * * {
* * * * * * * * if (g is HelpGump)
* * * * * * * * * * return;
* * * * * * }
* * * * * * if (!PageQueue.CheckAllowedToPage(e.Mobile))
* * * * * * * * return;
* * * * * * if (PageQueue.Contains(e.Mobile))
* * * * * * * * e.Mobile.SendMenu(new ContainedMenu(e.Mobile));
* * * * * * else
* * * * * * * * e.Mobile.SendGump(new HelpGump(e.Mobile));
* * * * }
* * * * private static bool IsYoung(Mobile m)
* * * * {
* * * * * * if (m is PlayerMobile)
* * * * * * * * return ((PlayerMobile)m).Young;
* * * * * * return false;
* * * * }
* * * * public static bool CheckCombat(Mobile m)
* * * * {
* * * * * * for (int i = 0; i < m.Aggressed.Count; ++i)
* * * * * * {
* * * * * * * * AggressorInfo info = (AggressorInfo)m.Aggressed[i];
* * * * * * * * if (DateTime.Now - info.LastCombatTime < TimeSpan.FromSeconds(30.0))
* * * * * * * * * * return true;
* * * * * * }
* * * * * * return false;
* * * * }
* * * * public HelpGump(Mobile from) : base(0, 0)
* * * * {
* * * * * * this.Closable = true;
* * * * * * this.Disposable = true;
* * * * * * this.Dragable = true;
* * * * * * this.Resizable = false;
* * * * * * AddPage(0);
* * * * * * AddImageTiled(75, 64, 637, 46, 3004);
* * * * * * AddLabel(86, 75, 52, @"Immortal Land UO");
* * * * * * AddImageTiled(238, 66, 4, 44, 3003);
* * * * * * AddImageTiled(171, 132, 541, 250, 3004);
* * * * * * AddImageTiled(370, 66, 4, 44, 3003);
* * * * * * AddImageTiled(515, 65, 4, 44, 3003);
* * * * * * AddImageTiled(709, 65, 4, 316, 3003);
* * * * * * AddImageTiled(171, 109, 537, 1, 3001);
* * * * * * AddLabel(267, 74, 67, @"Item Id Sistemi");
* * * * * * AddLabel(395, 73, 67, @"Puanlama Sistemi");
* * * * * * AddHtml(215, 169, 428, 176, @"<BASEFONT COLOR=#22FF22>Güncel bir duyuru henüz bulunamadı.</BASEFONT>", (bool)false, (bool)true);
* * * * * * AddLabel(360, 144, 86, @" *Ana Menu");//main menu
* * * * * * AddButton(246, 77, 2117, 2117, 1, GumpButtonType.Reply, 0);
* * * * * * AddButton(376, 76, 2117, 2117, 2, GumpButtonType.Reply, 0);
* * * * * * AddLabel(556, 74, 67, @"Oyuncu Komutlari");
* * * * * * AddButton(535, 78, 2117, 2117, 3, GumpButtonType.Reply, 0);
* * * * * * AddImageTiled(168, 110, 541, 22, 3004);
* * * * * * AddImageTiled(75, 107, 96, 275, 3004);
* * * * * * AddImageTiled(172, 107, 4, 274, 3003);
* * * * * * AddLabel(93, 127, 62, @"Kurallar");
* * * * * * AddImageTiled(74, 381, 637, 1, 3001);
* * * * * * AddImageTiled(77, 108, 160, 2, 3001);
* * * * * * AddLabel(93, 156, 62, @"Etk Takvim");
* * * * * * AddLabel(93, 187, 62, @"Kale Savasi");
* * * * * * AddLabel(93, 251, 62, @"Olum Kalesi");
* * * * * * AddLabel(93, 311, 62, @"Page Gonder");
* * * * * * AddLabel(93, 218, 62, @"Pinkodu" ); ;
* * * * * * AddImageTiled(174, 163, 166, 2, 3001);
* * * * * * AddImageTiled(498, 164, 206, 2, 3001);
* * * * * * AddButton(318, 351, 247, 248, 12, GumpButtonType.Reply, 0);
* * * * * * AddButton(457, 351, 241, 241, 13, GumpButtonType.Reply, 0);
* * * * * * AddLabel(93, 337, 62, @"Takilma Cek");
* * * * * * AddImageTiled(338, 109, 3, 53, 3003);
* * * * * * AddImageTiled(499, 109, 3, 53, 3003);
* * * * * * AddLabel(379, 115, 52, @""+ DateTimeKind.Local.ToString()); //day
* * * * * * AddImageTiled(338, 136, 162, 2, 3001);
* * * * * * AddLabel(206, 117, 52, @""+ DateTime.Now.Date.ToString()); // date
* * * * * * AddLabel(223, 138, 62, @"" + from.Name.ToString()); //time of day
* * * * * * AddLabel(550, 114, 52, @"Cevrimici Yonetici");
* * * * * * AddLabel(558, 137, 62, @""+ " " + " List : " + StaffNumarasi(from).ToString()); //staf göstergesi
* * * * * * AddImageTiled(522, 135, 162, 2, 3001);
* * * * * * AddImageTiled(520, 109, 3, 27, 3003);
* * * * * * AddImageTiled(680, 109, 3, 27, 3003);
* * * * * * AddImageTiled(175, 135, 162, 2, 3001);
* * * * * * AddLabel(93, 282, 62, @"Yonetim Log");
* * * * * * AddImageTiled(78, 308, 93, 2, 3001);
* * * * * * AddButton(75, 130, 2117, 2117, 4, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 160, 2117, 2117, 5, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 190, 2117, 2117, 6, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 221, 2117, 2117, 7, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 253, 2117, 2117, 8, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 285, 2117, 2117, 9, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 313, 2117, 2117, 10, GumpButtonType.Reply, 0);
* * * * * * AddButton(75, 339, 2117, 2117, 11, GumpButtonType.Reply, 0);
* * * * * * AddImageTiled(76, 64, 634, 4, 3007);
* * * * * * AddImageTiled(71, 65, 4, 316, 3003);
* * * * * * AddImageTiled(331, 164, 206, 2, 3001);
* * * * * * AddImageTiled(295, 347, 242, 2, 3001);
* * * * * * AddImageTiled(297, 346, 3, 34, 3003);
* * * * * * AddImageTiled(297, 378, 242, 2, 3001);
* * * * * * AddImageTiled(534, 346, 3, 34, 3003);
* * * * * * AddImageTiled(211, 164, 3, 186, 3003);
* * * * * * AddImageTiled(209, 347, 440, 2, 3001);
* * * * * * AddImageTiled(646, 169, 3, 178, 3003);
* * * * }
* * * * public static int StaffNumarasi(Mobile from)//Staff sayısı.
* * * * {
* * * * * * int AktifStaff = 0;
* * * * * * foreach (NetState net in NetState.Instances)
* * * * * * {
* * * * * * * * if (net != null && net.Mobile != null && net.Mobile.AccessLevel > AccessLevel.Player)
* * * * * * * * * * AktifStaff++;
* * * * * * }
* * * * * * return AktifStaff;
* * * * }//Staff sayısı bitiÅ.
* * * * public override void OnResponse(NetState sender, RelayInfo info)
* * * * {
* * * * * * Mobile from = sender.Mobile;
* * * * * * switch (info.ButtonID)
* * * * * * {
* * * * * * * * case 0:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendMessage("Yardim menusunu kapattiniz");
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 1:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new itemid1());
* * * * * * * * * * * * from.SendMessage("Item id menusu hakkinda herhangi bir guncelleme bulunamamistir.");
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 2:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new puans1(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 3: {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new oyuncukomuts1(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 4: {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new kurallars4(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 5:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new etkt5(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 6: {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new kaleSavasi6(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 7:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new pinKodu7(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 8:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new olumKalesi8(from));
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 9:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendGump(new yoneticiLog9(from));
* * * * * * * * * * * *
* * * * * * * * * * }
* * * * * * * * * * * * * * * *case 10:
* * * * * * * * * * {
* * * * * * * * * * * * if (StaffNumarasi(from) != 0)//eÄer staff varsa.
* * * * * * * * * * * * {
* * * * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * * * from.SendGump(new PagePromptGump(from, PageType.Genel));
* * * * * * * * * * * * }
* * * * * * * * * * * * else
* * * * * * * * * * * * {
* * * * * * * * * * * * * * from.SendMessage(36, "Size yardim edecek bir yetkili bulunmamaktadır.\nBu yüzden Åu an yardım talebi gönderemezsiniz.");
* * * * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * * * from.SendGump(new HelpGump(from));
* * * * * * * * * * * * }
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * * * case 11:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseGump(typeof(HelpGump));
* * * * * * * * * * * * {
* * * * * * * * * * * * * * BaseHouse house = BaseHouse.FindHouseAt(from);
* * * * * * * * * * * * * * if (house != null && house.IsAosRules)
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * from.Location = house.BanLocation;
* * * * * * * * * * * * * * }
* * * * * * * * * * * * * * else if (from.Region is Server.Regions.Jail)
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * from.SendMessage(0x35, "Daha iyi bir kaçıŠplanına ihtiyacınız var gibi görünüyor");
* * * * * * * * * * * * * * }
* * * * * * * * * * * * * * else if (Factions.Sigil.ExistsOn(from))
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * from.SendMessage(0x35, "Sigil taÅırken bunu yapamazsın.");
* * * * * * * * * * * * * * }
* * * * * * * * * * * * * * else if (/*from.CanUseStuckMenu() &&*/ from.Region.CanUseStuckMenu(from) && !CheckCombat(from) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5))
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * StuckMenu menu = new StuckMenu(from, from, true);
* * * * * * * * * * * * * * * * menu.BeginClose();
* * * * * * * * * * * * * * * * from.SendGump(menu);
* * * * * * * * * * * * * * }
* * * * * * * * * * * * * * else
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * from.SendMessage(32, "Takılma hakkınız kalmamıÅtır.");
* * * * * * * * * * * * * * }
* * * * * * * * * * * * * * break;
* * * * * * * * * * * * }
* * * * * * * * * * }
* * * * * * * * case 12:
* * * * * * * * * * {
* * * * * * * * * * * * from.CloseAllGumps();
* * * * * * * * * * * * from.SendMessage(58, "Menuden ayrıldınız");
* * * * * * * * * * * * break;
* * * * * * * * * * }
* * * * * * }
* * * * }
* * }
}
acilll