Full Version : Not respawning problem
xmlspawner >>Q&A >>Not respawning problem
<< Prev | Next >>
gizmo- 06-08-2006
Heya guys. I use xmlspawner to spawn rares in my world and what not. Seems to be a problem with one thing. If a player takes the rare and locks it down in his house. The spawner still thinks its there and wont respawn. But if the player has it in a box, or bank any container it will respawn. Any fix to this? im doing this...
I scripted up a blank object called (rareitem)
so in the spawner i do this.
RareItem/ItemiId/XXX/HUE/xxx/Name/XX or whatever mods ect..
how would wont get the spawner to realize the item isnt close anymore and respawn? thanks ahead of time if you know cause im a lil baffeled on this one.
ArteGordon- 06-08-2006
take a look at installation step #4 that deals with this issue. The explanation for why this occurs can be found at the end of xmlspawner2.txt
from xmlspawner2.txt

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.

gizmo- 06-08-2006
hmm not the reply i was looking for =) but this will do thanks for the info man. Ill look into this myself as well see if i cant come up with something. much thanks on the quick response time.
gizmo- 06-10-2006
okay so i found a cheep fix about this.
I created a RareItem (stonepaver pretty much) Which wont every decay.
RareItem/ItemId/3215/Name/Hedge
So what I did was, I made another spawner and put a TrigOn Carried Hedge,rareitem.
I set up the Min Max Refrect to be closely to the Respawn of the rare item. What this spawner does is....
SET,rareitemspawner,xmlspawner/DORESET/TRUE/RUNNING/TRUE
So what this does is, if the player grabs the Rare item, it triggers the Rare Item spawner to quickly do a reset while the Item is safe in the players backpack. Then turns itself back on and resets the Rare Spawn time. Works great.
ArteGordon- 06-10-2006
hehe. clever solution.