RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Druidic Spells Final-all 16 spells - updated 6th Jan 04

Status
Not open for further replies.

ViWinfii

Sorceror
Voran,

I noticed that your spellbook gives the descriptions of all the spells before you actually acquire them. I was wondering if you want a fix for that, that is, a modified spellbook that adds description pages of spells only after you learn them.
 

Voran

Wanderer
I wouldn't say no, if you have one to hand :) I never spent the time working it out, because I wanted my players to see what was available, but I'd certainly appreciate it if you have one.
 

ViWinfii

Sorceror
Certainly, I will share it with you. Here it is:

ModifiedDruidSpellbookGump.cs

[code:1]using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
using Server.Spells;
using Server.Spells.Druid;
using Server.Prompts;

namespace Server.Gumps
{
public class DruidicSpellbookGump : Gump
{
private DruidicSpellbook m_Book;

int gth = 0x903;
private void AddBackground()
{
AddPage( 0 );

AddImage( 100, 10, 0x89B, 0 );
// AddImage( 255, 10, 0x8AD, 0x48B );



// AddLabel( 140, 45, gth, "Ohm - Earth" );
// AddLabel( 140, 60, gth, "Ess - Air" );
// AddLabel( 140, 75, gth, "Crur - Fire" );
// AddLabel( 140, 90, gth, "Sepa - Water" );
// AddLabel( 140, 110, gth, "Kes - One" );
// AddLabel( 140, 125, gth, "Sec - Whole" );
// AddLabel( 140, 140, gth, "En - Call" );
// AddLabel( 140, 155, gth, "Vauk - Banish" );
// AddLabel( 140, 170, gth, "Tia - Befoul" );
// AddLabel( 140, 185, gth, "Ante - Cleanse" );

}

public static bool HasSpell( Mobile from, int spellID )
{
Spellbook book = Spellbook.Find( from, spellID );
return ( book != null && book.HasSpell( spellID ) );
}


public DruidicSpellbookGump( Mobile from, DruidicSpellbook book ) : base( 150, 200 )
{

m_Book = book;
AddBackground();
AddPage( 1 );
AddLabel( 150, 17, gth, "Natural Magic" );
int sbtn = 0x93A;
int dby = 40;
int dbpy = 40;;
AddButton( 396, 14, 0x89E, 0x89E, 17, GumpButtonType.Page, 2 );

if (HasSpell( from, 316) )
{
AddLabel( 145, dbpy, gth, "Summon Firefly" );
AddButton( 125, dbpy + 3, sbtn, sbtn, 16, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 302) )
{
AddLabel( 145, dby, gth, "Hollow Reed" );
AddButton( 125, dby + 3, sbtn, sbtn, 2, GumpButtonType.Reply, 1 );
dby = dby + 20;

}
if (HasSpell( from, 303) )
{
AddLabel( 145, dby, gth, "Pack Of Beasts" );
AddButton( 125, dby + 3, sbtn, sbtn, 3, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 304) )
{
AddLabel( 145, dby, gth, "Spring Of Life" );
AddButton( 125, dby + 3, sbtn, sbtn, 4, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 305) )
{
AddLabel( 145, dby, gth, "Grasping Roots" );
AddButton( 125, dby + 3, sbtn, sbtn, 5, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 306) )
{
AddLabel( 145, dby, gth, "Blend With Forest" );
AddButton( 125, dby + 3, sbtn, sbtn, 6, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 307) )
{
AddLabel( 145, dby, gth, "Swarm Of Insects" );
AddButton( 125, dby + 3, sbtn, sbtn, 7, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 308) )
{
AddLabel( 145, dby, gth, "Volcanic Eruption" );
AddButton( 125, dby + 3, sbtn, sbtn, 8, GumpButtonType.Reply, 1 );
}
if (HasSpell( from, 309) )
{
AddLabel( 315, dbpy, gth, "Summon Treefellow" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 9, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 310) )
{
AddLabel( 315, dbpy, gth, "Stone Circle" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 10, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 311) )
{
AddLabel( 315, dbpy, gth, "Enchanted Grove" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 11, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 312) )
{
AddLabel( 315, dbpy, gth, "Lure Stone" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 12, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 313) )
{
AddLabel( 315, dbpy, gth, "Nature's Passage" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 13, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 314) )
{
AddLabel( 315, dbpy, gth, "Mushroom Gateway" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 14, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 315) )
{
AddLabel( 315, dbpy, gth, "Restorative Soil" );
AddButton( 295, dbpy + 3, sbtn, sbtn, 15, GumpButtonType.Reply, 1 );
dbpy = dbpy + 20;
}
if (HasSpell( from, 301) )
{
AddLabel( 315, dby, gth, "Shield Of Earth" );
AddButton( 295, dby + 3, sbtn, sbtn, 1, GumpButtonType.Reply, 1 );

}

int i = 2;

if (HasSpell( from, 316) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Summon Firefly" );
AddHtml( 130, 59, 123, 132, "Summons a tiny firefly to light the Druid's path. The Firefly is a weak creature with little or no combat skills.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Sulfurous Ash" );
AddLabel( 295, 77, gth, "Destroying Angel" );
AddLabel( 295, 167, gth, "Required Skill: 1" );
AddLabel( 295, 187, gth, "Required Mana: 10" );
i++;
}

if (HasSpell( from, 302) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Hollow Reed" );
AddHtml( 130, 59, 123, 132, "Increases both the strength and the intelligence of the Druid.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Bloodmoss" );
AddLabel( 295, 77, gth, "Mandrake Root" );
AddLabel( 295, 97, gth, "Nightshade" );
AddLabel( 295, 167, gth, "Required Skill: 30" );
AddLabel( 295, 187, gth, "Required Mana: 30" );
i++;
}

if (HasSpell( from, 303) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Pack Of Beasts" );
AddHtml( 130, 59, 123, 132, "Summons a pack of beasts to fight for the Druid. Spell length increases with skill.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Bloodmoss" );
AddLabel( 295, 77, gth, "Black Pearl" );
AddLabel( 295, 97, gth, "Petrified Wood" );
AddLabel( 295, 167, gth, "Required Skill: 40" );
AddLabel( 295, 187, gth, "Required Mana: 45" );
i++;
}
if (HasSpell( from, 304) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Spring Of Life" );
AddHtml( 130, 59, 123, 132, "Creates a magical spring that heals the Druid and their party.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Spring Water" );
AddLabel( 295, 77, gth, "Spring Water" );
AddLabel( 295, 167, gth, "Required Skill: 40" );
AddLabel( 295, 187, gth, "Required Mana: 40" );
i++;
}
if (HasSpell( from, 305) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Grasping Roots" );
AddHtml( 130, 59, 123, 132, "Summons roots from the ground to entangle a single target.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Bloodmoss" );
AddLabel( 295, 77, gth, "Spring Water" );
AddLabel( 295, 97, gth, "Spiders Silk" );
AddLabel( 295, 167, gth, "Required Skill: 40" );
AddLabel( 295, 187, gth, "Required Mana: 40" );
i++;
}
if (HasSpell( from, 306) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Blend With Forest" );
AddHtml( 130, 59, 123, 132, "The Druid blends seamlessly with the background, becoming invisible to their foes.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Bloodmoss" );
AddLabel( 295, 77, gth, "Nightshade" );
AddLabel( 295, 167, gth, "Required Skill: 75" );
AddLabel( 295, 187, gth, "Required Mana: 60" );
i++;
}
if (HasSpell( from, 307) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Swarm Of Insects" );
AddHtml( 130, 59, 123, 132, "Summons a swam of insects that bite and sting the Druid's enemies.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Garlic" );
AddLabel( 295, 77, gth, "Nightshade" );
AddLabel( 295, 97, gth, "Destroying Angel" );
AddLabel( 295, 167, gth, "Required Skill: 85" );
AddLabel( 295, 187, gth, "Required Mana: 70" );
i++;
}
if (HasSpell( from, 308) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Volcanic Eruption" );
AddHtml( 130, 59, 123, 132, "A blast of molten lava bursts from the ground, hitting every enemy nearby.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Sulfurous Ash" );
AddLabel( 295, 77, gth, "Destroying Angel" );
AddLabel( 295, 167, gth, "Required Skill: 98" );
AddLabel( 295, 187, gth, "Required Mana: 85" );
i++;
}
if (HasSpell( from, 309) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Summon Treefellow" );
AddHtml( 130, 59, 123, 132, "Summons a powerful woodland spirit to fight for the Druid.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Bloodmoss" );
AddLabel( 295, 77, gth, "Black Pearl" );
AddLabel( 295, 97, gth, "Petrified Wood" );
AddLabel( 295, 167, gth, "Required Skill: 80" );
AddLabel( 295, 187, gth, "Required Mana: 50" );
i++;
}
if (HasSpell( from, 310) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Stone Circle" );
AddHtml( 130, 59, 123, 132, "Forms an impassable circle of stones, ideal for trapping enemies.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Black Pearl" );
AddLabel( 295, 77, gth, "Ginseng" );
AddLabel( 295, 97, gth, "Spring Water" );
AddLabel( 295, 167, gth, "Required Skill: 60" );
AddLabel( 295, 187, gth, "Required Mana: 45" );
i++;
}
if (HasSpell( from, 311) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Enchanted Grove" );
AddHtml( 130, 59, 123, 132, "Causes a grove of magical trees to grow.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Petrified Wood" );
AddLabel( 295, 77, gth, "Mandrake Root" );
AddLabel( 295, 97, gth, "Spring Water" );
AddLabel( 295, 167, gth, "Required Skill: 95" );
AddLabel( 295, 187, gth, "Required Mana: 60" );
i++;
}
if (HasSpell( from, 312) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Lure Stone" );
AddHtml( 130, 59, 123, 132, "Creates a magical stone that calls all nearby animals to it.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Black Pearl" );
AddLabel( 295, 77, gth, "Spring Water" );
AddLabel( 295, 167, gth, "Required Skill: 15" );
AddLabel( 295, 187, gth, "Required Mana: 30" );
i++;
}
if (HasSpell( from, 313) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Nature's Passage" );
AddHtml( 130, 59, 123, 132, "The Druid is turned into flower petals and carried on the wind to a recall rune location.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Black Pearl" );
AddLabel( 295, 77, gth, "Bloodmoss" );
AddLabel( 295, 97, gth, "Mandrake Root" );
AddLabel( 295, 167, gth, "Required Skill: 15" );
AddLabel( 295, 187, gth, "Required Mana: 10" );
i++;
}
if (HasSpell( from, 314) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Mushroom Gateway" );
AddHtml( 130, 59, 123, 132, "A magical circle of mushrooms opens, allowing the Druid to step through it to another location.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Black Pearl" );
AddLabel( 295, 77, gth, "Spring Water" );
AddLabel( 295, 97, gth, "Mandrake Root" );
AddLabel( 295, 167, gth, "Required Skill: 70" );
AddLabel( 295, 187, gth, "Required Mana: 40" );
i++;
}
if (HasSpell( from, 315) )
{
AddPage( i );
AddButton( 396, 14, 0x89E, 0x89E, 18, GumpButtonType.Page, i+1 );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Restorative Soil" );
AddHtml( 130, 59, 123, 132, "Saturates a patch of land with power, causing healing mud to seep through . The mud can restore the dead to life.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Garlic" );
AddLabel( 295, 77, gth, "Ginseng" );
AddLabel( 295, 97, gth, "Spring Water" );
AddLabel( 295, 167, gth, "Required Skill: 89" );
AddLabel( 295, 187, gth, "Required Mana: 55" );
i++;
}
if (HasSpell( from, 301) )
{
AddPage( i );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
AddLabel( 150, 37, gth, "Shield Of Earth" );
AddHtml( 130, 59, 123, 132, "A quick-growing wall of foliage springs up at the bidding of the Druid.", false, false );
AddLabel( 295, 37, gth, "Reagents:" );
AddLabel( 295, 57, gth, "Ginseng" );
AddLabel( 295, 77, gth, "Spring Water" );
AddLabel( 295, 167, gth, "Required Skill: 20" );
AddLabel( 295, 187, gth, "Required Mana: 15" );
i++;
}

AddPage( i );
AddButton( 123, 15, 0x89D, 0x89D, 19, GumpButtonType.Page, i-1 );
}





public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
switch ( info.ButtonID )
{
case 0:
{
break;
}

case 1:
{
new SheildOfEarthSpell( from, null ).Cast();
break;
}

case 2:
{
new HollowReedSpell( from, null ).Cast();
break;
}

case 3:
{
new PackOfBeastSpell( from, null ).Cast();
break;
}

case 4:
{
new SpringOfLifeSpell( from, null ).Cast();
break;
}

case 5:
{
new GraspingRootsSpell( from, null ).Cast();
break;
}

case 6:
{
new BlendWithForestSpell( from, null ).Cast();
break;
}

case 7:
{
new SwarmOfInsectsSpell( from, null ).Cast();
break;
}

case 8:
{
new VolcanicEruptionSpell( from, null ).Cast();
break;
}

case 9:
{
new TreefellowSpell( from, null ).Cast();
break;
}

case 10:
{
new StoneCircleSpell( from, null ).Cast();
break;
}


case 11:
{
new EnchantedGroveSpell( from, null ).Cast();
break;
}

case 12:
{
new LureStoneSpell( from, null ).Cast();
break;
}

case 13:
{
new NaturesPassageSpell( from, null ).Cast();
break;
}

case 14:
{
new MushroomGatewaySpell( from, null ).Cast();
break;
}

case 15:
{
new RestorativeSoilSpell( from, null ).Cast();
break;
}

case 16:
{
new FireflySpell( from, null ).Cast();
break;
}

case 17:
{
from.PlaySound(0x55);
break;
}

case 18:
{
from.PlaySound(0x55);
break;
}

case 19:
{
from.PlaySound(0x55);
break;
}

}
}
}
}[/code:1]
 

