|
||
|
|
#1 (permalink) |
|
Join Date: Feb 2004
Posts: 61
|
Summary:
You double click it and you enter the land of the dead for 60 seconds. When you wear it you get the name mod "A ghost of the night". i did use sections from the hooded shroud script(made by Biscuit). however i added and came up with this new concept. Hope you enjoy it. comes with a female and male version to make sure there are no sex changes. Hope you enjoy it:P Description: Installation: shove it in ur custom scripts folder |
|
|
|
|
|
#2 (permalink) | |
|
Join Date: May 2004
Age: 33
Posts: 39
|
Quote:
Nice job thanks ![]() |
|
|
|
|
|
|
#6 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
![]()
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#9 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#11 (permalink) | |
|
Join Date: Feb 2004
Posts: 61
|
Quote:
|
|
|
|
|
|
|
#15 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
|
#19 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: Germany (american though)
Age: 33
Posts: 957
|
try this:
(i labeled the file Shroud_of_the_Dead.cs) Code:
using System;
using Server;
using Server.Items;
namespace Server.Items
{
[FlipableAttribute( 0x2683, 0x2684 )]
public class Shroud_of_the_Dead : BaseOuterTorso
{
private Mobile mob;
private Timer MyTimer;
private int m_Gender;
[Constructable]
public Shroud_of_the_Dead() : base( 0x2683 )
{
Weight = 5.0;
Name = "Shroud of the Dead";
Layer = Layer.OuterTorso;
}
public override void OnDoubleClick( Mobile m )
{
if( Parent != m ) { m.SendMessage( "You must be wearing the robe to use it!" ); }
else
{
m_Gender = m.Body;
MyTimer = new CountdownTimer(m, this);
MyTimer.Start();
m.SendMessage( "You are now dead." );
m.PlaySound( 0x57 );
m.Body = 402;
m.NameMod = null;
m.RemoveItem(this);
m.EquipItem(this);
if( m.Kills >= 5) { m.Criminal = true; }
if( m.GuildTitle != null) { m.DisplayGuildTitle = true; }
}
}
public override void OnDoubleClickDead( Mobile m )
{
if( Parent != m ) { m.SendMessage( "You must be wearing the robe to use it!" ); }
else
{
if ( m.Body == 403 || m.Body == 402 )
{
m.SendMessage( "You return to the real world." );
m.NameMod = "a ghost of the night";
m.Body = m_Gender;
m.RemoveItem(this);
m.EquipItem(this);
}
}
}
public override bool OnEquip( Mobile from )
{
if ( ItemID == 0x2683 )
{
from.NameMod = "a ghost of the night";
from.DisplayGuildTitle = false;
from.Criminal = false;
}
return base.OnEquip(from);
}
public override void OnRemoved( Object o )
{
if( o is Mobile ) { ((Mobile)o).NameMod = null; }
if( o is Mobile && ((Mobile)o).Kills >= 5) { ((Mobile)o).Criminal = true; }
if( o is Mobile && ((Mobile)o).GuildTitle != null ) { ((Mobile)o).DisplayGuildTitle = true; }
base.OnRemoved( o );
}
public Shroud_of_the_Dead( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int) m_Gender);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Gender = reader.ReadInt();
}
public class CountdownTimer: Timer
{
private int m_Ticker;
private Mobile m_Mobile;
private Shroud_of_the_Dead robe;
public CountdownTimer( Mobile mobile, Shroud_of_the_Dead U_Robe ): base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.0 ) )
{
m_Mobile = mobile;
robe = U_Robe;
Priority = TimerPriority.TwoFiftyMS;
m_Ticker = 60;
}
protected override void OnTick()
{
try
{
switch (m_Ticker)
{
case 60: m_Mobile.SendMessage("60 seconds..."); break;
case 50: m_Mobile.SendMessage("50 seconds..."); break;
case 40: m_Mobile.SendMessage("40 seconds..."); break;
case 30: m_Mobile.SendMessage("30 seconds..."); break;
case 20: m_Mobile.SendMessage("20 seconds..."); break;
case 10: m_Mobile.SendMessage("10 seconds..."); break;
case 8: m_Mobile.SendMessage("7 seconds..."); break;
case 7: m_Mobile.SendMessage("6 seconds..."); break;
case 6: m_Mobile.SendMessage("5 seconds..."); break;
case 5: m_Mobile.SendMessage("4 seconds..."); break;
case 4: m_Mobile.SendMessage("3 seconds..."); break;
case 3: m_Mobile.SendMessage("2 seconds..."); break;
case 2: m_Mobile.SendMessage("1 second..." ); break;
case 1: m_Mobile.SendMessage("You return to living!!", m_Ticker.ToString() ); break;
case 0: m_Mobile.Body = 400; this.Stop(); break;
// default: break;
}
}
catch
{
}
m_Ticker--;
}
}
}
}
**edit** i only used a different name and label for a few reasons: 1. personal taste: death shroud and hooded shroud already exist. as this is an item that allows a non dead person to enter the realm of the dead, "shroud of the dead" seemed appropriate, and you cant confuse it with the other two existing shrouds. 2. your convenience - you wont have to overwrite your version to test this one. |
|
|
|
|
|
#22 (permalink) |
|
P3'c Orion Aviator
Join Date: Sep 2004
Age: 30
Posts: 1,272
|
I kinda like this idea, i havnt looked at the code, but i imagine it changes your bodyvalue to that of the deads to everything is black and white? You should put a cariable serialized in its properties that marks the sex of the player.
So when you double click it saves their sex, then changes body depending on sex, then once 60 seconds is up, it checks the variable and sets them back accordingly. -Jamie |
|
|
|
|
|
#23 (permalink) |
|
Forum Novice
|
And should also make a player able to cross any locked door made by GMs for a quest. I also thinkg that they will go over traps withotu activating it(although I might be wrong). If you are 0 lagged, you can cross a largecorridor full of traps and locked/trapped doors with that. I really liked this addition, just want to call attention to this fact.
|
|
|
|
|
|
#25 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Location: Germany (american though)
Age: 33
Posts: 957
|
hmm it changed your name and didnt save your original name?
or its like incognito, if i log off with incognito then log in, it shows the incog name. after it wears off and i log out and back in again, the name is right again. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|