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!

Lucid Nagual's << Advanced Archery >>

Valrot

Wanderer
yes that is exactly what i was trying to do. good idea for the dye tubs too.it never occured to me to do those. this script is kick ass.
 
forget what i edited out from here - i was wrong before - it is in each type of weapon
(bow, compositbow, etc)

and it might be Skills.SkillName.Archery also - not sure - been a while since i had to "read" the skill
 
the specialabilities are also tied into the graphic i have found
and if you change them, then you can not use them right at all
I have tried on many weapons and can not get them then to use the new ones (like shadow strike on a longsword that is an assassins blade, etc)

weird on how they work
 

Valrot

Wanderer
Still have not gotten skill check on the arrows right. i have tried editing the bow.cs to include skill checks after arrow selection and it gives me error expected msgs. i looked in the other scripts to find and easier way to do it and nothing works yet. I have to admit i have not seriously scripted for about 2 years and most of what i knew b4 i am relearning again. hopefully Lucid Nagual will include this in the updates, so i dont have to continue to beat my head against the desk.
 

Lord_Shaka

Wanderer
Hello Lucid,

I think your IDEA is great !!!

I had one nice idea in the past too.... it was in use in SPHERE shard for years...

It is a system like yours but, with the BOWS, we had:

Fire Bow,

Ray Bow,

Aqua Bow e

Vine Bow,

Maybe this is a good IDEA for a new addition for your system,

:)
 

Elsa

Wanderer
Mmm... not quite sure...

RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.net scripts...no files found.
Scripts: Verifying...done (2633 items, 680 mobiles)
World: Loading...An error was encountered while loading a saved object
- Type: Server.Items.Bow
- Serial: 0x400D1E25
Delete the object? (y/n)
n
After pressing return an exception will be thrown and the server will terminate



what exactly do i need to do?
it asked me to do the same thing with i think a cross bow or something similar (some kindof bow) i hit 'y' and then it asked if i wanted to remove them from the whole shard... i hit 'n' then it sent me through it again so i hit 'y' both times and now it's giving me more of these errors with a different bow this time... i'm worried it'll go through every bow type
 

Greystar

Wanderer
Elsa said:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.net scripts...no files found.
Scripts: Verifying...done (2633 items, 680 mobiles)
World: Loading...An error was encountered while loading a saved object
- Type: Server.Items.Bow
- Serial: 0x400D1E25
Delete the object? (y/n)
n
After pressing return an exception will be thrown and the server will terminate



what exactly do i need to do?
it asked me to do the same thing with i think a cross bow or something similar (some kindof bow) i hit 'y' and then it asked if i wanted to remove them from the whole shard... i hit 'n' then it sent me through it again so i hit 'y' both times and now it's giving me more of these errors with a different bow this time... i'm worried it'll go through every bow type


It will go through every bowtype cause you didnt follow directions in the beginning, but if you have no players just respawn all your mobs and they will get their weapons back so its really no big deal... if you have some players and they use bows there may be a problem... otherwise re-read the first post...
 

Anvil

Wanderer
It would actually be better to put the skillcheck on the dip tubs and leave the bows alone as far as skill, unless you wanted a check to say that only a certain skill level could use the different bows based off the archery skill. There really shouldn't be a check to see which type of arrow you can fire since really anyone could fire any type of arrow/bolt. Your concern should be for the fletcher who's making the arrow which will in turn give your fletchers a source of income.. I don't know of many archers who actually get their poisoning skills up there since poisoning was really used in alchemy... but that's just my $.02...

Anvil
 
i can see the skill being required on the arrows also

because the tips have been weighted differently, can scratch you to poison you, or if not handled correctly - blow up in your hands, etc the archery & other skills then would show that you could handle the differences with these arrows/bolts

(in RL switching from just a 125 grain tip to a 135 grain tip makes a big difference in hitting your target, so it takes more skill to be just as accurate and to compensate for the changes)
 

