|
||
|
|
#1 (permalink) |
|
Forum Expert
|
Summary:
Expounded on Tru's Hooded Robe. Thanks to tru, he did most of the work, I just twisted a few things. Description: When Hood is up, it adds 20 to your stealing. ![]() Just add to Custom folder. [add Thievescloak Thanks! Installation: Add to custom folder |
|
|
|
|
|
#2 (permalink) |
|
Join Date: Nov 2003
Posts: 111
|
Ive seen the same code reposted in dozens of items and all have the same problem which no 1 can seem 2 fix, when the player has a lord or lady title if they use the robe it says Lord A Shrouded figure or Lady A Shrouded figure..I wonder why any1 hasnt picked that up yet or fixed the problem!
|
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#5 (permalink) | |
|
Let's have some pancakes.
|
Quote:
|
|
|
|
|
|
|
#7 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#8 (permalink) | |
|
Join Date: Nov 2003
Posts: 111
|
Quote:
Tru ur the creator of this script that every1 modifes isnt there any way u cant fix the fame issue? cos i finks its an excellent script but the fame issues stuffs it up a bit |
|
|
|
|
|
|
#9 (permalink) |
|
Guest
Posts: n/a
|
you dont set the fame to 0.. what you can do those is script it to take away say -100000 fame.. and add it back when you put the hood down.. thus it wont have to save the info.. shouldnt be hard for you to do.. if you have problems... ill do it for you.
*********************** Dled the script to look and see what i could do with it.. and heres a fix anyone with over 10000 fame will be set to -100000 when they put the hood up.. anyone with -100000 fame will be set to 12000 when they put the hood down.. now I know this isnt exact and but it will work and give them a little buffer to die and keep there title.. anyone that doesnt have 10000+ karma or -100000 karma does not get altered.. heres the modified script... Code:
using System;
using Server.Items;
namespace Server.Items
{
public class ThievesCloak : BaseArmor
{
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
public override int ArtifactRarity{ get{ return 99; } }
[Constructable]
public ThievesCloak() : base( 0x2683 )
{
Weight = 5.0;
Name = "Shroud";
}
public override void OnDoubleClick( Mobile m )
{
if( Parent != m )
{
m.SendMessage( "You must be wearing the robe to use it!" );
}
else
{
if ( ItemID == 0x2683 || ItemID == 0x2684 )
{
m.SendMessage( "You lower the hood." );
m.PlaySound( 0x57 );
ItemID = 0x1F03;
m.NameMod = null;
m.RemoveItem(this);
m.EquipItem(this);
if( m.Kills >= 5)
{
m.Criminal = true;
}
if( m.GuildTitle != null)
{
m.DisplayGuildTitle = true;
}
}
else if ( ItemID == 0x1F03 || ItemID == 0x1F04 )
{
m.SendMessage( "You pull the hood over your head." );
m.PlaySound( 0x57 );
ItemID = 0x2683;
m.NameMod = "a shrouded figure";
m.DisplayGuildTitle = false;
m.Criminal = false;
m.RemoveItem(this);
m.EquipItem(this);
SkillBonuses.SetValues( 0, SkillName.Stealing, 20.0 );
if ( m.Fame >= 10000 )
m.Fame = -50000;
}
}
}
public override bool OnEquip( Mobile from )
{
if ( ItemID == 0x2683 )
{
from.NameMod = "a shrouded figure";
from.DisplayGuildTitle = false;
from.Criminal = false;
}
return base.OnEquip(from);
}
public override void OnRemoved( Object o )
{
if( o is Mobile )
{
((Mobile)o).NameMod = null;
}
if( o is Mobile && ((Mobile)o).Fame <= -20000 )
{
((Mobile)o).Fame = 12000;
}
if( o is Mobile && ((Mobile)o).Kills >= 5)
{
((Mobile)o).Criminal = true;
}
if( o is Mobile && ((Mobile)o).GuildTitle != null )
{
((Mobile)o).DisplayGuildTitle = true;
}
base.OnRemoved( o );
}
public ThievesCloak( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
hope that helps |
|
|
|
#10 (permalink) |
|
Forum Expert
Join Date: Jun 2003
Location: The Netherlands
Posts: 647
|
Is it just me or will that not work appropiately?
Should your current fame be 10001 your fame will be set to -100000 and once you remove it you'll end up having 12000 fame. Alternatively you could have 10001 fame equip the robe, unlock your karma gain slightly above -100000 to say -99000 and then unequip. Your fame being higher than -100000 will cause the if statement in your onremove to no longer trigger leaving you with -99000 fame after de-equip. Additionally I wouldn't dare to dream of what would happen if you would use this nice -100000 fame to gain in sacrifice by dumping it on a lich. Just some thoughts that pop into my head when reading the script... I am not saying these are actual problems... but they could be :P
__________________
Captain The First _________________ Undisclosed shard (status: building since Feb. 2003) |
|
|
|
|
|
#11 (permalink) |
|
Guest
Posts: n/a
|
yes could be very exploitable.. but the players cant tell what there fame is.. could atler scafrice not to allow anything above so high.. could make it -1000000 instead, . and yes if they had 10001 they would be set to 12000.. but if they have 15000 theyll be set to 12000.. again theres no way to tell.. could make it so that every time they use the robe it drops to 9000 and doesnt return.. or write ina FameMod.. but again this is a bandaid, nothing more.. Its a start maybe someone with more time could finish it. might want to change the <= -100000 to higher number or what its set when hood is up to a lower number if you add this.. cause if they kill anything lol.. they wont get there fame back.. either way... can you sacrfice - fame? doesnt make since but *shrug* you can alter it other ways.. but *shrug* I am tired lol
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|