Voran

Wanderer
Very nice!
I like it so much, I've added it to the zip in place of the old one.
I've also taken to oportunity to tweak Stone Cricle... so I think this means it's done!
 

KillerBeeZ

Knight
Voran said:
Very nice!
I like it so much, I've added it to the zip in place of the old one.
I've also taken to oportunity to tweak Stone Cricle... so I think this means it's done!

what did you do to stone circle? I thought it worked quite well.
 

ViWinfii

Sorceror
Good job on all of this. I happen to be making a custom spell system as well, and your scripts made a very good example for me to work with. I'm glad you liked the new gump :)
 

JLN

Wanderer
yeah good job on realy rounding out my spellbook.

cast these spells via comman if player from book if they have it, if > gm strait up cast it.

Druidcast.cs
[code:1]
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
using Server.Spells;
using Server.Spells.Druid;
using Server.Prompts;

namespace Server.Scripts.Commands
{



public class DruidCast
{

public static bool HasSpell( Mobile from, int spellID )
{
Spellbook book = Spellbook.Find( from, spellID );
return ( book != null && book.HasSpell( spellID ) );
}

public static void Initialize()
{
Server.Commands.Register( "sheildofearth", AccessLevel.Player, new CommandEventHandler( sheildofearth_OnCommand ) );
Server.Commands.Register( "hollowreed", AccessLevel.Player, new CommandEventHandler( hollowreed_OnCommand ) );
Server.Commands.Register( "packofbeast", AccessLevel.Player, new CommandEventHandler( packofbeast_OnCommand ) );
Server.Commands.Register( "springoflife", AccessLevel.Player, new CommandEventHandler( springoflife_OnCommand ) );
Server.Commands.Register( "graspingroots", AccessLevel.Player, new CommandEventHandler( graspingroots_OnCommand ) );
Server.Commands.Register( "blendwithforest", AccessLevel.Player, new CommandEventHandler( blendwithforest_OnCommand ) );
Server.Commands.Register( "swarmofinsects", AccessLevel.Player, new CommandEventHandler( swarmofinsects_OnCommand ) );
Server.Commands.Register( "volcaniceruption", AccessLevel.Player, new CommandEventHandler( volcaniceruption_OnCommand ) );
Server.Commands.Register( "summontreefellow", AccessLevel.Player, new CommandEventHandler( summontreefellow_OnCommand ) );
Server.Commands.Register( "stonecircle", AccessLevel.Player, new CommandEventHandler( stonecircle_OnCommand ) );
Server.Commands.Register( "enchantedgrove", AccessLevel.Player, new CommandEventHandler( enchantedgrove_OnCommand ) );
Server.Commands.Register( "lurestone", AccessLevel.Player, new CommandEventHandler( lurestone_OnCommand ) );
Server.Commands.Register( "naturespassage", AccessLevel.Player, new CommandEventHandler( naturespassage_OnCommand ) );
Server.Commands.Register( "mushroomgateway", AccessLevel.Player, new CommandEventHandler( mushroomgateway_OnCommand ) );
Server.Commands.Register( "restorativesoil", AccessLevel.Player, new CommandEventHandler( restorativesoil_OnCommand ) );
Server.Commands.Register( "summonfirefly", AccessLevel.Player, new CommandEventHandler( summonfirefly_OnCommand ) );


}

[Usage( "sheildofearth" )]
[Description( "Cast Sheild Of Earth." )]
private static void sheildofearth_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )

{
new SheildOfEarthSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 301) )
{
new SheildOfEarthSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "hollowreed" )]
[Description( "Cast Hollow Reed." )]
private static void hollowreed_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new HollowReedSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 302) )
{
new HollowReedSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "packofbeast" )]
[Description( "Cast Pack Of Beast." )]
private static void packofbeast_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new PackOfBeastSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 303) )
{
new PackOfBeastSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "springoflife" )]
[Description( "Cast Spring Of Life." )]
private static void springoflife_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new SpringOfLifeSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 304) )
{
new SpringOfLifeSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "graspingroots" )]
[Description( "Cast Grasping Roots." )]
private static void graspingroots_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new GraspingRootsSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 305) )
{
new GraspingRootsSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "blendwithforest" )]
[Description( "Cast Blend With Forest." )]
private static void blendwithforest_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new BlendWithForestSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 306) )
{
new BlendWithForestSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "swarmofinsects" )]
[Description( "Cast Swarm Of Insects." )]
private static void swarmofinsects_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new SwarmOfInsectsSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 307) )
{
new SwarmOfInsectsSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "volcaniceruption" )]
[Description( "Cast Volcanic Eruption." )]
private static void volcaniceruption_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new VolcanicEruptionSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 308) )
{
new VolcanicEruptionSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "summontreefellow" )]
[Description( "Cast Summon Treefellow." )]
private static void summontreefellow_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new TreefellowSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 309) )
{
new TreefellowSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "stonecircle" )]
[Description( "Cast Stone Circle." )]
private static void stonecircle_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new StoneCircleSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 310) )
{
new StoneCircleSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "enchantedgrove" )]
[Description( "Cast Enchanted Grove." )]
private static void enchantedgrove_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new EnchantedGroveSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 311) )
{
new EnchantedGroveSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "lurestone" )]
[Description( "Cast Lure Stone." )]
private static void lurestone_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new LureStoneSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 312) )
{
new LureStoneSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "naturespassage" )]
[Description( "Cast Nature's Passage." )]
private static void naturespassage_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new NaturesPassageSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 313) )
{
new NaturesPassageSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "mushroomgateway" )]
[Description( "Cast Mushroom Gateway." )]
private static void mushroomgateway_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new MushroomGatewaySpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 314) )
{
new MushroomGatewaySpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "restorativesoil" )]
[Description( "Cast Restorative Soil." )]
private static void restorativesoil_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new RestorativeSoilSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 315) )
{
new RestorativeSoilSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[Usage( "summonfirefly" )]
[Description( "Cast Summon Firefly." )]
private static void summonfirefly_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
{
new FireflySpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 316) )
{
new FireflySpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}
}
}
[/code:1]
 

