Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 03-25-2008, 09:07 PM   #1 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,038
Send a message via Yahoo to Lord_Greywolf
Default Some fixes for Craft System

Well most people know you can require Mana for crafting, but it does not show the requirements
(it will say if you need mana only if it also requires a scroll, etc - not fully usefull)

but most did not know - you can also require Stam or Hit Points as well
but will not show that it is required, unless you do not have enough and fail, little late lol

well these couple of mods will allow you to see that they are required or not, and how much

I do not suggest you require all 3, only because there is only 4 spots for lines to be shown in there, and would also include the blank scroll part and or if material changes hue, makers mark, etc etc

over 4 lines and they are "lost"

anyways - 1 place to add to and 1 place to modify in GraftGumpitem.cs file
(it is in the engines/craft/core directory)

Add in:
find this:
Code:
			if ( craftItem.UseAllRes )
				AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1048176, LabelColor, false, false );
and right below it add in this:

Code:
			if ( craftItem.Mana > 0 )
			{
				string manastr = "Requires Mana: " +  Convert.ToString(craftItem.Mana);
				AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1042971, manastr, LabelColor, false, false );
			}

			if ( craftItem.Stam > 0 )
			{
				string stamstr = "Requires Stamina: " +  Convert.ToString(craftItem.Stam);
				AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1042971, stamstr, LabelColor, false, false );
			}

			if ( craftItem.Hits > 0 )
			{
				string hitsstr = "Requires Hit Points: " +  Convert.ToString(craftItem.Hits);
				AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1042971, hitsstr, LabelColor, false, false );
			}
then for the mod:

find:
Code:
			if ( cropScroll )
				AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 360, 18, 1044379, LabelColor, false, false );
and replace it with this:

Code:
			if ( cropScroll )
			{
				string scrollstr = "Requires a Blank Scroll:";
				AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1042971, scrollstr, LabelColor, false, false );
			}
and restart the server

and to use them, incase you did not know:

make sure you have it with an index = AddCraft( typeof( for the begining of the craft
and then just add one of these:
SetManaReq( index, 100 );
SetStamReq( index, 100 );
SetHitsReq( index, 100 );
just replace the 100 with the mana required

after the addskill or addres, etc part of it, but before the next item

and here is what it looks like then in the inscription area and on a new craft with all 3 being used
Attached Images
File Type: jpg Craft-1.jpg (113.4 KB, 79 views)
File Type: jpg craft-2.jpg (115.6 KB, 54 views)
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 03-25-2008, 09:21 PM   #2 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
Default

Why did you change

1044379 // Inscribing scrolls also requires a blank scroll and mana.

to

1042971 //~1_NOTHING~

I get the other change but why add the

string scrollstr = "Requires a Blank Scroll:";

when you don't need it.. Or was that because you split off the showing of required mana, so you changed it to show something else?

Just want to know why I'm changing something.
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Old 03-25-2008, 09:27 PM   #3 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,038
Send a message via Yahoo to Lord_Greywolf
Default

if you do not change it it then shows:

requires mana 8
this also requires mana and a blank scroll

so it shows it requires mana twice then
you do not have to do the mod, but then like i said - it repeats itself

and the ~1nothing~ just means - what ever you put in for it to say - it says - nothing is added to it
so it works for this situation perfectly
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 03-25-2008, 09:33 PM   #4 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
Default

Quote:
Originally Posted by Lord_Greywolf View Post
if you do not change it it then shows:

requires mana 8
this also requires mana and a blank scroll

so it shows it requires mana twice then
you do not have to do the mod, but then like i said - it repeats itself

and the ~1nothing~ just means - what ever you put in for it to say - it says - nothing is added to it
so it works for this situation perfectly
I know how the clilocs work I was just asking, thanks for clarifying!

Thanks for the mod. I was just thinking about adding a couple of craft items that require hits to craft too.

PS) have some Karma++
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Reply

Bookmarks

Tags
craft system, crafting, fixes


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

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

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



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