Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 11-04-2006, 01:10 PM   #1 (permalink)
Forum Newbie
 
Join Date: Jan 2006
Posts: 12
Default pls help with Spellbook Name

Please how i can add contian a definition for a name (spellbook) in server.items.spellbook ?
ogggy is offline   Reply With Quote
Old 11-04-2006, 01:15 PM   #2 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

public enum SpellbookType
{
Invalid = -1,
Regular,
Necromancer,
Paladin,
Ninja,
Samurai,

///////////////////////////
// All Spells Edit 1/11 //
///////////////////////////
Druid,
Ancient,
Cleric,
Song,
Undead,
Rogue,
Wizardry,
Avatar,
Ranger
///////////////////////////
// End Edit 1/11 //
///////////////////////////
}
Malaperth is offline   Reply With Quote
Old 11-04-2006, 01:17 PM   #3 (permalink)
Forum Newbie
 
Join Date: Jan 2006
Posts: 12
Default

but i dont need type i need name too
ogggy is offline   Reply With Quote
Old 11-04-2006, 01:19 PM   #4 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

The name of the individual spellbook is not set in the base Spellbook.cs script, it is set in the specific script for the individual spellbook.

Code:
		[Constructable]
		public AncientSpellbook( ulong content ) : base( content, 0xEFA )
		{
			Hue = 1355;
			Name = "Ancient Spellbook";
		}
Malaperth is offline   Reply With Quote
Old 11-04-2006, 01:44 PM   #5 (permalink)
Forum Newbie
 
Join Date: Jan 2006
Posts: 12
Default

\\

protected override void OnTarget( Mobile from, object targeted )
{

ClassControl c_control = null;
bool isLoaded = false;

foreach (Item i in World.Items.Values) {
if (i is ClassControl)
c_control = i as ClassControl;
}

if ( from.Name == null)
{
from.SendMessage("Your name is not valid fix it now");
return;
}

if ( targeted is Spellbook )
{
Spellbook m_book = (Spellbook)targeted;

for (int i=0; i<20; i++)
{
if (m_book.SpellbookType == c_control.LoadBook[i])
{
isLoaded = true;
break;
}
}


if (isLoaded)
{
c_control.LoadBook[c_control.Loaded_Books] = m_book.SpellbookType;
c_control.Loaded_Books += 1;
from.SendMessage(6, m_book.Name + " Spellbook Loaded");
m_book.Delete();
}

else
{
c_control.LoadBook[c_control.Loaded_Books] = m_book.SpellbookType;
c_control.Loaded_Books += 1;
from.SendMessage( 6, m_book.Name + " Spellbook Loaded" );
m_book.Delete();
}
}
else {
from.SendMessage( 0x35, "That is not a Spellbook" );
}
}

pls can u help me chang "m_book.SpellbookType" to "m_book.SpellbookName"

pls
ogggy is offline   Reply With Quote
Old 11-04-2006, 03:03 PM   #6 (permalink)
Forum Expert
 
Lucid Nagual's Avatar
 
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
Smile

Quote:
Originally Posted by ogggy
\\

protected override void OnTarget( Mobile from, object targeted )
{

ClassControl c_control = null;
bool isLoaded = false;

foreach (Item i in World.Items.Values) {
if (i is ClassControl)
c_control = i as ClassControl;
}

if ( from.Name == null)
{
from.SendMessage("Your name is not valid fix it now");
return;
}

if ( targeted is Spellbook )
{
Spellbook m_book = (Spellbook)targeted;

for (int i=0; i<20; i++)
{
if (m_book.SpellbookType == c_control.LoadBook[i])
{
isLoaded = true;
break;
}
}


if (isLoaded)
{
c_control.LoadBook[c_control.Loaded_Books] = m_book.SpellbookType;
c_control.Loaded_Books += 1;
from.SendMessage(6, m_book.Name + " Spellbook Loaded");
m_book.Delete();
}

else
{
c_control.LoadBook[c_control.Loaded_Books] = m_book.SpellbookType;
c_control.Loaded_Books += 1;
from.SendMessage( 6, m_book.Name + " Spellbook Loaded" );
m_book.Delete();
}
}
else {
from.SendMessage( 0x35, "That is not a Spellbook" );
}
}

pls can u help me chang "m_book.SpellbookType" to "m_book.SpellbookName"

pls
m_book.SpellbookType = SpellbookType.Necromancer;
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment.

Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse."


My Customs:
Lucid Nagual is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5