ArisBB
Sorceror
hi all, i trying to make a new Spell Toll (unknown author) of Ninjitsu
but i having problems in lines 143, 144, 145, 146, 147, 148, 149, 150
it says about FocusAttack (and another spells) cant be found
any idea?
but i having problems in lines 143, 144, 145, 146, 147, 148, 149, 150
it says about FocusAttack (and another spells) cant be found
Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
using Server.Spells;
using Server.Spells.Chivalry;
using Server.Prompts;
namespace Server.Gumps
{
public class Tools_ninja_scrollGump : Gump
{
private Tools_ninja_scroll m_Scroll;
public Tools_ninja_scrollGump( Mobile from, Tools_ninja_scroll scroll ) : base( 0, 0 )
{
m_Scroll = scroll;
int mN01FocusAttack = m_Scroll.mN01FocusAttack;
int mN02DeathStrike = m_Scroll.mN02DeathStrike;
int mN03AnimalForm = m_Scroll.mN03AnimalForm;
int mN04KiAttack = m_Scroll.mN04KiAttack;
int mN05SurpriseAttack = m_Scroll.mN05SurpriseAttack;
int mN06Backstab = m_Scroll.mN06Backstab;
int mN07ShadowJump = m_Scroll.mN07ShadowJump;
int mN08MirrorImage = m_Scroll.mN08MirrorImage;
//int mN07NinjaMove = m_Scroll.mN07NinjaMove;
//int mN10SacredJourneySpell = m_Scroll.mN10SacredJourneySpell;
this.Closable=true;
this.Disposable=true;
this.Dragable=true;
this.Resizable=false;
this.AddPage(0);
this.AddBackground(52, 34, 160, 411, 9200);
this.AddImage(60, 45, 20736);
this.AddImage(60, 90, 20737);
this.AddImage(60, 135, 20738);
this.AddImage(60, 180, 20739);
this.AddImage(60, 225, 20740);
this.AddImage(60, 270, 20741);
this.AddImage(60, 315, 20742);
this.AddImage(60, 360, 20743);
//this.AddImage(142, 45, 20744);
//this.AddImage(142, 90, 20745);
if ( mN01FocusAttack == 1 ) { this.AddButton( 110, 55, 2361, 2361, 1, GumpButtonType.Reply, 1); }
if ( mN02DeathStrike == 1 ) { this.AddButton( 110, 100, 2361, 2361, 2, GumpButtonType.Reply, 1); }
if ( mN03AnimalForm == 1 ) { this.AddButton( 110, 145, 2361, 2361, 3, GumpButtonType.Reply, 1); }
if ( mN04KiAttack == 1 ) { this.AddButton( 110, 190, 2361, 2361, 4, GumpButtonType.Reply, 1); }
if ( mN05SurpriseAttack == 1 ) { this.AddButton( 110, 235, 2361, 2361, 5, GumpButtonType.Reply, 1); }
if ( mN06Backstab == 1 ) { this.AddButton( 110, 280, 2361, 2361, 6, GumpButtonType.Reply, 1); }
if ( mN07ShadowJump == 1 ) { this.AddButton( 110, 325, 2361, 2361, 7, GumpButtonType.Reply, 1); }
if ( mN08MirrorImage == 1 ) { this.AddButton( 110, 370, 2361, 2361, 8, GumpButtonType.Reply, 1); }
//if ( mN07NinjaMove == 1 ) { this.AddButton( 110, 325, 2361, 2361, 7, GumpButtonType.Reply, 1); }
//if ( mN10SacredJourneySpell == 1 ) { this.AddButton( 192, 100, 2361, 2361, 10, GumpButtonType.Reply, 1); }
if ( mN01FocusAttack == 0 ) { this.AddButton( 110, 55, 2360, 2360, 1, GumpButtonType.Reply, 1); }
if ( mN02DeathStrike == 0 ) { this.AddButton( 110, 100, 2360, 2360, 2, GumpButtonType.Reply, 1); }
if ( mN03AnimalForm == 0 ) { this.AddButton( 110, 145, 2360, 2360, 3, GumpButtonType.Reply, 1); }
if ( mN04KiAttack == 0 ) { this.AddButton( 110, 190, 2360, 2360, 4, GumpButtonType.Reply, 1); }
if ( mN05SurpriseAttack == 0 ) { this.AddButton( 110, 235, 2360, 2360, 5, GumpButtonType.Reply, 1); }
if ( mN06Backstab == 0 ) { this.AddButton( 110, 280, 2360, 2360, 6, GumpButtonType.Reply, 1); }
if ( mN07ShadowJump == 0 ) { this.AddButton( 110, 325, 2360, 2360, 7, GumpButtonType.Reply, 1); }
if ( mN08MirrorImage == 0 ) { this.AddButton( 110, 370, 2360, 2360, 8, GumpButtonType.Reply, 1); }
//if ( mN07NinjaMove == 0 ) { this.AddButton( 110, 325, 2360, 2360, 7, GumpButtonType.Reply, 1); }
//if ( mN10SacredJourneySpell == 0 ) { this.AddButton( 192, 100, 2360, 2360, 10, GumpButtonType.Reply, 1); }
this.AddButton(149, 408, 2152, 2152, 11, GumpButtonType.Reply, 1); // TOOLBAR
this.AddLabel(60, 412, 52, @"Open Toolbar");
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
switch ( info.ButtonID )
{
case 0:
{
break;
}
case 1 : { if ( m_Scroll.mN01FocusAttack == 0 ) { m_Scroll.mN01FocusAttack = 1; } else { m_Scroll.mN01FocusAttack = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 2 : { if ( m_Scroll.mN02DeathStrike == 0 ) { m_Scroll.mN02DeathStrike = 1; } else { m_Scroll.mN02DeathStrike = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 3 : { if ( m_Scroll.mN03AnimalForm == 0 ) { m_Scroll.mN03AnimalForm = 1; } else { m_Scroll.mN03AnimalForm = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 4 : { if ( m_Scroll.mN04KiAttack == 0 ) { m_Scroll.mN04KiAttack = 1; } else { m_Scroll.mN04KiAttack = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 5 : { if ( m_Scroll.mN05SurpriseAttack == 0 ) { m_Scroll.mN05SurpriseAttack = 1; } else { m_Scroll.mN05SurpriseAttack = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 6 : { if ( m_Scroll.mN06Backstab == 0 ) { m_Scroll.mN06Backstab = 1; } else { m_Scroll.mN06Backstab = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 7 : { if ( m_Scroll.mN07ShadowJump == 0 ) { m_Scroll.mN07ShadowJump = 1; } else { m_Scroll.mN07ShadowJump = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 8 : { if ( m_Scroll.mN08MirrorImage == 0 ) { m_Scroll.mN08MirrorImage = 1; } else { m_Scroll.mN08MirrorImage = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
//case 7 : { if ( m_Scroll.mN07NinjaMove == 0 ) { m_Scroll.mN07NinjaMove = 1; } else { m_Scroll.mN07NinjaMove = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
//case 10 : { if ( m_Scroll.mN10SacredJourneySpell == 0 ) { m_Scroll.mN10SacredJourneySpell = 1; } else { m_Scroll.mN10SacredJourneySpell = 0; } from.SendGump( new Tools_ninja_scrollGump( from, m_Scroll ) ); break; }
case 9: //aris 11
{
from.CloseGump( typeof( Tools_tools_ninja ) );
from.SendGump( new Tools_tools_ninja( from, m_Scroll ) );
break;
}
}
}}
public class Tools_tools_ninja : Gump
{
public static bool HasSpell( Mobile from, int spellID )
{
Spellbook book = Spellbook.Find( from, spellID );
return ( book != null && book.HasSpell( spellID ) );
}
private Tools_ninja_scroll m_Scroll;
public Tools_tools_ninja( Mobile from, Tools_ninja_scroll scroll ) : base( 0, 0 )
{
m_Scroll = scroll;
this.Closable=false;
this.Disposable=true;
this.Dragable=true;
this.Resizable=false;
this.AddPage(0);
this.AddImage(0, 0, 11012, 1149);
int dby = 50;
if ( HasSpell( from, 500 ) && m_Scroll.mN01FocusAttack == 1){this.AddButton(dby, 5, 20736, 20736, 1, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 501 ) && m_Scroll.mN02DeathStrike == 1){this.AddButton(dby, 5, 20737, 20737, 2, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 502 ) && m_Scroll.mN03AnimalForm == 1){this.AddButton(dby, 5, 20738, 20738, 3, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 503 ) && m_Scroll.mN04KiAttack == 1){this.AddButton(dby, 5, 20739, 20739, 4, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 504 ) && m_Scroll.mN05SurpriseAttack == 1){this.AddButton(dby, 5, 20740, 20740, 5, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 505 ) && m_Scroll.mN06Backstab == 1){this.AddButton(dby, 5, 20741, 20741, 6, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 506 ) && m_Scroll.mN07ShadowJump == 1){this.AddButton(dby, 5, 20742, 20742, 7, GumpButtonType.Reply, 1); dby = dby + 45;}
if ( HasSpell( from, 507 ) && m_Scroll.mN08MirrorImage == 1){this.AddButton(dby, 5, 20743, 20743, 8, GumpButtonType.Reply, 1); dby = dby + 45;}
//if ( HasSpell( from, 500 ) && m_Scroll.mN07NinjaMove == 1){this.AddButton(dby, 5, 20742, 20742, 7, GumpButtonType.Reply, 1); dby = dby + 45;}
//if ( HasSpell( from, 209 ) && m_Scroll.mN10SacredJourneySpell == 1){this.AddButton(dby, 5, 20745, 20745, 10, 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 1 : { if ( HasSpell( from, 500 ) ) { new FocusAttack( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 2 : { if ( HasSpell( from, 501 ) ) { new DeathStrike( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 3 : { if ( HasSpell( from, 502 ) ) { new AnimalForm( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 4 : { if ( HasSpell( from, 503 ) ) { new KiAttack( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 5 : { if ( HasSpell( from, 504 ) ) { new SurpriseAttack( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 6 : { if ( HasSpell( from, 505 ) ) { new Backstab( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 7 : { if ( HasSpell( from, 506 ) ) { new ShadowJump( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
case 8 : { if ( HasSpell( from, 507 ) ) { new MirrorImage( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
//case 7 : { if ( HasSpell( from, 506 ) ) { new NinjaMove( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
//case 10 : { if ( HasSpell( from, 209 ) ) { new SacredJourneySpell( from, null ).Cast(); from.SendGump( new Tools_tools_ninja( from, m_Scroll ) ); } break; }
}
}
}
}
any idea?