zerodowned

Moderator
I'm working on a Spell Hotbar system: http://servuo.com/threads/spell-toolbar-script-looking-for-some-feedback.1456/

It allows players to select spells from all magic types and have the spell icons combined into one hotbar. Planning to release a Beta version of the script this weekend, as it's fuctional, stable, but missing a lot of features that I want to include.

What I'm looking to do is if more than 15 spells are selected, it will make a second row of icons.
I think i'm comfortable enough with using "dby" and "yoffset", what I need help with is finding the 16th spell up to the max of 30 so I can set the dby+yoffset for those specific spells.

Thanks
 
Just thought of a workaround that I'm not able to try right now, but I could code a "check" if x = more than then x of button 15, then change the y+offset, x+offset to make it slide into a second row.
 
It would be much easier for us to help you if you could provide the code you're having trouble with. Otherwise, most efforts to help will be for naught.
 
There are a few gumps out there that you could get some pointers from, like the helpinfo gump maybe, since it has a set amount of entries per page, and adds a new page dynamically when there are more entries.. Even the craft gump if you can sift through it, in the area where the craft items are listed, it will add a new page when there are more entries than the page will allow.. for a couple off top of my head.

Thats what us wanna be programmers have to do when we are coding somthing.. find another script similar for examples ;-/
 
Thats what us wanna be programmers have to do when we are coding somthing.. find another script similar for examples ;-/

Honestly I think you'll find that no matter the person, everyone needs references. That's why most every legitimate language usually has a document or reference base. These references become increasingly important when the amount of information one could take in during the course of the day is only a mere fraction of the new information being produced. Especially if you're developing in multiple languages.

You ought not be so hard on yerself.
 
Here's the part of the script that I'm wanting to "fix".

* see below for changing I'm considering

Code:
/////////////////////////////
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
////******** spellbar_bargump  ************////
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

