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

Lucid Nagual's << Advanced Archery >>

Lucid Nagual's
<< Advanced Archery v[2]0.3 (c) >>
================================

******************************************
* _____Created by: Lucid Nagual & Rift______ *
******************************************


Note: Special thanks to Rift for his help and contribution to this project. This system would have never been complete without Rift's help. Other thanks to those who have lent they're support and contributions to this system.


!This system comes with the following:
- New bows & crossbows:
Bow, composite bow, crossbow, elven composite longbow, heavy crossbow, magical shortbow, repeating crossbow, wildfire bow and yumi bow.
- New arraows & bolts:
Poison, explosive, armor piercing, freeze and lightning arrows.
- Special arrow dip tubs (for rewards or to be placed on vendors):
Poison, explosive, armor piercing, freeze and lightning dip tubs.
- Quivers:
An ultimate and elven quiver (a container that reduces arrow weight by 30%). The quivers are also dyable and can hold attributes.

!How to set the arrowtype on the bows:
- Shift-Click on bow to set which arrows to use.

The quiver took me a few days to script I hope you like it :)


!Installation Instructions:
Note: These instructions are for those that wish to save the Arrow Selections. The arrow selection stays at last setting untile reselected.

1. Getting you familiar with serialize/deserialization: Your serialization saves your bow info (arrow selection). Your deserialization reads your bow info (arrow selection) on boot up.
2. You can't have your script read your deserialization if it hasn't been saved. It simply doesn't contain the saved info yet. So understanding that we need to boot your shard without your serialization.
3. You want the shard to save the info (arrow selection) after boot up. So in order to do that, the serialization must be added before the boot up. You will be doing this without the deserialization, like this (look at the line commented out in blue):
Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int) 0); // version
 
            writer.WriteEncodedInt((int)m_ArrowType);
        }
 
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
 
            [COLOR=blue]//[/COLOR]m_ArrowType = (ArrowType)reader.ReadEncodedInt();
 
            if (Weight == 7.0)
                Weight = 6.0;
        }
4. After booting your shard, save it, and then shut it down.
5. Get rid of the brackets were commented out, and save the script. Look at the example:
Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0); // version
 
            writer.WriteEncodedInt((int)m_ArrowType);
        }
 
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
 
            m_ArrowType = (ArrowType)reader.ReadEncodedInt();
 
            if (Weight == 7.0)
                Weight = 6.0;
        }
6. Reboot your shard, save it and your done. If you follow these dirrections properly you will not have to delete any existing bows or composite bows, ect.
7. To remove these scripts you must reverse these directions. Save shard, comment out the serialization, save the script, reboot the server, save the server, shut down the server, comment out deserialization, save the script, reboot the server, and then save the server. Add in old scripts.

==================================================

!Updates:
Updated v[1].0.2b:
-Added the elven quiver
-Added crossbows & bolts
-Added new bows
-Added two new types of arrows and bolts
-Added random damage & random levels of poison (for poison arrows)
-Fixed the drag and drop issue
-Fixed the dip tub charge issue


Updated v[1].0.3:
-Fixed skill mod issue. Thanks Drac!
-Fixed BaseRanged.cs warning.
-Parcially fixed the weight issue. Needs more work, but at least weight won't go negative when ammo is emptied.

Updated v[1]0.4:
-Added new bows.

Updated v[2].0.1:
-Changed BaseRanged.cs to CBaseRanged.cs for an easier install.
-Fixed serialization in all Bows for an easier install.
-Fixed bug with the Dip Tubs. Doesn't crash when targeting mobiles.
-Bolts are now functional thanks to blkdrac.

Updated v[2].0.2:
-Fixed Internal Map/Item issue.....thx to Lumberman and Ray.

Updated v[2].0.2b:
-Fixed a couple of warnings, thanks Greystar.

Updated v[2].0.2c:
-Fixed the ArcheryButtAddon, thanks Greystar.

Updated v[2].0.3:
-Added the BaseQuiver. Thanks Dracana!
-Changed layer to middletorso so cloaks can be worn. Thanks Dracana!
-Added lower reagent cost attribute. Thanks Dracana!

