|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#4 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Code:
Name = "Ring Of Radiation"; Hue = 1153; Attributes.BonusHits = 50; Attributes.RegenHits = 50; Attributes.AttackChance = 5; Attributes.BonusMana = 50; Attributes.CastRecovery = 3; Attributes.CastSpeed = 6; Attributes.RegenMana = 3; Attributes.NightSight = 1; Attributes.SpellDamage = 100; Attributes.LowerManaCost = 50; Attributes.BonusDex = 50; Attributes.BonusInt = 50; Attributes.BonusStam = 50; Attributes.BonusStr = 75; Attributes.EnhancePotions = 50; LootType = LootType.Blessed; Resistances.Physical = 72; Resistances.Fire = 68; Resistances.Cold = 73; Resistances.Energy = 95; Resistances.Poison = 67;
__________________
Quote:
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." |
|
|
|
|
|
#5 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
#7 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
#8 (permalink) |
|
Forum Expert
Join Date: Mar 2005
Location: York, UK
Age: 28
Posts: 708
|
Ah a ring of 1337 Pwn. You know every time I load a thread like this I actually reduce the life of my mouse with 1 click. Not to mention the few seconds of my life that just slip away.
Anyways just some advice: Don't release items that are nothing more then a couple of lines giving an item properties. Especially when the item is as unbalancing as this one, as it doesn't really provide anything new to anybody. I believe you can find items like this under "god ring" "staff ring" "staff bracelet" "staff hat" etc etc. |
|
|
|
|
#12 (permalink) |
|
Forum Expert
Join Date: Mar 2005
Location: York, UK
Age: 28
Posts: 708
|
Right, I might have come off a bit harsh at first so I will make some suggestions instead:
When releasing a script, make a very clear description of what your script does. In this case, an item, describe it's properties and special abilities. Make sure to search for similair items, as posting something that has been done already just clutters up the forums. If you do decide to post a variation on other scripts, mention that in your post, it can provide useful information to people. It aint a bad idea in this case linking to similair things either, but that's just a form of politeness I use myself. As for poisoning everything with radiation, I am not sure what you mean. If you mean the person who equips it, you will need to put poison on the mobile equipping the ring in the OnEquip method. If you wish to poison everybody within a certain range, I suggest you look into the code for the archcure spell on how to collect mobiles within a certain range and assign an effect to them. I wouldn't really suggest making such a thing a continues effect tho, it might get really annoying to the one who wears it (and others) due the notoriety rules and such. |
|
|
|
|
#13 (permalink) |
|
Forum Novice
Join Date: Dec 2004
Age: 16
Posts: 111
|
Yea But he is new...i dont think he knows how to just make a new system added on to it. that involves spell effects Etc just give him time to complete it Mr.Shadow -1898 lol But yes an area effect WOULD suck so when your learn how to do this i advise making it possibly less rigged and make a new poison and add it to scripts.add the new file of poison and make it worse than lethal so its like a 1 second kick your butt thing heh Still though i give you a thumbs up for a new beggining of a scriptor.
|
|
|
|
|
#15 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Posts: 561
|
one of the most useful things you can have as a coding assistant is a good "search" utility so you can search files for strings. In this case, you'd search the scripts directory for all .cs files containing the string "doubleclick". Then, you will see what you need to do to get started.
note: the windows search utility is unhelpful. I have used something for years from Funduc software that is extremely powerful and yet easy to use. public override void OnDoubleClick( Mobile from ) { ....do your radiation things... } |
|
|
|
|
#16 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
and in the your radiation thing you could problably use from.InRange(xx) to find all mobiles in range of owner to hit with the radiation well you'd need to do alot more then that to get all mobiles InRange, but Look for References it InRange to see how its done in other scripts... its heavily used in my Killable Guards in multiple places... but it may help you to figure a way to collect mobiles in a specfic range to be affected by radiation or even have different effects for how close or far things are, but on that not damaging things at range 8 for player when they are trying to hide and run through a heavy combat area can attract alot of unwanted attention, but it would be thier fault for doubleclicking the ring ![]()
__________________
Quote:
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." |
||
|
|
|
|
#17 (permalink) |
|
Forum Expert
|
heres a good sujestion :>
go into your BaseWeapon.cs and find the line that looks like this: Code:
publicvirtualint AbsorbDamageAOS( Mobile attacker, Mobile defender, int damage )
{
Then IF you want to, you can add this little piece of code i have come up with. When someone hits another player, or a monster hits a player who is wearing the ring, there is a random chance of 1 in 3 that the person attacking the person with the ring will get poisoned. Of course you can change the chance from 3 to whatever you like. Find these lines: Code:
elseif ( !(defender.Weapon is Fists) && !(defender.Weapon is BaseRanged) )
{
double chance = ( defender.Skills[SkillName.Parry].Value * 0.0015 );
blocked = ( chance > Utility.RandomDouble() ); // Only skill-check if wielding a shield
}
Now add my code undernieth the above stated lines, like this: Code:
elseif ( !(defender.Weapon is Fists) && !(defender.Weapon is BaseRanged) )
{
double chance = ( defender.Skills[SkillName.Parry].Value * 0.0015 );
blocked = ( chance > Utility.RandomDouble() ); // Only skill-check if wielding a shield
}
RingOfRadiation ringofrad = defender.FindItemOnLayer(Layer.Ring) as RingOfRadiation;
if( ringofrad != null)
{
int willhit = Utility.Random(3);
if(willhit == 1)
{
attacker.Emote("I left this here so you could have a message above the victims head");
// poison (harm anim)
defender.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
defender.PlaySound( 0x474 );
defender.ApplyPoison( attacker, Poison.Greater );
}
else
{
return damage;
}
}
Restart the server and test it by hitting someone who has the ring equipped. |
|
|
|
|
#18 (permalink) |
|
Join Date: Apr 2005
Age: 19
Posts: 103
|
Should It look like this?
using System; using Server; namespace Server.Items { public class RingOfRadiation : GoldRing { public override int ArtifactRarity{ get{ return 15; } } [Constructable] public RingOfRadiation() { Name = "Ring Of Radiation"; Hue = 1153; Attributes.BonusHits = 50; Attributes.RegenHits = 50; Attributes.AttackChance = 5; Attributes.BonusMana = 50; Attributes.CastRecovery = 3; Attributes.CastSpeed = 6; Attributes.RegenMana = 3; Attributes.NightSight = 1; Attributes.SpellDamage = 100; Attributes.LowerManaCost = 50; Attributes.BonusDex = 50; Attributes.BonusInt = 50; Attributes.BonusStam = 50; Attributes.BonusStr = 75; Attributes.EnhancePotions = 50; LootType = LootType.Blessed; Resistances.Physical = 72; Resistances.Fire = 68; Resistances.Cold = 73; Resistances.Energy = 95; Resistances.Poison = 67; } public RingOfRadiation( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); } public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); } elseif ( !(defender.Weapon is Fists) && !(defender.Weapon is BaseRanged) ) { double chance = ( defender.Skills[SkillName.Parry].Value * 0.0015 ); blocked = ( chance > Utility.RandomDouble() ); // Only skill-check if wielding a shield } RingOfRadiation ringofrad = defender.FindItemOnLayer(Layer.Ring) as RingOfRadiation; if( ringofrad != null) { int willhit = Utility.Random(3); if(willhit == 1) { attacker.Emote("I left this here so you could have a message above the victims head"); // poison (harm anim) defender.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist ); defender.PlaySound( 0x474 ); defender.ApplyPoison( attacker, Poison.Greater ); } else { return damage; } } } } Cause I got alot of errors with it |
|
|
|
|
#20 (permalink) |
|
Forum Expert
Join Date: Mar 2005
Location: York, UK
Age: 28
Posts: 708
|
More easely and in line with what he wanted he could use a OnDoubleClick method to achieve poisoning people within a certain radius and not change his BaseWeapon.cs
But that depends on what he exactly wishes to accomplish. |
|
|
|
|
#22 (permalink) |
|
Join Date: Apr 2005
Age: 19
Posts: 103
|
ok, so what if I were to want it to be where the person that hits you, and or the person you hit gets poisoned with a 1 in 4 chance like mentioned before? how would I do that?
oh and I did this one this morning.....I think I like it more than the ring....it's not too uber, and it is somethin I think I would like to make a doom stealable.....but how would I make it a stealable? sry about all the questions, I'm just new to scripting..... |
|
|
|
|
#23 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
Attributes.BonusStr = 16; is still a little high, as far as making them into a doom rare that is stealable you'd have to look at the two stealable rare packages one is part of ArteGordon's XMLSpawner system and the other can be found in its own thread. I use the one that is designed to work with Nerun's system. It inherits from a Custom Artifact file to make it a stealable rare. As far that the first question im not sure how to make it so an Item detects when something is hit... I'd track down how its done in BaseArmor (think its there) to see how it checks OnHit, then make a Utilitity.Random(xx) check somehow that would make a 25% chance of being affected by said affect.
__________________
Quote:
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." |
||
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|