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 >>

dracana

Sorceror
+Karma for you!

Installed and tested and everything works fine. Great job! Can't wait for the addition of the rest of the ranged weapons :)

Thanks Lucid!

*goes to update cleanup command script to pickup new arrows*
 

Kamron

Knight
Nagul, your approach is interesting, although how come you put the double click method for arrows into the bow, and not into the baseranged? What if someone created a baseranged item which is not based off of the bow? Its a small technicality, although it makes things alot easier in my opinion.

Also you have checks such as
Code:
else if ( Ammo is ArmorPiercingArrow )

You could do a check for something to the effect of

Code:
if ( Ammo is BaseArrow )
((BaseArrow)Ammo).Hit( attacker, defender );

This would allow you to add more Arrow types, without having to add more code changes to the BaseRanged file.

Also something I was thinking was, what if they were not using a quiver, then they could not use these different arrows? Another method of allowing them to select arrows, is to let them double click the arrows themselves, which would switch the arrow type. Just food for thought of course.

Another suggestion is if the tub files you have are so similar, you could make an abstract BaseDipTub object, and inheret each one after that. The unique messages and arrow type could be held in properties.
 
XxSP1DERxX

Nagul, your approach is interesting, although how come you put the double click method for arrows into the bow, and not into the baseranged? What if someone created a baseranged item which is not based off of the bow? Its a small technicality, although it makes things alot easier in my opinion.

Also you have checks such as
Code:
else if ( Ammo is ArmorPiercingArrow )​


You could do a check for something to the effect of


Code:
if ( Ammo is BaseArrow )((BaseArrow)Ammo).Hit( attacker, defender );​


This would allow you to add more Arrow types, without having to add more code changes to the BaseRanged file.

Also something I was thinking was, what if they were not using a quiver, then they could not use these different arrows? Another method of allowing them to select arrows, is to let them double click the arrows themselves, which would switch the arrow type. Just food for thought of course.

Another suggestion is if the tub files you have are so similar, you could make an abstract BaseDipTub object, and inheret each one after that. The unique messages and arrow type could be held in properties.
I appreciate your input Spider. I will make some of the changes you pointed out as soon as I get a chance. I was in too much of a hurry to make a BaseTub it was quicker for me to do a "find/replace" to make the different tubs, but I will do as you suggested. Thanks :)
 

endwolf

Sorceror
oooooooooo

Sounds like a interesting update...Waiting Patiantly....NOT...actually Ill check for the update every 3 seconds...lol
 
Attention!

Update v1.0.1!
-Fixed GetProperties
-Added the Composite Bow.


Up coming release:
-Will have Crossbows and bolts.
-Switch to base files.

All suggestions are welcome. And thank you for the nice feedback and comments. I am very greatful. ~Enjoy!~
 

Kamron

Knight
Nagual, what I did for my previous shard (its not ported to my new shard yet), is where ALL bows use different 'arrow types' as I call them, unless you specify otherwise (a property).

This will make it so that you don't have to edit the bow/composite bow/any other bow to SPECIFICALLY use your arrow types.

Then you just have code in your BaseRanged that says, if it doesn't override the ArrowType, use whatever they selected as an arrow.

You can also put the bow/crossbow doubleclick to select the arrows/bolts into BaseRanged and use Ammo in conjuction with item typeof( Arrow ) and item typeof( Bolt ) as a way to determine whether to use different arrow types, different bolt types, or neither.
 
XxSP1DERxX

Nagual, what I did for my previous shard (its not ported to my new shard yet), is where ALL bows use different 'arrow types' as I call them, unless you specify otherwise (a property).

This will make it so that you don't have to edit the bow/composite bow/any other bow to SPECIFICALLY use your arrow types.

Then you just have code in your BaseRanged that says, if it doesn't override the ArrowType, use whatever they selected as an arrow.

You can also put the bow/crossbow doubleclick to select the arrows/bolts into BaseRanged and use Ammo in conjuction with item typeof( Arrow ) and item typeof( Bolt ) as a way to determine whether to use different arrow types, different bolt types, or neither.
OK I made the BaseArrow.cs which contains the ArrowTypes in it. How would I call it in BaseRanged.cs? I appreciate your advice, thank you.
 

Manu

Knight
Kicking a lot of errors at me:

Code:
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 (2100 items, 595 mobiles)
World: Loading...An error was encountered while loading a saved object
 - Type: Server.Items.Frostbringer
 - Serial: 0x40018A03
Delete the object? (y/n)
y
Delete all objects of that type? (y/n)
y
After pressing return an exception will be thrown and the server will terminate

Error:
System.Exception: Load failed (items=True, mobiles=False, guilds=False, regions=
False, type=Server.Items.Frostbringer, serial=0x40018A03) ---> System.Exception:
 ***** Bad serialize on Server.Items.Frostbringer *****
   at Server.World.Load()
   --- End of inner exception stack trace ---
   at Server.World.Load()
   at Server.ScriptCompiler.Compile(Boolean debug)
   at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

This came up with Bow, CompositeBow, JukaBow, BowoftheJukaKing, TheDryadBow and the above Frostbringer. After I let it delete all of them, the server now starts fine.
 
yeah there is a way to work it in and out with serl/deserl. But instead of posting those instructions I am going to remove this version. I am almost done with the new release doesn't call for a serl/desrl change in the bow, composite, ect. I have to work out a couple more issues then I will post it. Thank you for your patience.
 

etherkye

Wanderer
well if you'd told me the errors before, my shard would currently be working. as it is i got to wait till tomorrow cause of the errors.
 
etherkye

Reinstall your old scripts and remove mine. I have the same bows as you do and have no such errors. All serl/desrl works the same way as example: the PlayerMobile.cs. When installing a serl/desrl edit you start with the write, save the shard, then boot with the read. But like I said I am not going to get into that. Sometimes I forget that other people don't know how to do these things. So I will make a new release along the lines of what Sp1Der told me.

I will post how to remove the serl/desrl when I am done with the next release. But I have a life outside of RunUO so it may take a few hours or a few days.
 

etherkye

Wanderer
well if you'd told me it wouldn't be a problem :p

My test runs on differnt saves from my server, and my server is 30 mins away.
 
etherkye

well if you'd told me it wouldn't be a problem :p

My test runs on differnt saves from my server, and my server is 30 mins away.
I have no idea what you are talking about. You were the first to report the problem correct? So you wanted me to tell you before you reported it? I didn't recognize the issue when I first posted it. Like I said I know how to add it and remove it proper.
 

Manu

Knight
etherkye said:
it doesn't matter now. Whats done is done.

I'll just wait for the update XD

That's what test shards are for, dude. If you just kick every new script into your live shard and something goes wrong, thats just stupid :/
 
Top