Updated v[2].0.3 (b):
Improved the CBaseRanged. Wasn't pulling arrows from backpack and quiver proper.

Please follow instructions closely.
 

Attachments

  • Lucid Nagual's Advanced Archery v[2]0.3c.zip
    47.2 KB · Views: 632

endwolf

Sorceror
Did I miss something?

There is no ref to any Explosive or Armor Piercing Arrows. I get 15 errors from this...Oh and Good morning. Cant wait for the files. :D
 

Manu

Knight
I'll try it out tonight and Dude, if that works I'll setup a statue with your name on it on the shard !! ;)
 
Please post the errors someone. That way I can find out what is missing. It's a nice system. I know you'll like it.

Edit: Ohhhhh.
Sry guys I forgot some scripts. Been up late programming and working during the day for 2 weeks now. I'm exhasted. Hope you like it :) Redownload the scripts again :)
 
I'll try it out tonight and Dude, if that works I'll setup a statue with your name on it on the shard !! ;)
I could use some Karma too (hint). Let me know how you like it and I'm deeply sorry about the missing files. See ya guys later I gotta crash for a few hours. ZzZzZzZzzzzzzzzzzzzzzzzzz
 

endwolf

Sorceror
Sweet

Lucid Nagual said:
Please post the errors someone. That way I can find out what is missing. It's a nice system. I know you'll like it.

Edit: Ohhhhh.
Sry guys I forgot some scripts. Been up late programming and working during the day for 2 weeks now. I'm exhasted. Hope you like it :)


Thx Lucid....Its A VERY nice sys...as always great job!!! :cool:
Remember sleep is a "good" thing...hehe
 

Alis

Wanderer
Thats a great job i was wishing to see something as an addition when an using a poisnones arow it shoul write something like pours the posion ivy on the arrow and slams on the target.
 

Foreverzero

Wanderer
I added this to my shard and did some testing. Its a great system except only a normal bow can use any of the ammo types. Composite bows, elf bows, and crossbows cant use the diff ammo types and there isnt a section for bolts.

Plus the quiver only shows archery +3 but the script shows it should have more attributes then that.

Other then that great script.
 

omagaalpha

Wanderer
script seem missing function
Code:
 - Error: Scripts\Items\Weapons\Ranged\BaseRanged.cs: CS0246: (line 59, column 2
2) The type or namespace name 'DoubleShot' could not be found (are you missing a
 using directive or an assembly reference?)
 
I added this to my shard and did some testing. Its a great system except only a normal bow can use any of the ammo types. Composite bows, elf bows, and crossbows cant use the diff ammo types and there isnt a section for bolts.

Plus the quiver only shows archery +3 but the script shows it should have more attributes then that.

Other then that great script.
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.
 
omagaalpha

script seem missing function
Code:
- Error: Scripts\Items\Weapons\Ranged\BaseRanged.cs: CS0246: (line 59, column 22) The type or namespace name 'DoubleShot' could not be found (are you missing a using directive or an assembly reference?)​
Opps. How did that SE stuff get in there? OK here is the fix and I will update the package. Thx for the report.

*Edit: Moved.
 

omagaalpha

Wanderer
for odd reson doubleS was not comment out
- Error: Scripts\Items\Weapons\Ranged\BaseRanged.cs: CS0103: (line 69, column 12) The name 'doubleS' does not exist in the class or namespace 'Server.Items.BaseRanged'
 
omagaalpha

for odd reson doubleS was not comment out

Quote:
- Error: Scripts\Items\Weapons\Ranged\BaseRanged.cs: CS0103: (line 69, column 12) The name 'doubleS' does not exist in the class or namespace 'Server.Items.BaseRanged'
Crap sorry missed a spot. Here is another try it.
 

Attachments

  • BaseRanged.cs
    5.3 KB · Views: 94
Thanks. I am currently working on the composite bow. I will also look into adding the "Damage Modifier" to the quiver. And have found out what my GetProperties problem is.
 
Top