|
||
|
|
#1 (permalink) |
|
Join Date: Sep 2004
Age: 17
Posts: 24
|
I modified the Arrow.cs and CompositeBow.cs, changed their scripts and name etc etc...
And blew the buttons off my keyboard twice. I still haven't figured out a better way to shoot poisoned arrows without 1 million pages of script Please post here if you find any bugs or something stuff like that. Also if someone finds out a better hue for the arrows... Description: Poisons the target every succesfull hit (Lesser Poison), you can add the bow by typing [Add PoisonBow and arrows, [Add PoisonArrow Also this doesn't require any script modifications. Note:*The scripts are modified versions of the ones stored in your folder automatically when you install RunUO* Note#2: You should carefully watch the amount of the arrows, with GM Archery you usually poison your target very often. Installation: Just place the scripts in your Custom folder so everything stays arranged (if doesn't work, try placing the PoisonArrow file in Scripts\Items\Resources\Arrows\ and the PoisonBow.cs in the Scripts\Items\Weapons\Ranged\ folder.) |
|
|
|
|
|
#5 (permalink) | |
|
Join Date: Sep 2004
Age: 17
Posts: 24
|
Quote:
Because i have that in my poisonbow.cs xD I meaned that I need a somekind of a way to make a normal bow to check if the player has poisonarrows in their inventory and if so, shoot them instead of normal arrows. |
|
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
|
You don't need to make new bows or anything of that nature. To make every bow/crossbow capable of firing poisoned ammunition, you just need to create two scripts and alter one:
1. Open Arrow.cs; use the find and replace to find all instances of "Arrow" and replace them with with "PoisonedArrow" In the constructor, add Code:
Name = "poisoned arrow"; Code:
public PoisonedArrow( int amount ) : base( 0xF3F )
{
Name = "poisoned arrow";
Stackable = true;
Weight = 0.1;
Amount = amount;
}
2. Open Bolt.cs; use the find and replace to find all instances of "Bolt" and replace them with "PoisonedBolt" In the constructor, add Code:
Name = "poisoned bolt"; Code:
public PoisonedBolt( int amount ) : base( 0x1BFB )
{
Name = "poisoned bolt";
Stackable = true;
Weight = 0.1;
Amount = amount;
}
3. Open BaseRanged.cs In the constructor, add "Poison = Poison.Lesser;" so that it looks like this: Code:
public BaseRanged( int itemID ) : base( itemID )
{
Poison = Poison.Lesser;
}
In OnFired, add this code after "Container pack = attacker.Backpack;" Code:
if( attacker.Player && pack != null && (( AmmoType == typeof(Arrow) && pack.ConsumeTotal( typeof( PoisonArrow ), 1 ) ) || ( AmmoType == typeof(Bolt) && pack.ConsumeTotal( typeof( PoisonBolt), 1 ) ) ) )
{
PoisonCharges = 1;
attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
return true;
}
Code:
if ( Poison != null && PoisonCharges > 0 )
{
--PoisonCharges;
if ( Utility.RandomDouble() >= 0.75 ) // 25% chance to poison
defender.ApplyPoison( attacker, Poison );
}
I went ahead and submitted this to the FAQ section too, since a lot of people ask me how to set this up. ![]() -Hal |
|
|
|
|
|
#10 (permalink) |
|
Forum Novice
|
The constructor, in BaseRanged, for example, looks like:
Code:
public BaseRanged( int itemID ) : base( itemID )
{
}
-Hal |
|
|
|
|
|
#11 (permalink) |
|
Forum Expert
|
how about instead of em all being poisoned, with a poison potion you can poison 12 arrows at a time, and they get the poison of it, rehued, renamed, and when one poisoned via skill hits someone they get that poison? til their poisoned there normal arrows thou? any ideas?
|
|
|
|
|
|
#12 (permalink) |
|
Join Date: Jul 2004
Age: 31
Posts: 10
|
Ok how would I get deadly poison on just that bow. (dont want all my bows to shoot poison arrows just the poison bow.
So I assume I dont mess with baserange.cs at all correct? I tried altering just defender.AddToBackpack( Ammo ) defender.ApplyPoison( defender, Poison.Lesser ); but got error Do i need to add something else in the constructor similar to what you have written for altering the poison in BaseRange.cs? Very Cool script btw thanks for submitting. Just wanna test the heavier poison see if it doesnt create to big of an imbalance in the shard NVM I'm a bone head, I didnt have the file formatted correcty. Flame at will, God knows I earned that one ![]() |
|
|
|
|
|
#14 (permalink) |
|
Forum Novice
|
i've been thinking about some thing like this for a while, and i agree with Ariakas89 is it posible to take the weapon poisoning script and take a line from that add it to the arrows sothat you can use potions on em, (if any thing make a new item that you can put poison in and dip the arrows in) that way you can get the same pluses you get from having the poisoning skill....
i was also wondering if there was any way to make a script to allow you to drop say 5 tiles of oil and make flaiming arrows (or use magic arrow on it) and it makes a wall of fire. or does fire damage but the arrow can still be shot from a normal bow |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|