reserved items

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.
Post Reply
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

reserved items

Post by DevGIB »

umm we have a problem were if an item is in use by a script and the player dies the item will get destroyed...

i know what the problem is im just not sure how to fix it... the item is reserved by one script and deleted by another... if we put releaseitem() in the second script it doesnt release it from the first... is there anyway around this... because using moveitemtocontainer() doesnt move reserved items :S

anyway around this?
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

I ran into this in my scripts at one time. The issue was mainly with bard and my provocation package. I just gave each bard a starting instrument and made it newbie.

If anyone has a better solution for this I would be interested also. :P
Marilla

Post by Marilla »

It would really depend on how your scripts work; Sounds to me like both the scripts in question need to be re-written to take various things into account. You would likely also have problems if the player logged off during the script(s) running.

You always need to be sure that scripts that reference a player check when necessary that the player is a) still alive and b) still online. Not only is this important in 'loops' like what seems to be going on here, but also it's important in any script that have a gump; Some people for instance assume that nodispose gumps will -never- return 'false' unless a button specifically has that value... but this can happen if a player logs off/loses connection.


Anyway... without knowing exactly what your script does, we couldn't fix it or tell you how to. Clearly, though, at some point your scripts need to be checking if the player has died or logged off, and take appropriate action. It's simple in principle and practice, but can't really be detailed for you without knowing your script.
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

maybe...

See if you can get props from the item. If you can, set the PID as a prop to the item in the first script (would probably be wise to erase this prop too after the script exits). Then when the second script fails to move it and tries to delete it, try looking up and killing the PID from the second script (ultimately releasing it) and then try moving it.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

I remember this, with bandages, on IC. If you was healing, you lost the bandages, if was in a "newbied" zone for deaths.

In 095 (or was it 94?), using releaseitem on each item, in the chrdeath, seemed to fix it. Unsure if it still does with all the changes since.
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Post by DevGIB »

thats exactly whats happening maud... its kinda a newbie zone sorta thing but alittle different... and the problem is ive released every item but they still dont seem to move :S
Post Reply