|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#5 (permalink) |
|
Forum Expert
|
Well there are a few problems with these scripts. This will show you how to directly fix the problem of changing sex's.
Code:
public override bool OnEquip( Mobile from )
{
if ( from.Mounted == true )
{
from.SendLocalizedMessage( 1042561 );
}
else if ( from.BodyValue == 0x190 || from.BodyValue == 0x191 )//Change here, you dont need the from.Female = false. This is determined by 0x191 value.
{
from.BodyMod = 0x9F;
from.HueMod = 0x0;
from.PlaySound( 278 );
}
return base.OnEquip(from);
}
public override void OnRemoved( object parent )
{
if(parent is Mobile)
{
Mobile from = (Mobile)parent;
if ( from.BodyMod == 0x9F )//Change this to from.BodyMod
{
from.BodyMod = 0x0;//Change this
from.HueMod = -1;
from.PlaySound( 701 );
}
}
}
p.s. You will need to change the BodyMod values to reflect whichever script you are fixing. |
|
|
|
|
#7 (permalink) |
|
Forum Expert
|
SPeaking of which... You need to edit that if statement... As it sits you could equip the item with a mount and it would look really funky...
Code:
public override bool OnEquip( Mobile from )
{
if ( from.Mounted )
{
from.SendLocalizedMessage( 1042561 );
return false;//You need to add this in so they cant use while mounted...
}
else if ( from.BodyValue == 0x190 || from.BodyValue == 0x191 )//Change here, you dont need the from.Female = false. This is determined by 0x191 value.
{
from.BodyMod = 0x9F;
from.HueMod = 0x0;
from.PlaySound( 278 );
}
return base.OnEquip(from);
}
|
|
|
|
|
#13 (permalink) | |
|
Forum Expert
|
Quote:
Code:
public override bool OnEquip( Mobile from )
{
if ( from.Mounted )
{
from.SendLocalizedMessage( 1042561 );
return false;//You need to add this in so they cant use while mounted...
}
|
|
|
|
|
|
#15 (permalink) | |
|
Forum Expert
|
Quote:
If you have it so they CANT then it works properly. Maybe this is just a grammar misunderstanding =)- |
|
|
|
|
|
#17 (permalink) | |
|
Forum Novice
|
Quote:
|
|
|
|
|
|
#20 (permalink) |
|
Forum Expert
Join Date: Sep 2005
Location: UK
Age: 29
Posts: 781
|
great script., thanks for the update, ive been looking into making them so you can click the item. so u can use it. as yr player, and trans to the monster. all i can see is this, any info would be great.
Code:
public override void OnDoubleClick( Mobile from )
{
if ( from.FindItemOnLayer( Layer.TwoHanded ) == this )
{
if ( DateTime.Now >= PreviousUse + TimeSpan.FromSeconds(30) )
{
PreviousUse = DateTime.Now;
if ( m_Charges == 0 )
{
from.SendLocalizedMessage( 1019073 ); // This item is out of charges.
return;
}
else
{
--m_Charges;
}
switch ( m_StaffEffect )
{
case StaffEffect.Freeze: new FreezeSpell( from, null ).Cast(); break;
case StaffEffect.IceStrike: new IceStrikeSpell( from, null ).Cast(); break;
case StaffEffect.IceBall: new IceBallSpell( from, null ).Cast(); break;
}
|
|
|
|
|
#21 (permalink) | |
|
Forum Novice
|
Quote:
|
|
|
|
|
|
#23 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
#24 (permalink) |
|
Forum Expert
Join Date: Sep 2005
Location: UK
Age: 29
Posts: 781
|
ok well, ive been looking and i coulnt find it in yr old script. but i did find this, i think its more the sort of thing. maybe.
Code:
public override void OnDoubleClick( Mobile m )
{
Item i = m.FindItemOnLayer( base.Layer );
if (i != null) // Did we find an item?
{
m.AddToBackpack(i); //put the item in their backpack (unequip it)
}
m.AddItem(this); // Equip this item;
|
|
|
|
|
#25 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|