IdahoLynxx

Wanderer
with the new updates, i havent installed them yet but i was wondering, can you set up in game hotkeys to cast yet? I tried to figure out how to make the Icons to drag off the book a while ago but i am just not hat talented at graphics :)

Thanks for all the spells though they are GREAT!

Lynxx
 

ViWinfii

Sorceror
with the new updates, i havent installed them yet but i was wondering, can you set up in game hotkeys to cast yet? I tried to figure out how to make the Icons to drag off the book a while ago but i am just not hat talented at graphics

With the commands that JLN set up, you can make a macro in UO (go to the character window, and select options) to say the command for you ingame to cast the spell. To make an icon drag off the book is completely client-side, I'm afraid we won't be able to do that on our custom spellbooks.
 

IdahoLynxx

Wanderer
Ahh ok im slow, and it has been a long long day :) Thanks Both of you. I have a question. So to cast i just say Hollowreed and it will cast hollow reed right? if this is the case could i change the test in the " " to anything else as long as i do it in the upper area of the script and down where it corresponds with that comand as long as i change both of them the same? and can it have spaces. I.E Ort Por or what ever?

Thanks.
Lynxx
 

JLN

Wanderer
actualy they are commands so to use sheild of earth you would say [sheildofearth, providing your command prefix has not been changed, it will not be seen as speech, but yeah to change it just change all instances of that particular command word and it should work.

[code:1]
Server.Commands.Register( "soe", AccessLevel.Player, new CommandEventHandler( soe_OnCommand ) );

[Usage( "soe" )]
[Description( "Cast Sheild Of Earth." )]
private static void soe_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from != null)
{
if( e.Mobile.AccessLevel >= AccessLevel.GameMaster )

{
new SheildOfEarthSpell( from, null ).Cast();
}
else
{
if ( HasSpell( from, 301) )
{
new SheildOfEarthSpell( from, null ).Cast();
}
else
{
from.SendLocalizedMessage( 500015 ); // You do not have that spell!
}
}
}
}

