I am going to have to say latest version. I renamed the folder to make it smaller and easier to work with.

** EDIT **
It tells me I have 15 of 30 spells selected, which I only have 6 on Magery and nothing else. And some of the pictures do no go with the labels. For instance, the picture for meteor swarm has the label for earth elemental.
 
Last edited:
Am I using the wrong version of this script or something? Mine doesn't say that on Line 2442:
Code:
			this.AddPage(1);
			  
				
			if ( m_Scroll.mSwitch == 0 ) 
			{ 
				
				
				AddImage( 24, 0, 2234, 0);
				AddImageTiled( 0,0, 25,80, 2624 ); //options background
				AddAlphaRegion(0, 0, 25, 80);
				
					if ( m_Scroll.mLock == 0 )
					{
						dbx = 67; dbxa = 45; dby = 5; dbya = 0;

						this.AddButton( 2, 28,  22404, 22404, 138, GumpButtonType.Reply, 1); // flip button
						this.AddButton( 2, 5,  5603, 5603, 0, GumpButtonType.Page, 2); // minimize
						this.AddButton( 5, 54,  2510, 2510, 139, GumpButtonType.Reply, 1); // unlocked
					}
					else
					{
						this.AddButton( 5, 54,  2092, 2092, 139, GumpButtonType.Reply, 1); // locked
					}
			}
 
@Macil you have those numbers under mLock instead of mSwitch. so probably an older version of the script. and may cause problems if you lock the hotbar.
Make sure you're using the newest version and also make sure it shows the correct numbers under mSwitch

if ( m_Scroll.mSwitch == 0 )
{
//dbx = 50; dbxa = 45; dby = 5; dbya = 0;
dbx = 67; dbxa = 45; dby = 5; dbya = 0;
 
4.5 is the newest, but you need to make the change to the numbers listed above to make sure it works when locked.

i admit, i've been slacking a bit with the spellbar, but I was working on that thing for around a month and have managed to start and finish two other projects that I really wanted to get working for my shard.
 
egads, EasyUO is an alien language to me.

after learning c+ for sphere i switched to runuo and had to learn all over again.
if you know your learning style then go with it.

i do a lot of reference scripting, and it helps to understand Operators and what they do, like the difference between & and &&. msdn is a great source for that http://msdn.microsoft.com/en-us/library/6a71f45d.aspx
 
:) glad you like it


lol, i was waiting for someone to ask about ACC. this code is written with customization in mind. once I get a few features working and added that I want to include then i'll address that.
the only "problem" i can see regarding ACC is that it doesn't have the spell icons. so I'd have to make buttons with labels but the buttons would be fairly small.

I am planning on releasing a version that includes Bard of Masteries, but not right now since some people may not have that system and I want as many people as possible to be able to try it out
Zero, nice job on this! :)
Just FYI, but ACC does use spell icons. They can be completely customized for each system. My thoughts for those shard owners out there that have ACC and have not adjusted the default spell schools to use icons (some of them do, some don't) would be to have a "generic" icon as a placeholder. This will also show people that that particular spell and/or school does not have the icons set correctly. I wouldn't suggest using labels, they would take up more space and you'd have some spells with labels and some without. Aesthetically it would probably look strange. The other thing that might be a hitch incorporating ACC is that system allows you can position the spells on your screen with a gump and the spells work with a single click, not a double click.
 
the only problem I have now is the labels do not match the spells chosen.
For Example----I choose the Recall Spell----right gump, but it says its the Paralyze Spell.

Can I fix that? and how? or is it more complicated?
 
Sorry to see that you won't be updating your spellbar here any more, would there be any specific reason? :/
 
i put that into custom scripts, but when ingame using [spellbar it says thats not a valid command... maybe i have to put it somewhere else?
 
System works beautifully, however I'm trying to change it to meet some different needs. This can allow the complete removal of spell books from the game, however the system does check for the books.

I was able to get the gumps to ignore the checks and still allow access to the spells, however if the spell book isn't present in the bag, it disappears off the toolbar. By chance know a way to easily remove the check for the books all together? so by opening the tool bar, the player would have access to all the spells without the need of the book itself.

(I've already have the adjustments in place to cast spells without the book in the backpack)
 
To be honest, this script makes me cringe now due to how much unnecessary code and time I put into it; due to not knowing how to use forloops and lists yet.

I've been wanting to do a complete overhaul just to make it nicer and hopefully run a little more smoothly. not to mention ease of customizing the script.

I was able to get the gumps to ignore the checks and still allow access to the spells, however if the spell book isn't present in the bag, it disappears off the toolbar. By chance know a way to easily remove the check for the books all together? so by opening the tool bar, the player would have access to all the spells without the need of the book itself.
I can't remember for certain, but chances are with the way I coded it back then you'll have to remove a check for each and every spell.
 
Ehh that is what I was afraid of. I did a partial Test.

I removed the checks again for the books so they became selectable (without the book) in the backpack, and for testing I modified two spells. Create food and clumsy. I Set them both not to check for the book/spell. This allowed them to stay on the toolbar without a book in the backpack. Now when I use the spellbar and choose one of the two spells the spellbar just force closes itself, i can open it again but it doesn't work, just keeps repeating the problem. I'm not at my home machine right now, so I cannot provide the modified code, I can get it later on.

I do agree, there is a lot of repeated code here that could be simplified. So I will do what i do best, take apart code and ask questions, to hopefully help you redo sections to better improve the project.
 
tried to follow instructions on using wildcards for find/replace in VS but couldn't get it to work

but when i do get around to rewriting it i'll include your idea for no requirement to have spellbooks
 
So i followed the code path and I got it working the way I intended. Here are the line numbers I changed to SpellBarGump.cs

Line 348 - Copied the 205,13,115 down to not have to keep same color scheme on page
Code:
                        if ( HasSpell( from, 0 ) ) { AddLabel(205, 13, 1153, @"Clumsy"); }
                        else if ( !HasSpell( from, 0 ) ) { AddLabel(205, 13, 1153, @"Clumsy"); }

Line 2833 - Keep Icon on bar after selecting it from menu
Code:
            if ( !HasSpell( from, 0 ) && m_Scroll.W00_ClumsySpell == 1)

Line 3464 - Added ' ! ' to indicate the spell scroll does not exist and to permit casting which keeps icon alive as well.
Code:
                case 1: {           if ( !HasSpell( from, 0 ) ) { new ClumsySpell( from, null ).Cast(); from.SendGump( new SpellBar_BarGump( from,  m_Scroll, m_Scroll.Xo, m_Scroll.Yo ) ); } break; }

Ultimately this whole thing (fix) is a work around, still a lot of work to do here, however at least this me an idea on what needs to be adjusted and hopefully helps you come up with a better method to implement this.

Full Script is attached, tried inserting it here however for some reason servuo kept throwing the error insert a valid message to me... lol
[doublepost=1497416112][/doublepost]So the easy way to adjust the rest of the script is just replace all the HasSpell to !HasSpell . seems adjusting the color of the entries isn't required if that is done so the change is actually rather simple. Now to try to setup list and forloops. (not my strongest point LOL)
 

Attachments

  • SpellBarGump.cs
    354.6 KB · Views: 7
Last edited:
i'd rather just rewrite the system entirely.
my code back when i first wrote spellbar was terrible beyond belief
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back