////////////////////////////

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

  private SpellBarScroll m_Scroll;
     
     

  public SpellBar_BarGump( Mobile from, SpellBarScroll scroll ) : base( 0, 0 )
  {
  m_Scroll = scroll;
  this.Closable=true;
  this.Disposable=true;
  this.Dragable=true;
  this.Resizable=false;
  this.AddPage(0);
  this.AddImage(0, 0, 2234, 0);
     //   this.AddBackground( 0,52, 100,28, 9200 );
  int dby = 50;
       
  if ( HasSpell( from, 0 ) && m_Scroll.mW00_ClumsySpell == 1) { this.AddButton(dby , 5 , 2240, 2240, 99, GumpButtonType.Reply, 1); dby = dby + 45; AddTooltip( 1015164 ); }
  if ( HasSpell( from, 1 ) && m_Scroll.mW01_CreateFoodSpell == 1){this.AddButton(dby, 5, 2241, 2241, 1, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 2 ) && m_Scroll.mW02_FeeblemindSpell == 1){this.AddButton(dby, 5, 2242, 2242, 2, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 3 ) && m_Scroll.mW03_HealSpell == 1){this.AddButton(dby, 5, 2243, 2243, 3, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 4 ) && m_Scroll.mW04_MagicArrowSpell == 1){this.AddButton(dby, 5, 2244, 2244, 4, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 5 ) && m_Scroll.mW05_NightSightSpell == 1){this.AddButton(dby, 5, 2245, 2245, 5, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 6 ) && m_Scroll.mW06_ReactiveArmorSpell == 1){this.AddButton(dby, 5, 2246, 2246, 6, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 7 ) && m_Scroll.mW07_WeakenSpell == 1){this.AddButton(dby, 5, 2247, 2247, 7, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 8 ) && m_Scroll.mW08_AgilitySpell == 1){this.AddButton(dby, 5, 2248, 2248, 8, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 9 ) && m_Scroll.mW09_CunningSpell == 1){this.AddButton(dby, 5, 2249, 2249, 9, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 10 ) && m_Scroll.mW10_CureSpell == 1){this.AddButton(dby, 5, 2250, 2250, 10, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 11 ) && m_Scroll.mW11_HarmSpell == 1){this.AddButton(dby, 5, 2251, 2251, 11, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 12 ) && m_Scroll.mW12_MagicTrapSpell == 1){this.AddButton(dby, 5, 2252, 2252, 12, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 13 ) && m_Scroll.mW13_RemoveTrapSpell == 1){this.AddButton(dby, 5, 2253, 2253, 13, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 14 ) && m_Scroll.mW14_ProtectionSpell == 1){this.AddButton(dby, 5, 2254, 2254, 14, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 15 ) && m_Scroll.mW15_StrengthSpell == 1){this.AddButton(dby, 5, 2255, 2255, 15, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 16 ) && m_Scroll.mW16_BlessSpell == 1){this.AddButton(dby, 5, 2256, 2256, 16, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 17 ) && m_Scroll.mW17_FireballSpell == 1){this.AddButton(dby, 5, 2257, 2257, 17, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 18 ) && m_Scroll.mW18_MagicLockSpell == 1){this.AddButton(dby, 5, 2258, 2258, 18, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 19 ) && m_Scroll.mW19_PoisonSpell == 1){this.AddButton(dby, 5, 2259, 2259, 19, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 20 ) && m_Scroll.mW20_TelekinesisSpell == 1){this.AddButton(dby, 5, 2260, 2260, 20, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 21 ) && m_Scroll.mW21_TeleportSpell == 1){this.AddButton(dby, 5, 2261, 2261, 21, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 22 ) && m_Scroll.mW22_UnlockSpell == 1){this.AddButton(dby, 5, 2262, 2262, 22, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 23 ) && m_Scroll.mW23_WallOfStoneSpell == 1){this.AddButton(dby, 5, 2263, 2263, 23, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 24 ) && m_Scroll.mW24_ArchCureSpell == 1){this.AddButton(dby, 5, 2264, 2264, 24, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 25 ) && m_Scroll.mW25_ArchProtectionSpell == 1){this.AddButton(dby, 5, 2265, 2265, 25, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 26 ) && m_Scroll.mW26_CurseSpell == 1){this.AddButton(dby, 5, 2266, 2266, 26, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 27 ) && m_Scroll.mW27_FireFieldSpell == 1){this.AddButton(dby, 5, 2267, 2267, 27, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 28 ) && m_Scroll.mW28_GreaterHealSpell == 1){this.AddButton(dby, 5, 2268, 2268, 28, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 29 ) && m_Scroll.mW29_LightningSpell == 1){this.AddButton(dby, 5, 2269, 2269, 29, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 30 ) && m_Scroll.mW30_ManaDrainSpell == 1){this.AddButton(dby, 5, 2270, 2270, 30, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 31 ) && m_Scroll.mW31_RecallSpell == 1){this.AddButton(dby, 5, 2271, 2271, 31, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 32 ) && m_Scroll.mW32_BladeSpiritsSpell == 1){this.AddButton(dby, 5, 2272, 2272, 32, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 33 ) && m_Scroll.mW33_DispelFieldSpell == 1){this.AddButton(dby, 5, 2273, 2273, 33, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 34 ) && m_Scroll.mW34_IncognitoSpell == 1){this.AddButton(dby, 5, 2274, 2274, 34, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 35 ) && m_Scroll.mW35_MagicReflectSpell == 1){this.AddButton(dby, 5, 2275, 2275, 35, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 36 ) && m_Scroll.mW36_MindBlastSpell == 1){this.AddButton(dby, 5, 2276, 2276, 36, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 37 ) && m_Scroll.mW37_ParalyzeSpell == 1){this.AddButton(dby, 5, 2277, 2277, 37, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 38 ) && m_Scroll.mW38_PoisonFieldSpell == 1){this.AddButton(dby, 5, 2278, 2278, 38, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 39 ) && m_Scroll.mW39_SummonCreatureSpell == 1){this.AddButton(dby, 5, 2279, 2279, 39, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 40 ) && m_Scroll.mW40_DispelSpell == 1){this.AddButton(dby, 5, 2280, 2280, 40, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 41 ) && m_Scroll.mW41_EnergyBoltSpell == 1){this.AddButton(dby, 5, 2281, 2281, 41, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 42 ) && m_Scroll.mW42_ExplosionSpell == 1){this.AddButton(dby, 5, 2282, 2282, 42, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 43 ) && m_Scroll.mW43_InvisibilitySpell == 1){this.AddButton(dby, 5, 2283, 2283, 43, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 44 ) && m_Scroll.mW44_MarkSpell == 1){this.AddButton(dby, 5, 2284, 2284, 44, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 45 ) && m_Scroll.mW45_MassCurseSpell == 1){this.AddButton(dby, 5, 2285, 2285, 45, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 46 ) && m_Scroll.mW46_ParalyzeFieldSpell == 1){this.AddButton(dby, 5, 2286, 2286, 46, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 47 ) && m_Scroll.mW47_RevealSpell == 1){this.AddButton(dby, 5, 2287, 2287, 47, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 49 ) && m_Scroll.mW49_EnergyFieldSpell == 1){this.AddButton(dby, 5, 2289, 2289, 49, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 50 ) && m_Scroll.mW50_FlameStrikeSpell == 1){this.AddButton(dby, 5, 2290, 2290, 50, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 51 ) && m_Scroll.mW51_GateTravelSpell == 1){this.AddButton(dby, 5, 2291, 2291, 51, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 52 ) && m_Scroll.mW52_ManaVampireSpell == 1){this.AddButton(dby, 5, 2292, 2292, 52, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 53 ) && m_Scroll.mW53_MassDispelSpell == 1){this.AddButton(dby, 5, 2293, 2293, 53, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 54 ) && m_Scroll.mW54_MeteorSwarmSpell == 1){this.AddButton(dby, 5, 2294, 2294, 54, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 55 ) && m_Scroll.mW55_PolymorphSpell == 1){this.AddButton(dby, 5, 2295, 2295, 55, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 56 ) && m_Scroll.mW56_EarthquakeSpell == 1){this.AddButton(dby, 5, 2296, 2296, 56, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 57 ) && m_Scroll.mW57_EnergyVortexSpell == 1){this.AddButton(dby, 5, 2297, 2297, 57, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 58 ) && m_Scroll.mW58_ResurrectionSpell == 1){this.AddButton(dby, 5, 2298, 2298, 58, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 59 ) && m_Scroll.mW59_AirElementalSpell == 1){this.AddButton(dby, 5, 2299, 2299, 59, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 60 ) && m_Scroll.mW60_SummonDaemonSpell == 1){this.AddButton(dby, 5, 2300, 2300, 60, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 61 ) && m_Scroll.mW61_EarthElementalSpell == 1){this.AddButton(dby, 5, 2301, 2301, 61, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 62 ) && m_Scroll.mW62_FireElementalSpell == 1){this.AddButton(dby, 5, 2302, 2302, 62, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 63 ) && m_Scroll.mW63_WaterElementalSpell == 1){this.AddButton(dby, 5, 2303, 2303, 63, GumpButtonType.Reply, 1); dby = dby + 45;}

  // NECROMANCY

  if ( HasSpell( from, 100 ) && m_Scroll.mN01AnimateDeadSpell == 1) { this.AddButton(dby, 5, 20480,20480, 100, GumpButtonType.Reply, 1); dby = dby + 45; }
  if ( HasSpell( from, 101 ) && m_Scroll.mN02BloodOathSpell == 1){this.AddButton(dby, 5, 20481,20481, 101, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 102 ) && m_Scroll.mN03CorpseSkinSpell == 1){this.AddButton(dby, 5, 20482,20482, 102, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 103 ) && m_Scroll.mN04CurseWeaponSpell == 1){this.AddButton(dby, 5, 20483 ,20483 , 103 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 104 ) && m_Scroll.mN05EvilOmenSpell == 1){this.AddButton(dby, 5, 20484 ,20484 , 104 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 105 ) && m_Scroll.mN06HorrificBeastSpell == 1){this.AddButton(dby, 5, 20485 ,20485 , 105 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 106 ) && m_Scroll.mN07LichFormSpell == 1){this.AddButton(dby, 5, 20486 ,20486 , 106 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 107 ) && m_Scroll.mN08MindRotSpell == 1){this.AddButton(dby, 5, 20487 ,20487 , 107 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 108 ) && m_Scroll.mN09PainSpikeSpell == 1){this.AddButton(dby, 5, 20488 ,20488 , 108 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 109 ) && m_Scroll.mN10PoisonStrikeSpell == 1){this.AddButton(dby, 5, 20489 ,20489 , 109 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 110 ) && m_Scroll.mN11StrangleSpell == 1){this.AddButton(dby, 5, 20490 ,20490 , 110 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 111 ) && m_Scroll.mN12SummonFamiliarSpell == 1){this.AddButton(dby, 5, 20491 ,20491 , 111 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 112 ) && m_Scroll.mN13VampiricEmbraceSpell == 1){this.AddButton(dby, 5, 20492 ,20492 , 112 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 113 ) && m_Scroll.mN14VengefulSpiritSpell == 1){this.AddButton(dby, 5, 20493 ,20493 , 113 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 114 ) && m_Scroll.mN15WitherSpell == 1){this.AddButton(dby, 5, 20494 ,20494 , 114 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 115 ) && m_Scroll.mN16WraithFormSpell == 1){this.AddButton(dby, 5, 20495 ,20495 , 115 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 116 ) && m_Scroll.mN17ExorcismSpell == 1){this.AddButton(dby, 5, 20496 ,20496 , 116 , GumpButtonType.Reply, 1); dby = dby + 45;}
   
  // CHIVALRY

  if ( HasSpell( from, 200 ) && m_Scroll.mC01CleanseByFireSpell == 1){this.AddButton(dby, 5, 20736, 20736, 117, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 201 ) && m_Scroll.mC02CloseWoundsSpell == 1){this.AddButton(dby, 5, 20737, 20737, 118, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 202 ) && m_Scroll.mC03ConsecrateWeaponSpell == 1){this.AddButton(dby, 5, 20738, 20738, 119, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 203 ) && m_Scroll.mC04DispelEvilSpell == 1){this.AddButton(dby, 5, 20739, 20739, 120, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 204 ) && m_Scroll.mC05DivineFurySpell == 1){this.AddButton(dby, 5, 20740, 20740, 204, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 205 ) && m_Scroll.mC06EnemyOfOneSpell == 1){this.AddButton(dby, 5, 20741, 20741, 205, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 206 ) && m_Scroll.mC07HolyLightSpell == 1){this.AddButton(dby, 5, 20742, 20742, 206, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 207 ) && m_Scroll.mC08NobleSacrificeSpell == 1){this.AddButton(dby, 5, 20743, 20743, 207, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 208 ) && m_Scroll.mC09RemoveCurseSpell == 1){this.AddButton(dby, 5, 20744, 20744, 208, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 209 ) && m_Scroll.mC10SacredJourneySpell == 1){this.AddButton(dby, 5, 20745, 20745, 209, GumpButtonType.Reply, 1); dby = dby + 45;}

// BUSHIDO

  if ( HasSpell( from, 305) && m_Scroll. mB06HonorableExecution == 1){this.AddButton(dby, 5, 20496 ,20496 , 254 , GumpButtonType.Reply, 1); dby = dby + 45;}

  if ( HasSpell( from, 300 ) && m_Scroll. mB01Confidence == 1){this.AddButton(dby, 5, 20496 ,20496 , 116 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 301 ) && m_Scroll. mB02CounterAttack  == 1){this.AddButton(dby, 5, 20496 ,20496 , 116 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 302 ) && m_Scroll. mB03Evasion == 1){this.AddButton(dby, 5, 20496 ,20496 , 116 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 303 ) && m_Scroll. mB04LightningStrike == 1){this.AddButton(dby, 5, 20496 ,20496 , 116 , GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 304 ) && m_Scroll. mB05MomentumStrike == 1){this.AddButton(dby, 5, 20496 ,20496 , 116 , GumpButtonType.Reply, 1); dby = dby + 45;}

// NINJITSU
     
       if ( HasSpell( from, 400 ) && m_Scroll.mI06FocusAttack == 1){this.AddButton(dby, 5, 20736, 20736, 255, GumpButtonType.Reply, 1); dby = dby + 45;}

  if ( HasSpell( from, 401 ) && m_Scroll.mI01DeathStrike == 1){this.AddButton(dby, 5, 20736, 20736, 215, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 402 ) && m_Scroll.mI02AnimalForm == 1){this.AddButton(dby, 5, 20736, 20736, 216, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 403 ) && m_Scroll.mI03KiAttack == 1){this.AddButton(dby, 5, 20736, 20736, 217, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 404 ) && m_Scroll.mI04SurpriseAttack == 1){this.AddButton(dby, 5, 20736, 20736, 218, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 405 ) && m_Scroll.mI05Backstab == 1){this.AddButton(dby, 5, 20736, 20736, 219, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 406 ) && m_Scroll.mI04Shadowjump == 1){this.AddButton(dby, 5, 20736, 20736, 220, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 407 ) && m_Scroll.mI05MirrorImage == 1){this.AddButton(dby, 5, 20736, 20736, 221, GumpButtonType.Reply, 1); dby = dby + 45;}

// SPELLWEAVING

  if ( HasSpell( from, 500 ) && m_Scroll. mS01ArcaneCircleSpell== 1){this.AddButton(dby, 5, 20736, 20736, 222, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 501 ) && m_Scroll. mS02GiftOfRenewalSpell== 1){this.AddButton(dby, 5, 20736, 20736, 223, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 502 ) && m_Scroll. mS03ImmolatingWeaponSpell== 1){this.AddButton(dby, 5, 20736, 20736, 234, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 503 ) && m_Scroll. mS04AttuneWeaponSpell== 1){this.AddButton(dby, 5, 20736, 20736, 225, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 504 ) && m_Scroll. mS05ThunderstormSpell== 1){this.AddButton(dby, 5, 20736, 20736, 226, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 505 ) && m_Scroll. mS06NatureFurySpell== 1){this.AddButton(dby, 5, 20736, 20736, 227, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 506 ) && m_Scroll. mS07SummonFeySpell== 1){this.AddButton(dby, 5, 20736, 20736, 228, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 507 ) && m_Scroll. mS08SummonFiendSpell== 1){this.AddButton(dby, 5, 20736, 20736, 229, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 508 ) && m_Scroll. mS09ReaperFormSpell== 1){this.AddButton(dby, 5, 20736, 20736, 230, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 509 ) && m_Scroll. mS10WildfireSpell== 1){this.AddButton(dby, 5, 20736, 20736, 231, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 510 ) && m_Scroll. mS11EssenceOfWindSpell== 1){this.AddButton(dby, 5, 20736, 20736, 232, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 511 ) && m_Scroll. mS12DryadAllureSpell== 1){this.AddButton(dby, 5, 20736, 20736, 233, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 512 ) && m_Scroll. mS13EtherealVoyageSpell== 1){this.AddButton(dby, 5, 20736, 20736, 234, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 513 ) && m_Scroll. mS14WordOfDeathSpell== 1){this.AddButton(dby, 5, 20736, 20736, 235, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 514 ) && m_Scroll. mS15GiftOfLifeSpell== 1){this.AddButton(dby, 5, 20736, 20736, 236, GumpButtonType.Reply, 1); dby = dby + 45;}
  if ( HasSpell( from, 515 ) && m_Scroll. mS16ArcaneEmpowermentSpell== 1){this.AddButton(dby, 5, 20736, 20736, 237, GumpButtonType.Reply, 1); dby = dby + 45;}

 // MYSTICISM
       if ( HasSpell( from, 600 ) && m_Scroll. mM01NetherBoltSpell== 1){this.AddButton(dby, 5, 20736, 20736, 238, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 601 ) && m_Scroll. mM02HealingStoneSpell== 1){this.AddButton(dby, 5, 20736, 20736, 239, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 602 ) && m_Scroll. mM03PurgeMagicSpell== 1){this.AddButton(dby, 5, 20736, 20736, 240, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 603 ) && m_Scroll. mM04EnchantSpell== 1){this.AddButton(dby, 5, 20736, 20736, 241, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 604 ) && m_Scroll. mM05SleepSpell== 1){this.AddButton(dby, 5, 20736, 20736, 242, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 605 ) && m_Scroll. mM06EagleStrikeSpell== 1){this.AddButton(dby, 5, 20736, 20736, 243, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 606 ) && m_Scroll. mM07AnimatedWeaponSpell== 1){this.AddButton(dby, 5, 20736, 20736, 244, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 607 ) && m_Scroll. mM08SpellTriggerSpell== 1){this.AddButton(dby, 5, 20736, 20736, 245, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 608 ) && m_Scroll. mM09MassSleepSpell== 1){this.AddButton(dby, 5, 20736, 20736, 246, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 609 ) && m_Scroll. mM10CleansingWindsSpell== 1){this.AddButton(dby, 5, 20736, 20736, 247, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 610 ) && m_Scroll. mM11BombardSpell== 1){this.AddButton(dby, 5, 20736, 20736, 248, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 611 ) && m_Scroll. mM12SpellPlagueSpell== 1){this.AddButton(dby, 5, 20736, 20736, 249, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 612 ) && m_Scroll. mM13HailStormSpell== 1){this.AddButton(dby, 5, 20736, 20736, 250, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 613 ) && m_Scroll. mM14NetherCycloneSpell== 1){this.AddButton(dby, 5, 20736, 20736, 251, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 614 ) && m_Scroll. mM15RisingColossusSpell== 1){this.AddButton(dby, 5, 20736, 20736, 252, GumpButtonType.Reply, 1); dby = dby + 45;}
       if ( HasSpell( from, 615 ) && m_Scroll. mM16StoneFormSpell== 1){this.AddButton(dby, 5, 20736, 20736, 253, GumpButtonType.Reply, 1); dby = dby + 45;}
       
  }
   


  public override void OnResponse( NetState state, RelayInfo info )
  {
  Mobile from = state.Mobile;
   
  switch ( info.ButtonID )
  {
  case 0: { break; }
  case 99: { if ( HasSpell( from, 0 ) ) { new ClumsySpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 1: { if ( HasSpell( from, 1 ) ) { new CreateFoodSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 2: { if ( HasSpell( from, 2 ) ) { new FeeblemindSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 3: { if ( HasSpell( from, 3 ) ) { new HealSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 4: { if ( HasSpell( from, 4 ) ) { new MagicArrowSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 5: { if ( HasSpell( from, 5 ) ) { new NightSightSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 6: { if ( HasSpell( from, 6 ) ) { new ReactiveArmorSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 7: { if ( HasSpell( from, 7 ) ) { new WeakenSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 8: { if ( HasSpell( from, 8 ) ) { new AgilitySpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 9: { if ( HasSpell( from, 9 ) ) { new CunningSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 10: { if ( HasSpell( from, 10 ) ) { new CureSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 11: { if ( HasSpell( from, 11 ) ) { new HarmSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 12: { if ( HasSpell( from, 12 ) ) { new MagicTrapSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 13: { if ( HasSpell( from, 13 ) ) { new RemoveTrapSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 14: { if ( HasSpell( from, 14 ) ) { new ProtectionSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 15: { if ( HasSpell( from, 15 ) ) { new StrengthSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 16: { if ( HasSpell( from, 16 ) ) { new BlessSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 17: { if ( HasSpell( from, 17 ) ) { new FireballSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 18: { if ( HasSpell( from, 18 ) ) { new MagicLockSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 19: { if ( HasSpell( from, 19 ) ) { new PoisonSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 20: { if ( HasSpell( from, 20 ) ) { new TelekinesisSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 21: { if ( HasSpell( from, 21 ) ) { new TeleportSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 22: { if ( HasSpell( from, 22 ) ) { new UnlockSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 23: { if ( HasSpell( from, 23 ) ) { new WallOfStoneSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 24: { if ( HasSpell( from, 24 ) ) { new ArchCureSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 25: { if ( HasSpell( from, 25 ) ) { new ArchProtectionSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 26: { if ( HasSpell( from, 26 ) ) { new CurseSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 27: { if ( HasSpell( from, 27 ) ) { new FireFieldSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 28: { if ( HasSpell( from, 28 ) ) { new GreaterHealSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 29: { if ( HasSpell( from, 29 ) ) { new LightningSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 30: { if ( HasSpell( from, 30 ) ) { new ManaDrainSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 31: { if ( HasSpell( from, 31 ) ) { new RecallSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 32: { if ( HasSpell( from, 32 ) ) { new BladeSpiritsSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 33: { if ( HasSpell( from, 33 ) ) { new DispelFieldSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 34: { if ( HasSpell( from, 34 ) ) { new IncognitoSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 35: { if ( HasSpell( from, 35 ) ) { new MagicReflectSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 36: { if ( HasSpell( from, 36 ) ) { new MindBlastSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 37: { if ( HasSpell( from, 37 ) ) { new ParalyzeSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 38: { if ( HasSpell( from, 38 ) ) { new PoisonFieldSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 39: { if ( HasSpell( from, 39 ) ) { new SummonCreatureSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 40: { if ( HasSpell( from, 40 ) ) { new DispelSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 41: { if ( HasSpell( from, 41 ) ) { new EnergyBoltSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 42: { if ( HasSpell( from, 42 ) ) { new ExplosionSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 43: { if ( HasSpell( from, 43 ) ) { new InvisibilitySpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 44: { if ( HasSpell( from, 44 ) ) { new MarkSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 45: { if ( HasSpell( from, 45 ) ) { new MassCurseSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 46: { if ( HasSpell( from, 46 ) ) { new ParalyzeFieldSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 47: { if ( HasSpell( from, 47 ) ) { new RevealSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 49: { if ( HasSpell( from, 49 ) ) { new EnergyFieldSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 50: { if ( HasSpell( from, 50 ) ) { new FlameStrikeSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 51: { if ( HasSpell( from, 51 ) ) { new GateTravelSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 52: { if ( HasSpell( from, 52 ) ) { new ManaVampireSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 53: { if ( HasSpell( from, 53 ) ) { new MassDispelSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 54: { if ( HasSpell( from, 54 ) ) { new MeteorSwarmSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 55: { if ( HasSpell( from, 55 ) ) { new PolymorphSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 56: { if ( HasSpell( from, 56 ) ) { new EarthquakeSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 57: { if ( HasSpell( from, 57 ) ) { new EnergyVortexSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 58: { if ( HasSpell( from, 58 ) ) { new ResurrectionSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 59: { if ( HasSpell( from, 59 ) ) { new AirElementalSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 60: { if ( HasSpell( from, 60 ) ) { new SummonDaemonSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 61: { if ( HasSpell( from, 61 ) ) { new EarthElementalSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 62: { if ( HasSpell( from, 62 ) ) { new FireElementalSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 63: { if ( HasSpell( from, 63 ) ) { new WaterElementalSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }

  // NECROMANCY
  case 100: { if ( HasSpell( from, 100 ) ) { new AnimateDeadSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 101: { if ( HasSpell( from, 101 ) ) { new BloodOathSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 102: { if ( HasSpell( from, 102 ) ) { new CorpseSkinSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 103: { if ( HasSpell( from, 103 ) ) { new CurseWeaponSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 104: { if ( HasSpell( from, 104 ) ) { new EvilOmenSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 105: { if ( HasSpell( from, 105 ) ) { new HorrificBeastSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 106: { if ( HasSpell( from, 106 ) ) { new LichFormSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 107: { if ( HasSpell( from, 107 ) ) { new MindRotSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 108: { if ( HasSpell( from, 108 ) ) { new PainSpikeSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 109: { if ( HasSpell( from, 109 ) ) { new PoisonStrikeSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 110: { if ( HasSpell( from, 110 ) ) { new StrangleSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 111: { if ( HasSpell( from, 111 ) ) { new SummonFamiliarSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 112: { if ( HasSpell( from, 112 ) ) { new VampiricEmbraceSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 113: { if ( HasSpell( from, 113 ) ) { new VengefulSpiritSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 114: { if ( HasSpell( from, 114 ) ) { new WitherSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 115: { if ( HasSpell( from, 115 ) ) { new WraithFormSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 116: { if ( HasSpell( from, 116 ) ) { new ExorcismSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }

  // CHIVALRY

  case 117 : { if ( HasSpell( from, 200 ) ) { new CleanseByFireSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 118 : { if ( HasSpell( from, 201 ) ) { new CloseWoundsSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }  
  case 119 : { if ( HasSpell( from, 202 ) ) { new ConsecrateWeaponSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 120 : { if ( HasSpell( from, 203 ) ) { new DispelEvilSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 204 : { if ( HasSpell( from, 204 ) ) { new DivineFurySpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 205 : { if ( HasSpell( from, 205 ) ) { new EnemyOfOneSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 206 : { if ( HasSpell( from, 206 ) ) { new HolyLightSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 207 : { if ( HasSpell( from, 207 ) ) { new NobleSacrificeSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 208 :  { if ( HasSpell( from, 208 ) ) { new RemoveCurseSpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 209 : { if ( HasSpell( from, 209 ) ) { new SacredJourneySpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
   // BUSHIDO
   
         case 254: { if ( HasSpell( from, 305) ) { SamuraiMove.SetCurrentMove( from, new HonorableExecution() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 210: { if ( HasSpell( from, 300 ) ) { new Confidence ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 211: { if ( HasSpell( from, 301 ) ) { new CounterAttack ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 212: { if ( HasSpell( from, 302 ) ) { new Evasion ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 213: { if ( HasSpell( from, 303 ) ) { SamuraiMove.SetCurrentMove( from, new LightningStrike() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 214: { if ( HasSpell( from, 304 ) ) { SamuraiMove.SetCurrentMove( from, new MomentumStrike() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
   // NINJITSU
         case 255: { if ( HasSpell( from, 400) ) { NinjaMove.SetCurrentMove( from, new FocusAttack() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 215: { if ( HasSpell( from, 401 ) ) { NinjaMove.SetCurrentMove( from, new DeathStrike() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 216: { if ( HasSpell( from, 402 ) ) { new AnimalForm ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 217: { if ( HasSpell( from, 403 ) ) { NinjaMove.SetCurrentMove( from, new KiAttack() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 218: { if ( HasSpell( from, 404 ) ) { NinjaMove.SetCurrentMove( from, new SurpriseAttack() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 219: { if ( HasSpell( from, 405 ) ) { NinjaMove.SetCurrentMove( from, new Backstab() ); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 220: { if ( HasSpell( from, 406 ) ) { new Shadowjump ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
  case 221: { if ( HasSpell( from, 407 ) ) { new MirrorImage ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
   // SPELLWEAVING

  case 222 : { if ( HasSpell( from, 500 ) ) { new ArcaneCircleSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 223 : { if ( HasSpell( from, 501 ) ) { new GiftOfRenewalSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 224 : { if ( HasSpell( from, 502 ) ) { new ImmolatingWeaponSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 225 : { if ( HasSpell( from, 503 ) ) { new AttuneWeaponSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 226 : { if ( HasSpell( from, 504 ) ) { new ThunderstormSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 227 : { if ( HasSpell( from, 505 ) ) { new NatureFurySpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 228 : { if ( HasSpell( from, 506 ) ) { new SummonFeySpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 229 : { if ( HasSpell( from, 507 ) ) { new SummonFiendSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 230 : { if ( HasSpell( from, 508 ) ) { new ReaperFormSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 231 : { if ( HasSpell( from, 509) ) { new WildfireSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 232: { if ( HasSpell( from, 510) ) { new EssenceOfWindSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 233: { if ( HasSpell( from, 511) ) { new DryadAllureSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 234 : { if ( HasSpell( from, 512) ) { new EtherealVoyageSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 235: { if ( HasSpell( from, 513) ) { new WordOfDeathSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 236: { if ( HasSpell( from, 514) ) { new GiftOfLifeSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
  case 237: { if ( HasSpell( from, 515) ) { new ArcaneEmpowermentSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         
   // MYSTICISM
         
         case 238: { if ( HasSpell( from, 600) ) { new NetherBoltSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 239: { if ( HasSpell( from, 601) ) { new HealingStoneSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 240: { if ( HasSpell( from, 602) ) { new PurgeMagicSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 241 : { if ( HasSpell( from, 603) ) { new EnchantSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 242: { if ( HasSpell( from, 604) ) { new SleepSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 243: { if ( HasSpell( from, 605) ) { new EagleStrikeSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 244: { if ( HasSpell( from, 606) ) { new AnimatedWeaponSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 245: { if ( HasSpell( from, 607) ) { new SpellTriggerSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 246: { if ( HasSpell( from, 608) ) { new MassSleepSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 247: { if ( HasSpell( from, 609) ) { new CleansingWindsSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 248: { if ( HasSpell( from, 610) ) { new BombardSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 249: { if ( HasSpell( from, 611) ) { new SpellPlagueSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 250: { if ( HasSpell( from, 612) ) { new HailStormSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 251: { if ( HasSpell( from, 613) ) { new NetherCycloneSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 252: { if ( HasSpell( from, 614) ) { new RisingColossusSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         case 253: { if ( HasSpell( from, 615) ) { new StoneFormSpell ( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from, m_Scroll ) ); } break; }
         

  }
  }
  }



I'm thinking of changing to something like this:

if ( HasSpell( from, 0 ) && m_Scroll.mW00_ClumsySpell == 1) { this.AddButton( x + xoffset , y + yoffset , 2240, 2240, 99, GumpButtonType.Reply, 1); AddTooltip( 1015164 ); }

This should allow me to check the locations and change them as needed.
 
See, you didn't even need us. ;)

Honestly though, I don't see why you'd need an x-offset if you just want them below the other icons.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back