Go Back   RunUO - Ultima Online Emulation > RunUO > General Discussion

General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT!

Reply
 
Thread Tools Display Modes
Old 12-01-2002, 09:53 PM   #1 (permalink)
 
Join Date: Nov 2002
Posts: 222
Send a message via ICQ to moocow
Default Duping

Whenever i dupe something... heres an exp... If I made a katana and turned on vanquishing, then i duped the sword, only the new creation would be a vanquish katana, the first sword would just become a regular katana. I'm sure this is a well known problem with some people if not everyone. Is there a revised script to fix this?
moocow is offline   Reply With Quote
Old 12-01-2002, 09:58 PM   #2 (permalink)
Lost User
Guest
 
Posts: n/a
Default

Use this tweak i wrote:

[code:1]
private static void DupeProperties ( Item src, Item dest, params string[] ignore )
{
Console.WriteLine("Property dupe, src = \'{0}\' dest = \'{1}\'",src.Serial.Value,dest.Serial.Value );

PropertyInfo[] pi_src = src.GetType().GetProperties();
PropertyInfo[] pi_dest = src.GetType().GetProperties();

for ( int i = 0; i < pi_src.Length; i++ )
{
bool bValid = true;

for ( int j = 0; j < ignore.Length; j++ )
{
if ( pi_src[i].Name == ignore[j] )
bValid = false;
}

if ( ( pi_dest[i].GetSetMethod() != null ) && (bValid) )
{
pi_dest[i].SetValue(dest,pi_src[i].GetValue(src,nu ll),null);
Console.WriteLine (" - {0} {1} = {2}", pi_dest[i].PropertyType.Name,pi_dest[i].Name,pi_de st[i].GetValue(dest,null));
}

}
}
[/code:1]

Now, put [code:1]DupeProperties ( copy as Item, item as Item,"Location","Parent");[/code:1] after [code:1]copy.MoveToWorld( from.Location, from.Map );[/code:1] on DupeTarget.OnTarget()
  Reply With Quote
Old 12-01-2002, 10:01 PM   #3 (permalink)
 
Join Date: Nov 2002
Posts: 222
Send a message via ICQ to moocow
Default ...

Thanks Kiff
moocow is offline   Reply With Quote
Old 12-01-2002, 10:28 PM   #4 (permalink)
Lost User
Guest
 
Posts: n/a
Default

Remove the console.writeline if not debugging the script
  Reply With Quote
Old 12-01-2002, 10:38 PM   #5 (permalink)
 
Join Date: Nov 2002
Posts: 222
Send a message via ICQ to moocow
Default ...

Could you just send me the whole dupe.cs file the way it should be done?
moocow is offline   Reply With Quote
Old 12-02-2002, 01:00 AM   #6 (permalink)
Not Nice
 
zero's Avatar
 
Join Date: Sep 2002
Posts: 780
Default

Heres an idea for duping, when you dupe an item, if you don't have enough access level to change the property you are copying, it goes to default..
zero is offline   Reply With Quote
Old 12-02-2002, 11:34 AM   #7 (permalink)
 
Join Date: Nov 2002
Posts: 222
Send a message via ICQ to moocow
Default ...

I'm the admin...
moocow is offline   Reply With Quote
Old 12-06-2002, 08:50 PM   #8 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

The script is posted? What exactly is the problem?
Phantom is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5