|
using System;
using System.Text;
using Server;
using System.Collections;
using Server.Network;
using Server.Commands;
using Server.Mobiles;
namespace Server.StaffOnline
{
class OnlineCommand
{
public static void Initialize()
{
CommandSystem.Register("StaffOnline", AccessLevel.Player, new CommandEventHandler(StaffOnline_OnCommand));
}
public static void StaffOnline_OnCommand(CommandEventArgs e)
{
ArrayList onStaff = new ArrayList();
//int counter = 0;
bool staffon = false;
for (int i = 0; i < NetState.Instances.Count; i++)
{
Mobile m = ((NetState)NetState.Instances[i]).Mobile;
if (m.AccessLevel > AccessLevel.Player)
{
onStaff.Add(m);
staffon = true;
}
}
e.Mobile.CloseGump(typeof(OnlineGump));
e.Mobile.SendGump(new OnlineGump(staffon, onStaff));
}
}
}OnlineGump.csusing System;
using System.Text;
using Server.Gumps;
using System.Collections;
using Server.Mobiles;
namespace Server.StaffOnline
{
class OnlineGump : Gump
{
public OnlineGump(bool online, ArrayList onStaff)
: base(200, 200)
{
try
{
int imgId = 10850; // online staff yoksa kırmızı yanacak
int hue = 33; // online staff yoksa kırmızı yazacak
string onText = "Online Staff Yok"; // burayı istediğiniz gibi deği$tirebilirsiniz
if (online)
{
hue = 62; // online staff varsa ye$il yazacak
imgId = 10830; // online staff varsa ye$il yanacak
onText = onStaff.Count + " Online Staff Var."; // burayı istediğiniz gibi deği$tirebilirsiniz
}
this.Closable = true;
this.Disposable = true;
this.Dragable = true;
this.Resizable = false;
this.AddPage(0);
this.AddBackground(85, 62, 346, 282, 9270);
this.AddBackground(92, 71, 331, 266, 3500);
this.AddHtml(150, 94, 200, 35, @"<center><big>Staff Durum Sistemi</big></center>", (bool)false, (bool)false);
this.AddImage(173, 145, imgId);
this.AddLabel(214, 151, hue, onText);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
try
{
if (online)
{
string strOutPut = "";
this.AddLabel(112, 190, 0, @"Online Stafflar:");
for (int i = 0; i < onStaff.Count; i++)
{
Mobile m = (Mobile)onStaff[i];
strOutPut += m.Name.ToString() + " : " + m.AccessLevel.ToString() + "<br>";
}
this.AddHtml(114, 213, 286, 100, @"<big>" + strOutPut + "</big>", (bool)true, (bool)true);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
bak bakıyım bugüne kadar paylaştığım hangi scriptin içinde kod var ? Ben de içinde kod olduğunu sen dedinde öğrendim.Konuşmalarına dikkat et biraz.
Kleo :üşengeç olduğum doğru okadar şeyle uğraşıyorum ki koyduğum scriptleri kontrol etmeye zaman bulamıyorum boş zamanlarımdada sana yazıyorum.
Konuşmalarıma dikkat ediyorum fakat koyduğun hazır scriptleri bile düzgün koymamak üşengeçliktir. Paylaşımlarını takip etmedim henüz. RunUO adına katkın nedir bilemem ama hayırlı olsun
|
|
| Konu | Kategori | Son cevap | Son yazan | Mesaj | Görüntüleme | |
|---|---|---|---|---|---|---|
|
|
Erlik UO II RunUO - ServUO
Son cevap: 24-01 20:38 · Son yazan: TheRaskol · Mesaj: 2 · Görüntü: 1796
|
Server Reklam, Tartışma | 24-01 20:38 | 2 | 1796 | |
|
|
Erlik UO PVP Shard (RunUO)
Son cevap: 14-04 01:11 · Son yazan: alonerapper58 · Mesaj: 1 · Görüntü: 2251
|
Server Reklam, Tartışma | 14-04 01:11 | 1 | 2251 | |
|
|
.add & .gm komutu çalışmıyor
Son cevap: 13-04 21:14 · Son yazan: The And · Mesaj: 12 · Görüntü: 4731
|
FUNCTION & EVENTS Script Yardımı | 13-04 21:14 | 12 | 4731 | |
|
|
İn Bin komutu için saniye
Son cevap: 10-02 19:09 · Son yazan: zeezvu · Mesaj: 8 · Görüntü: 3172
|
FUNCTION & EVENTS Script Yardımı | 10-02 19:09 | 8 | 3172 | |
|
|
Yeni RunUO için sistem fikirleri
Son cevap: 17-01 22:58 · Son yazan: tnslova · Mesaj: 2 · Görüntü: 2645
|
Run Ultima Online | 17-01 22:58 | 2 | 2645 |