UO-Dev Arama


Yazar: Lord Streamline
Tarih: 23-08-2009 16:06


Paylaş : Paylaş

Kod:
using System;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Targeting;

namespace Server.Items
{
public class ItemBlessTarget : Target
{
private ItemBlessDeed m_Deed;

public ItemBlessTarget( ItemBlessDeed deed ) : base( 1, false, TargetFlags.None )
{
m_Deed = deed;
}

protected override void OnTarget( Mobile from, object target )
{
if ( target is Item )
{
Item item = (Item)target;

if ( item.LootType == LootType.Blessed ) // Check if its already newbied (blessed)
{
from.SendLocalizedMessage( 1045113 ); // Seçtiğiniz Item de Zaten Blessed Mevcuttur!
}
else if ( item.LootType != LootType.Regular )
{
from.SendLocalizedMessage( 1045114 ); // You can not bless that item
}
else
{
if ( !(item.IsChildOf( from.Backpack )) ) // Make sure its in their pack
{
from.SendLocalizedMessage( 500509 ); // You cannot bless that object
}
else
{
item.LootType = LootType.Blessed;
from.SendLocalizedMessage( 1010026 ); // You bless the item....

m_Deed.Delete(); // Delete the bless deed
}
}
}
else
{
from.SendLocalizedMessage( 500509 ); // You cannot bless that object
}
}
}

public class ItemBlessDeed : Item // Create the item class which is derived from the base item class
{
[Constructable]
public ItemBlessDeed() : base( 0x14F0 )
{
Weight = 1.0;
Hue = 0;
Name = "an item bless deed";
LootType = LootType.Blessed;
}

public ItemBlessDeed( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
LootType = LootType.Blessed;

int version = reader.ReadInt();
}

public override bool DisplayLootType{ get{ return false; } }

public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target
{
if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
}
else
{
from.SendLocalizedMessage( 500506 ); // Hangi Item inizi Bless Yapmak Istiyorsunuz?
from.Target = new ItemBlessTarget( this ); // Call our target
}
}
}
}



Yorumlar

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

Oylamalar

Oylama :
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış   
Oylar: 0

Benzer Sayfalar

SayfalarYorumlarGönderenTarih
Baslangıc Deed0Robell11-02-2012
Aile Deed0Weight17-04-2011
Mulpatcher İtem Eklemek0TheRaskol17-03-2011
Kargocu(item aktarma)0basic07-04-2010
Str-Dex-Deed0Lucky26-02-2010


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ı,