[/code:1]
 

IdahoLynxx

Wanderer
yea it took me a second to figure out that it was a [ command but when i was trying it it didnt like the "whatever whatever" it seems it had to be no spaces ( just in case someone else was thinking along my lines)
Still a great addition to this set of scripts! thanks JLN

Lynxx
 

Styla

Wanderer
Can't you do the same thing using an alias and not have to change all the names? That would save the headache of changing macros for those who have them already set.
 

Devious

Wanderer
10 thumbs up Voran. Script is great. I had a little snag in it with the errors and all but after reading all the forum pages i got it working. I tested it all and it works great. Thank You for posting it. I got the cleric spells for my clerics now i got other spells for my Saints to use. Thx again and good job. One day i might be able post a script as soon as my book arrives on C# that i ordered....hehehe...Thx again.
 

KillerBeeZ

Knight
ok I got it working thanx to either the spellbook.cs, reagents.cs or initializer.cs send by Lady Whitefyre.

I havent tested it much but I like the new spells so far (I had the old version which did rock)

Is there a way to make it so players can only summon a single firefly, and that firefly goes away after a time?

one of my players was using summon firefly to raise lore... no problem except that there were still a screenfull of fireflies wandering around after he logged off (I set a Lich to kill them all)
 

JLN

Wanderer
you could open up FireflyFamiliar.cs and change

ControlSlots = 0;

to

ControlSlots = 1;

it will not do exactly what you asked but it might limit the number those players could summon. this is just off hand havent tested it as of yet.
 

KillerBeeZ

Knight
JLN said:
you could open up FireflyFamiliar.cs and change

ControlSlots = 0;

to

ControlSlots = 1;

it will not do exactly what you asked but it might limit the number those players could summon. this is just off hand havent tested it as of yet.

I may do that, or I may just look at the "Nightsight" spell so see how its done there.
 
Status
Not open for further replies.
Top