[set [props item restriction!
I Have donation tokens in my shard but i want to make it so that only the owners (at this point) can Edit Them ... Right now i have it so only owners can [add them and they cannot be Duped by anyone but if say a GM gets their hands on some and want a few more all they have to do is [props and change the amount or [set amount how do i restrict these to a certain access level or make it so no one can do it ... I Have been trying for over a week all sorts of ways i have changed everything i had back to before i started trying to remove the [props,[set access.. is there a way to do it through the item or what im totally lost ive searched hundreds of scripts and cant find anything ... Help Please!
Donation Tokens Only Rewards Tokens Im Not Worried About!
Any Help Is Greatly Appreciated!
Thanks!
I Have donation tokens in my shard but i want to make it so that only the owners (at this point) can Edit Them ... Right now i have it so only owners can [add them and they cannot be Duped by anyone but if say a GM gets their hands on some and want a few more all they have to do is [props and change the amount or [set amount how do i restrict these to a certain access level or make it so no one can do it ... I Have been trying for over a week all sorts of ways i have changed everything i had back to before i started trying to remove the [props,[set access.. is there a way to do it through the item or what im totally lost ive searched hundreds of scripts and cant find anything ... Help Please!
Donation Tokens Only Rewards Tokens Im Not Worried About!
PHP:
using System;
namespace Server.Items
{
public class DonationToken : Item
{
public override double DefaultWeight
{
get { return 0.02; }
}
[Constructable(AccessLevel.Owner)]
public DonationToken() : this( 1 )
{
}
[Constructable(AccessLevel.Owner)]
public DonationToken( int amountFrom, int amountTo ) : this( Utility.RandomMinMax( amountFrom, amountTo ) )
{
}
[Constructable(AccessLevel.Owner)]
public DonationToken( int amount ) : base( 0xEED )
{
Stackable = true;
Amount = amount;
Hue = 37;
Name = "Donation Token";
}
public DonationToken(Serial serial): base(serial)
{
}
public override int GetDropSound()
{
if ( Amount <= 1 )
return 0x2E4;
else if ( Amount <= 5 )
return 0x2E5;
else
return 0x2E6;
}
protected override void OnAmountChange( int oldValue )
{
int newValue = this.Amount;
UpdateTotal(this, TotalType.Gold, newValue - oldValue);
}
public override int GetTotal( TotalType type )
{
int baseTotal = base.GetTotal( type );
if ( type == TotalType.Gold )
baseTotal += this.Amount;
return baseTotal;
}
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();
}
}
public class RewardToken : Item
{
public override double DefaultWeight
{
get { return 0.02; }
}
[Constructable]
public RewardToken() : this(1)
{
}
[Constructable]
public RewardToken(int amountFrom, int amountTo)
: this(Utility.RandomMinMax(amountFrom, amountTo))
{
}
[Constructable]
public RewardToken(int amount): base(0xEED)
{
Stackable = true;
Amount = amount;
Hue = 1072;
Name = "Reward Token";
}
public RewardToken(Serial serial)
: base(serial)
{
}
public override int GetDropSound()
{
if (Amount <= 1)
return 0x2E4;
else if (Amount <= 5)
return 0x2E5;
else
return 0x2E6;
}
protected override void OnAmountChange(int oldValue)
{
int newValue = this.Amount;
UpdateTotal(this, TotalType.Gold, newValue - oldValue);
}
public override int GetTotal(TotalType type)
{
int baseTotal = base.GetTotal(type);
if (type == TotalType.Gold)
baseTotal += this.Amount;
return baseTotal;
}
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();
}
}
}
Any Help Is Greatly Appreciated!
Thanks!