Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 05-29-2004, 11:40 PM   #1 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default Stealable Rares

OK THIS IS NOT MY SCRIPT AND I'VE CHECKED MORE THAN ONCE AND ITS NOT POSTED....AGAIN I DIDN'T MAKE THIS!!! ACTUALLY DARKRAGE DID!!
This is the Original Post (that's closed and the d/l link is broken)
http://www.runuo.com/forum/showthrea...tealable+rares

I so DO NOT want to support this so please refer to the previous link
This zip does include the fix to make respawn not delete stolen items... ALTHOUGH YOU NEED TO EDIT WHATEVER SPAWNER YOU USE LIKE SO (BTW THIS IS ARTEGORDON'S FIX) ....and also change the Stealing.cs

in spawner.cs or xmlspawner.cs, in the defrag() method change
Code:
if ( item.Deleted || item.Parent != null )
to
Code:
if ( item.Deleted || item.Parent != null || item.GetSavedFlag(0x00100000))
Also this does not include the doom stealable artifacts
but if you have them then to make them stealable (or any item) simply add ,IRARE to the public class like so:
public class BladeOfTheRighteous : Longsword, IRare

and add
Weight = 10.0; <----for how hard it is to steal
Movable = false; <----so people cant pick it up and walk away with it

Im simply resubmitting it as its a very nice system and it works and the communtity deserves it again:
I DID NOT MAKE THIS I SIMPLY ADDED THE FIX AND REPOSTED AS THE ORIGINAL LINK IS DEAD...

*prays he's been clear enuff*
Attached Files
File Type: zip StealableRares.zip (27.6 KB, 329 views)
Tru is offline   Reply With Quote
Old 05-29-2004, 11:51 PM   #2 (permalink)
 
Join Date: Oct 2003
Location: Ankara / Turkey
Age: 42
Posts: 125
Default

First of all thanks for reposting it. I search a lot of times but I found a lot of broken link about this.

But I have a question; Orijinal post of this said its for B36 so it will works in 1.0 ?
WebSiter is offline   Reply With Quote
Old 05-29-2004, 11:58 PM   #3 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by WebSiter
First of all thanks for reposting it. I search a lot of times but I found a lot of broken link about this.

But I have a question; Orijinal post of this said its for B36 so it will works in 1.0 ?
Only 1.0 is supported so only scripts tested on 1.0 should be submitted
and I am using 1.0 and it works great
Tru is offline   Reply With Quote
Old 05-30-2004, 12:11 AM   #4 (permalink)
 
Join Date: Oct 2003
Location: Ankara / Turkey
Age: 42
Posts: 125
Default

Thanks Tru for your quick reply. I try it as soon as possible and if I found an error I will post it here.
WebSiter is offline   Reply With Quote
Old 05-30-2004, 01:34 AM   #5 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by wraith
Question.

I use more then one type of spawner, Will this matter? and if not then could I just build a spawner JUST for spawning Rares?
doesnt matter add that bit to all your spawners
Tru is offline   Reply With Quote
Old 05-30-2004, 01:55 AM   #6 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by wraith
So no matter what I HAVE to add ..

if ( item.Deleted || item.Parent != null || item.GetSavedFlag(0x00100000))

to ALL my spawners? or are you suggesting it for safty reasons? Because I already ajusted a spawner to be ONLY a Rares spawner. it will spawn other things to but it is labled to be only for Rares. Makes then easy to find
read the whole previous thread....
Tru is offline   Reply With Quote
Old 05-30-2004, 07:56 AM   #7 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

it only needs to be in the spawner for the rares. The reason for the change is to allow that spawner to take the rares that it is spawning off of its spawn list during its defrag pass when the item has been stolen and the flag (assuming you made the change to stealing.cs) has been set which lets the spawner know that. If you dont make the change then it is likely that eventually rares will stop spawning because people will steal them, take them home, and lock them down on the ground which will trick normal spawners into thinking that they still control them so they dont need to spawn any more.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 05-30-2004, 08:48 AM   #8 (permalink)
 
hudel's Avatar
 
Join Date: Oct 2003
Location: Germany
Age: 38
Posts: 508
Send a message via ICQ to hudel
Default

Thanks for repost. You are realy a true god ...
hudel is offline   Reply With Quote
Old 05-30-2004, 11:12 AM   #9 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by wraith
Ok I have read ALL the threads, this one AND the HyperLink one in Trus main post. So to anyone except Tru (no disrespect intended Tru ) you did say you were not guna support this so I respect that. What Im trying to say is I DONT want to add that line to ALL my spawners just one spawner that will ONLY spawn rares. if I added it to all my spawners it would be like 6 kind, from the standard to inside container ones I made a RSpawner that has the line in it will this work or no? or are all spawners linked in some way to one main timer/decay/item checker thing so I HAVE to add it to all?

PS Tru, there are Doom arties in the package. I dont know if there all there but some say Doom(name goes here)*.cs and they have had there decay 1440 lines commented out.
Rock1
Rock2
Rock3
Rock4
Rose
and thx for the repost I mean it.
When I say arties I meant the Weapons and Gloves (as there are 4 actual usable items that can be stolen from Doom on OSI) I dont consider rocks and stuff artifacts...just rares
Tru is offline   Reply With Quote
Old 05-30-2004, 02:08 PM   #10 (permalink)
Newbie
 
Join Date: Oct 2002
Location: Brazil
Age: 21
Posts: 74
Send a message via ICQ to Matador Doidao Send a message via MSN to Matador Doidao
Default

thanks a lot for reposting it
it works fine here

__________________
=)
Matador Doidao is offline   Reply With Quote
Old 05-31-2004, 03:26 AM   #11 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

I actually found a bug...surprised it hasnt surfaced before now
Items stolen and locked down can be restolen
Tru is offline   Reply With Quote
Old 05-31-2004, 03:55 AM   #12 (permalink)
 
HadesUO's Avatar
 
Join Date: Apr 2004
Age: 27
Posts: 139
Default

How do i go about fixing it if u dont mind saying? And what changes to stealing.cs would i need to make?
HadesUO is offline   Reply With Quote
Old 05-31-2004, 07:14 AM   #13 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Tru
I actually found a bug...surprised it hasnt surfaced before now
Items stolen and locked down can be restolen
The fix is to test for the stolen flag in stealing.cs just as the spawners do.

around line 70, change

Code:
				else if ( toSteal.Parent == null || !toSteal.Movable || toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed( root ) )
				{
					m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
				}
to this

Code:
                                     //ARTEGORDONMOD
				// allow stealing of rares on the ground or in containers, but prevent re-stealing if later locked down
				else if ( ((toSteal.Parent == null || !toSteal.Movable) && ( !(toSteal is IRare)  || toSteal.GetSavedFlag(0x00100000)) ) || toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed( root ) )
				{
					m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
				}
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 05-31-2004, 07:20 AM   #14 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by HadesUO
How do i go about fixing it if u dont mind saying? And what changes to stealing.cs would i need to make?
note you also have to have the other change in stealing.cs for any of this to work.

around line 135

Code:
						if ( stolen != null )
                        {
                            //ARTEGORDONMOD
                            // flag the item as stolen for spawners and anyone else that needs to know.  Also, release them if they were locked down (e.g. rares)
                            stolen.SetSavedFlag(0x00100000, true);
                            stolen.Movable = true;
							m_Thief.SendLocalizedMessage( 502724 ); // You succesfully steal the item.
                        }
						else
							m_Thief.SendLocalizedMessage( 502723 ); // You fail to steal the item.
but Tru probably already noted this in the package so it might be redundant.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 05-31-2004, 09:19 AM   #15 (permalink)
Newbie
 
Torm's Avatar
 
Join Date: Dec 2003
Location: Texas
Age: 52
Posts: 48
Send a message via Yahoo to Torm
Talking Tks

:d :d Thanks Tru !!
__________________
Torm,
Scribe of PortKar, Gor
Wind & Steel
Torm is offline   Reply With Quote
Old 05-31-2004, 01:33 PM   #16 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by ArteGordon
note you also have to have the other change in stealing.cs for any of this to work.

around line 135

Code:
						if ( stolen != null )
                        {
                            //ARTEGORDONMOD
                            // flag the item as stolen for spawners and anyone else that needs to know.  Also, release them if they were locked down (e.g. rares)
                            stolen.SetSavedFlag(0x00100000, true);
                            stolen.Movable = true;
							m_Thief.SendLocalizedMessage( 502724 ); // You succesfully steal the item.
                        }
						else
							m_Thief.SendLocalizedMessage( 502723 ); // You fail to steal the item.
but Tru probably already noted this in the package so it might be redundant.
Its already in...
Thanks for the quick fix
Tru is offline   Reply With Quote
Old 06-01-2004, 05:17 PM   #17 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Arte...
Remember when you said to put item.SetSavedFlag(0x00100000,true); in your container.cs in the ondragdrop method (from the old thread)? well we shouldnt do that now right? as that will make any item dropped in any container unstealable (ie backpacks)...with your new fix.
Tru is offline   Reply With Quote
Old 06-01-2004, 06:46 PM   #18 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Tru
Arte...
Remember when you said to put item.SetSavedFlag(0x00100000,true); in your container.cs in the ondragdrop method (from the old thread)? well we shouldnt do that now right? as that will make any item dropped in any container unstealable (ie backpacks)...with your new fix.
no, its ok. the test in stealing.cs for that flag only affects IRares that are locked down or sitting in the world. non-IRare items follow the same standard rules regardless of the flag. Also, IRares that are just placed in containers and not locked down can still be stolen.
Setting the flag in container.cs protects non-stolen rares that are dragged into a container but still would be subject to the same problem with spawners not taking them off of their list.

(edit)
basically with the mods to stealing.cs, container.cs and the spawner scripts, the IRare interface serves two functions.
One is to allow locked down items to be stolen (once).
Second is to keep items that are on a long spawn cycle from confusing spawners. So any item that was going to be placed on a long "rare-like" spawn cycle could be defined with the IRare interface and it would be protected without affecting its stealability.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 06-01-2004, 08:26 PM   #19 (permalink)
Forum Expert
 
Join Date: Mar 2003
Posts: 383
Send a message via ICQ to danknight21 Send a message via AIM to danknight21
Default

so is this stealing a runuo 1.0 stealing script jus modfyed?
__________________
I Still Play OSI UO, Feel free to ICQ or post with any questions between RUNUO and OSI.
danknight21 is offline   Reply With Quote
Old 06-01-2004, 08:33 PM   #20 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by danknight21
so is this stealing a runuo 1.0 stealing script jus modfyed?
yes, the modifications are applied to the standard stealing.cs in the RC0 distribution. (also to the container.cs and spawner scripts for RC0)
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 06-01-2004, 10:21 PM   #21 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Code:
from.SendSound( GetDroppedSound( item ), GetWorldLocation() );
item.SetSavedFlag(0x00100000,true); 
return true;
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 06-01-2004, 10:32 PM   #22 (permalink)
Forum Expert
 
Protius73's Avatar
 
Join Date: Mar 2004
Location: Jax FL USA
Age: 35
Posts: 260
Default

Hmm think im just gonna wait till someone makes a working script for this
Protius73 is offline   Reply With Quote
Old 06-01-2004, 10:41 PM   #23 (permalink)
Forum Newbie
 
Join Date: Feb 2004
Posts: 51
Default

thanks, very much to both of you, I am quite greatful...
nitewender is offline   Reply With Quote
Old 06-01-2004, 11:02 PM   #24 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Originally Posted by Protius73
Hmm think im just gonna wait till someone makes a working script for this
This works fine
But be my guest waiting for another version to surface (hence the reason I reposted)
Tru is offline   Reply With Quote
Old 08-23-2004, 08:40 PM   #25 (permalink)
 
Join Date: Nov 2003
Posts: 35