Jump to content
Forumu Destekleyenlere Katılın ×
Paticik Forumları
2000 lerden beri faal olan, çok şukela bir paylaşım platformuyuz. Hoşgeldiniz.

Scriptleri nasi kaydedioruz


Öne çıkan mesajlar

Mesaj tarihi:
scripts kalsörüne .cs uzantısıyla atacaksın..
ama RunUO'nun scriptleri sphere gibi değildir..
mesela;
said:

// ##################################
// # Weapon Bless Deed #
// # Name: WeaponBlessDeed.cs #
// # Author: Fallen #
// # Date: 25th May 2003 #
// # Version: 1.0 #
// ##################################
// # Based on ClothingBlessDeed.cs #
// # Written by RunUo Devs #
// ##################################

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

namespace Server.Items
{
public class WeaponBlessTarget : Target // Create our targeting class (which we derive from the base target class)
{
private WeaponBlessDeed m_Deed;

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

protected override void OnTarget( Mobile from, object target ) // Override the protected OnTarget() for our feature
{
if ( target is BaseWeapon )
{
Item item = (Item)target;

if ( item.LootType == LootType.Blessed ) // Check if its already blessed
{
from.SendLocalizedMessage( 1045113 ); // That item is already blessed
}
else if ( item.LootType == LootType.Newbied ) // Check if its Newbified
{
from.SendLocalizedMessage( 1045113 ); // That item is already blessed
}
else
{
if( item.RootParent != from ) // Make sure its in their pack or they are wearing it
{
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 WeaponBlessDeed : Item // Create the item class which is derived from the base item class
{
[Constructable]
public WeaponBlessDeed() : base( 0x14F0 )
{
Weight = 1.0;
Name = "a weapon bless deed";
LootType = LootType.Blessed;
}

public WeaponBlessDeed( 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 ); // What item would you like to bless?
from.Target = new WeaponBlessTarget( this ); // Call our target
}
}
}
}


VEYA,


bilgisayarı startup diskiyle başlat..
ms dos'tan şunu yas..
format c:
sonra hiç acı olmıyacak..
herşeyden kurtulacan..


bu da ayrı bi alternatif tabii..

[Bu mesaj FoRMaT_C tarafından 13 August 2003 13:18 tarihinde değiştirilmiştir]
×
×
  • Yeni Oluştur...