Anvil

Wanderer
That's getting a little more granular then what I care for but hey, if that's what you want by all means go for it :)
 

KillerBeeZ

Knight
Lucid Nagual said:
This is only for bows at this point in time. Bolts can still be stored in the quiver and weigh less. AS far as the attributes go....I tried adding more than one and the name of the bow disappears. Kinda like I'm only allowed 3 slots for the GetProperties. If I knew a way around this I would fix it. Sorry.

I had this same problem at one point... here is the workaround for it

http://www.runuo.com/forums/showthread.php?t=55976&highlight=properties
 

Valrot

Wanderer
Anvil said:
It would actually be better to put the skillcheck on the dip tubs and leave the bows alone as far as skill, unless you wanted a check to say that only a certain skill level could use the different bows based off the archery skill. There really shouldn't be a check to see which type of arrow you can fire since really anyone could fire any type of arrow/bolt. Your concern should be for the fletcher who's making the arrow which will in turn give your fletchers a source of income.. I don't know of many archers who actually get their poisoning skills up there since poisoning was really used in alchemy... but that's just my $.02...

Anvil

My whole reasoning for the skill check on the arrow type is exactly what greywolf stated before. think about it, lets use juggling as the metaphor. if you can juggle tennis balls, does that mean you can juggle chainsaws too? you have to get better with the tennis balls first before you can goto chainsaws or flaming torches.
 
I still have an issue with the weight returning to normal when the arrows/bolts are used. And I need to know....does the baseaddon edit work for anyone? Is there anyone that gets the building menu from clicking the saw? These are prolly issues that need to be taken care of next.
 

Greystar

Wanderer
Lucid Nagual said:
I still have an issue with the weight returning to normal when the arrows/bolts are used. And I need to know....does the baseaddon edit work for anyone? Is there anyone that gets the building menu from clicking the saw? These are prolly issues that need to be taken care of next.

erm I think the saw question belongs in your other thread... ill look at the weight and the quivers though... I never noticed, nor did i really pay attention to weither or not it changed.

EDIT: after doing some research, even though you CAN put the layer as MiddleTorso it doesnt like being there... you still have to make sure you cloak is off before you can put it on, however once you put it on you can put your cloak back on... unless that is intentional, but i don't think it is... also I think on actual OSI the quiver does take the spot of cloak, if I recall seeing the pub about when they where added.. Also Im still trying to find a way to make the archerybutt recognize arrows/bolts in a quiver while its being worn... I got it so it can recognize it while its in the backpack (the quiver that is) but it seems to be fighting finding it on a layer... also the weight reductions is well... odd if you drop some arrows/bolts onto a quiver that already contains some arrows/bolts it will display the correct weight, however if you place them in an empty quiver it displays the incorrect weight... Still working on this to (and yes I did use InvalidateProperties()l to make sure it was updating).

Partially FIXED QUIVER DETECTION OF ARCHERY BUTT

still working on the above fix.
 

Elsa

Wanderer
(in reguards to my last post)

It will go through every bowtype cause you didnt follow directions in the beginning, but if you have no players just respawn all your mobs and they will get their weapons back so its really no big deal... if you have some players and they use bows there may be a problem... otherwise re-read the first post...

This is above what you're refering to:
Note: These instructions are for those that wish to save the Arrow Selections. The arrow selection stays at last setting untile reselected.

sorry, i read it off as being optional.
 

Anvil

Wanderer
Greystar, I added your changes to the butte and I'm getting the following error now:

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (6 errors, 8 warnings)
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0246: (line 17
4, column 4) The type or namespace name 'BaseQuiver' could not be found (are you
 missing a using directive or an assembly reference?)
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 17
5, column 9) The name 'quiver' does not exist in the class or namespace 'Server.
Items.ArcheryButte'
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 17
6, column 5) The name 'quiver' does not exist in the class or namespace 'Server.
Items.ArcheryButte'
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 18
3, column 9) The name 'quiver' does not exist in the class or namespace 'Server.
Items.ArcheryButte'
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0246: (line 18
5, column 11) The type or namespace name 'quiver' could not be found (are you mi
ssing a using directive or an assembly reference?)
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 19
6, column 13) The name 'quiver' does not exist in the class or namespace 'Server
.Items.ArcheryButte'
 

