QUOTE |
FIX FOR STOLEN/TAKEN ITEM SPAWNS THAT REMAIN UNDER SPAWNER CONTROL Note, this completely optional. Dont do it if you dont want to. With all current spawners, any spawned item, if set back on the ground before the defragger has a chance to see it inside of your pack or a container (e.g. at spawn or respawn) and take it off of the spawn list, will continue to be owned by it. This means it will continue to be checked, will block further spawning, will be subject to spawner-initiated deletion, recalling to home, etc. It shows up most obviously with the rare spawns because the time between defrags is basically the time between spawns, so if you pick up the item and walk around with it for 3 days and then put it down, a spawner with a 5 day timer is probably still going to have it on its list. (and exception to this would be if the server were restarted sometime in those 3 days with the item in your pack since it does a defrag on restart) So currently, the only safe way to make sure your spawned rares dont get deleted is to leave them in a container until the next respawn. After that they are safe. With the fix described below all items will be immediately protected including regular non-stolen rares, as well as any other item spawn. Stealing or dragging and dropping it into your pack flags it for removal in the next defrag pass (i.e. the spawner will forget about it). replace your container.cs and stealing.cs files with the modified distribution files included in xmlspawner2-support2of2.zip Stealing.cs also contain a mod supporting flagging rares/items as stealable even when initially locked down. Once they are stolen by a player they cannot be stolen again if locked down. This feature makes use of item SavedFlag 0x00200000 and does not require any modification to any items or item scripts. If you wish to add stealability into the item constructor by default (e.g. making stealable rare item scripts) just make a call to ItemFlag.SetStealable(this,true); Items can also be manually flagged as stealable or not using the [stealable command. To spawn an item as stealable, use the special STEALABLE property keyword like this zyronicclaw/movable/false/STEALABLE/true This can be used to spawn stealable items in containers like the OSI shop containers. Any item can be flagged as stealable using this technique. Even items that would not normally be stealable such as blessed or newbied items can be flagged in this way. Also handles stealable stackables. Note, once a flagged item is stolen or placed in a container by a player, the flag is reset and the item behaves as any normal item would. |