UO-Dev Arama


Yazar: Lord Streamline
Tarih: 23-08-2009 15:57


Paylaş : Paylaş

Kod:
using System;
using Server;
using System.IO;
using Server.Gumps;
using Server.Mobiles;
using Server.Network;
using System.Net;
using System.Net.Sockets;
using System.Collections;
using Server.Items;
using Server.Spells;
using Server.Accounting;


namespace Server.Gumps
{
public class shardevent : Gump
{
private Point3D m_loc;
private Mobile m;
private static bool m_Enabled;

public static void Initialize()
{
Commands.Register( "PvpEvent", AccessLevel.Player, new CommandEventHandler( Event_OnCommand ) );
Commands.Register( "SetEvent", AccessLevel.GameMaster, new CommandEventHandler( SetEvent_OnCommand ) );
}

public static bool SetEventEnabled
{
get{ return m_Enabled; }
set{ m_Enabled = value; }
}

[Usage( "Set <true | false>" )]
[Description( "Enables or disables Start Quest or Event" )]
public static void SetEvent_OnCommand( CommandEventArgs e )
{
if ( e.Length == 1 )
{
m_Enabled = e.GetBoolean( 0 );
if ( m_Enabled )
{
e.Mobile.SendMessage( "Successful! You have started the Quest or Event." );
World.Broadcast( 0x482, true, String.Format( "Message from {0}: There will be an event starting soon! Please Type [PvpEvent", e.Mobile.Name ) );
}
else
{
e.Mobile.SendMessage("You have canceled the PvpEvent");
World.Broadcast( 0x482, true, String.Format( "Message from {0}: The PvpEvent has been closed", e.Mobile.Name ) );
}

e.Mobile.SendMessage( "PvpEvent has been {0}.", m_Enabled ? "enabled" : "disabled" );
}
else
{
e.Mobile.SendMessage( "Format: SetEvent <true | false>" );
e.Mobile.SendMessage( "SetEvent is currently {0}.", m_Enabled ? "enabled" : "disabled" );
return;
}
}

[Usage( "PvpEvent" )]
[Description( "Go to PvpEvent Place." )]
public static void Event_OnCommand( CommandEventArgs args )
{
if ( m_Enabled )
args.Mobile.SendGump( new shardevent( args.Mobile ) );
else
args.Mobile.SendMessage("No PvpEvent currently running");
}

public shardevent(Mobile from): base( 0, 0 )
{
Closable=false;
Disposable=true;
Dragable=true;
Resizable=false;

m = from;

AddPage( 0 );

AddBackground(32, 30, 253, 125, 9200);

AddImage(280, 20, 10431);
AddImage(279, 130, 10460);
AddImage(267, 5, 10430);

AddButton(39, 112, 10810, 10810,1, GumpButtonType.Reply, 0);
AddLabel(80, 117, 1190, "Cancel");
AddButton(39, 64, 10810, 10810,2, GumpButtonType.Reply, 0);
AddLabel(80, 67, 1190, "Enter the PvpEvent!");
AddLabel(40, 38, 1135, "What do you want to do:");
}

public override void OnResponse( NetState sender, RelayInfo info )
{
Point3D m_curloc = new Point3D(m.X,m.Y,m.Z);

switch ( info.ButtonID )
{
case 1:
{
m.SendMessage( "You decide not to go." );
break;
}
case 2: // pvpevent location
{
m.SendMessage( "You enter the Event!" );
m_loc = new Point3D(5493,1205,0);
MobileTeleport(m, m_loc, m_curloc, Map.Felucca);
break;
}
}
}

public void MobileTeleport( Mobile m, Point3D loc, Point3D cur_loc, Map map )
{
if (m.InRange(loc, 4))
{
m.SendMessage( "You are already there." );
}
else
{
BaseCreature.TeleportPets( m, m_loc, map );
Effects.SendLocationParticles( EffectItem.Create( cur_loc , m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.PlaySound( cur_loc, m.Map, 0x1FE );
m.MoveToWorld( loc, map);
Effects.SendLocationParticles( EffectItem.Create( loc , map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.PlaySound( loc, m.Map, 0x1FE );
}
}
}
}



Yorumlar

Henüz yorum yapılmamıştır.

Oylamalar

Oylama :
Üyelerin oylama ortalaması (10 dışında) : 10.00   
Oylar: 1 den itibaren 11-12-2011 18:55

Benzer Sayfalar

SayfalarYorumlarGönderenTarih
Undead Event0TheRaskol05-08-2009
Crash Fix Event0TheRaskol01-08-2009
Event Yapımı0TheRaskol29-07-2009
Staff Event0TheRaskol28-07-2009
Krallık Event0TheRaskol28-07-2009


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,