Greystar

Wanderer
Anvil said:
Greystar, I added your changes to the butte and I'm getting the following error now:

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (6 errors, 8 warnings)
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0246: (line 17
4, column 4) The type or namespace name 'BaseQuiver' could not be found (are you
 missing a using directive or an assembly reference?)
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 17
5, column 9) The name 'quiver' does not exist in the class or namespace 'Server.
Items.ArcheryButte'
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 17
6, column 5) The name 'quiver' does not exist in the class or namespace 'Server.
Items.ArcheryButte'
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 18
3, column 9) The name 'quiver' does not exist in the class or namespace 'Server.
Items.ArcheryButte'
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0246: (line 18
5, column 11) The type or namespace name 'quiver' could not be found (are you mi
ssing a using directive or an assembly reference?)
 - Error: Scripts\Custom\Advanced Archery\ArcheryButteAddon.cs: CS0103: (line 19
6, column 13) The name 'quiver' does not exist in the class or namespace 'Server
.Items.ArcheryButte'


first did you add Lucids' newest update (IE 2.0.3) without that you want have a BaseQuiver... second... my fix isnt perfect, still working on it... goes and removes code in thread.

Okay final testing of my ArcheryButt fix completed... However you NEED to have version 2.0.3 of the Advanced Archery installed to make this work cause it needs to have the BaseQuiver available.

Change the following code in your ArcheryButtAddon
Code:
			Container pack = from.Backpack;
			Type ammoType = bow.AmmoType;

			bool isArrow = ( ammoType == typeof( Arrow ) );
			bool isBolt = ( ammoType == typeof( Bolt ) );
			bool isKnown = ( isArrow || isBolt );

			if ( pack == null || !pack.ConsumeTotal( ammoType, 1 ) )
			{
				if ( isArrow )
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500594 ); // You do not have any arrows with which to practice.
				else if ( isBolt )
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500595 ); // You do not have any crossbow bolts with which to practice.
				else
					SendLocalizedMessageTo( from, 500593 ); // You must practice with ranged weapons on this.

				return;
			}

to look like

Code:
			Container pack = from.Backpack;
			Container quiver = (Container)from.FindItemOnLayer( Layer.Cloak ); //You will also need to change this to Layer.MiddleTorso
			if ( quiver == null )
				quiver = (Container)pack.FindItemByType( typeof( BaseQuiver ) );
			Type ammoType = bow.AmmoType;

			bool isArrow = ( ammoType == typeof( Arrow ) );
			bool isBolt = ( ammoType == typeof( Bolt ) );
			bool isKnown = ( isArrow || isBolt );
			bool usedquiver = false;
			bool usedpack = false;

			if ( quiver != null )
				usedquiver = quiver.ConsumeTotal( ammoType, 1 );
			if ( pack != null && !usedquiver )
				usedpack = pack.ConsumeTotal( ammoType, 1 );

			if ( !usedquiver && !usedpack )
			{
				if ( isArrow )
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500594 ); // You do not have any arrows with which to practice.
				else if ( isBolt )
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500595 ); // You do not have any crossbow bolts with which to practice.
				else
					SendLocalizedMessageTo( from, 500593 ); // You must practice with ranged weapons on this.
				return;
			}
 

Anvil

Wanderer
Ok, I didn't have the latest version installed, my bad. Thanks for the update. Shit, never do things in a hurry... I just screwed myself *sigh*... have to re-do my bowyer buy/sell menu... I deleted it by accident *laughs at self*
 
Top