• Web sitemizin içeriğine ve tüm hizmetlerimize erişim sağlamak için Web sitemize kayıt olmalı ya da giriş yapmalısınız. Web sitemize üye olmak tamamen ücretsizdir.
  • Sohbetokey.com ile canlı okey oynamaya ne dersin? Hem sohbet et, hem mobil okey oyna!
  • Soru mu? Sorun mu? ''Bir Sorum Var?'' sistemimiz aktiftir. Paylaşın beraber çözüm üretelim.

ÇOK ACİL YARDIM

Legola

MFC Üyesi
Üyelik Tarihi
24 Kas 2015
Konular
1
Mesajlar
6
MFC Puanı
10
Oynadimiz bi oyun var ve son degisiklikten sonra hata aldik LUTFEN cok acill ekledigimiz yeni script

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
 
Üyelik Tarihi
7 Eki 2015
Konular
91
Mesajlar
216
MFC Puanı
1,450
Oynadimiz bi oyun var ve son degisiklikten sonra hata aldik LUTFEN cok acill ekledigimiz yeni script

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

Selam,

Bu yazılan kodlama baştan aşağı zaten hatalı bir kodlama türü olmuş.Bu yıldızlar(****) ne amaçla eklendi? Yorum amaçlı varsayarsak ki değil /* yorum */ tarzında olur. Bu script asla çalışmaz.
 

Legola

MFC Üyesi
Üyelik Tarihi
24 Kas 2015
Konular
1
Mesajlar
6
MFC Puanı
10
yildizlari ben eklemedm abi onlar kendi kendjne eklenmis sitenizden glba
 
Üyelik Tarihi
7 Eki 2015
Konular
91
Mesajlar
216
MFC Puanı
1,450
Öyleyse biz doğrulayalım ;

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;
                    }

            }
        }
    }
}

Aldığınız hatayı da bize yazar mısınız
 

Legola

MFC Üyesi
Üyelik Tarihi
24 Kas 2015
Konular
1
Mesajlar
6
MFC Puanı
10
sorun orada hatai goremeden hata verio ve kapanio kaldiralim bunu en iiisi
 
Üyelik Tarihi
7 Eki 2015
Konular
91
Mesajlar
216
MFC Puanı
1,450
Kod:
[SIZE=3]case 9:                     {                         from.CloseAllGumps();                         from.SendGump(new yoneticiLog9(from));                                             }[/SIZE]

Case-break(kır)

case 9 da break kullanılmamış ve asla 10 case ye geçmeyecektir doğrusu şu şekilde ;

Kod:
[SIZE=3]case 9:                     {                         from.CloseAllGumps();                         from.SendGump(new yoneticiLog9(from));                        break; [B]//Işlem burada kesilir ve bir alt caseye geçer.[/B]                     }[/SIZE]

Hatayı görmeden başka bir hata var mı bilmek zor. Ayrıca bunu yazan kişinin bu denli bilgisi varsa zaten nerede ne yanlış yaptığını bilmesi gerekiyor. Ben oynadıgınız oyun hakkında bilgiye sahip değilim. Siz bunu tekrardan deneyin verdiğim düzeltmeyle, ben de incelemeye devam edeyim
 
Üyelik Tarihi
7 Eki 2015
Konular
91
Mesajlar
216
MFC Puanı
1,450
Ayrıca bkz :

Kod:
                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;
                    }


Tanımlanan :

Kod:
public HelpGump(Mobile from) : base(0, 0)


Bir diğer atanan :

Kod:
public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

Tam parametre örnek :

Kod:
from.SendGump(new puans1(from));

Yanlış yaptığınız kısım :


Kod:
case 1:
                    {
                        from.CloseAllGumps();
                       [COLOR=Red][U] from.SendGump(new itemid1());[/U]
//gonderilen kim? Kime tanımlanıyor ? burası herzaman hata verecektir[/COLOR]

Doğrusu :

Kod:
case 1:
                    {
                        from.CloseAllGumps();
                        from.SendGump(new itemid1(from));
                        from.SendMessage("Item id menusu hakkinda herhangi bir guncelleme bulunamamistir.");

                        break;
                    }

Saygılarımla,


logo1.png

 

Legola

MFC Üyesi
Üyelik Tarihi
24 Kas 2015
Konular
1
Mesajlar
6
MFC Puanı
10
anlamadm bisey tamamini yazsaniz olmazmii kopy edeym
 
Üyelik Tarihi
7 Eki 2015
Konular
91
Mesajlar
216
MFC Puanı
1,450
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));
                        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));
                    break;
                       
                    }

                               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;
                    }

            }
        }
    }
}

Visual Studio uzerinden yine de UTF8 ile karakter desteğini sağlamayı unutmayın.
 

Legola

MFC Üyesi
Üyelik Tarihi
24 Kas 2015
Konular
1
Mesajlar
6
MFC Puanı
10
Olduu :D ama bu sefer baska script hata verdi bunla alaksiz Teşekkürler adamım +Rep sana
 
Üyelik Tarihi
7 Eki 2015
Konular
91
Mesajlar
216
MFC Puanı
1,450
Kod:
 case 0:                     {                         from.CloseAllGumps();                         from.SendMessage("Yardim menusunu kapattiniz");                         break;                     }                 case 1:                     {                         from.CloseAllGumps();                         from.SendGump(new itemid1(from));                         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));                     break;                                             }                                 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;                     }              }         }     }

Burada bütün varolan menuleri kapatmak, yani ;

Kod:
 from.CloseAllGumps();

Sıkıntı yaratmıyor mu sunucunuz da?
 
Üst