Spellbook/CanRemove

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.

Moderators: POL Developer, Distro Developer

Locked
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Spellbook/CanRemove

Post by RusseL »

when player casts with macros, injection or assist can remove scroll from spellbook :( i can't fix it...help?

My CanRemove script:
program canRemove(mobile, container, item, move_type)
return 0;
endprogram
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: Spellbook/CanRemove

Post by MuadDib »

Have you also tried setting scrolls to item.movable = 0 ?
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Spellbook/CanRemove

Post by RusseL »

yes... and with properties too...
maybe that core bug?
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: Spellbook/CanRemove

Post by MuadDib »

In a sense, yes I would agree. Or, the lack of a good check on it.

While I say that, it will not be fixed. This is because in 098, we are re-writing how the spellbooks store spells. Eventually (in 098), they will delete the scroll when inserted and update a newer spell bit storage for the spells on the book (a property of the spellbook). This will drastically reduce the amount of storage needed for spellbooks (item count). Along with some other perks such as less ram needed, faster load/save due to item count reduction, and, will be a bit faster in processing in memory when building book packets and checking for existing spell in books.

Now, saying that... don't freak people. Spellbook system in 098 will SCAN for existing scrolls, update the bits, delete the scrolls, and go on. This way, it will UPGRADE existing books to the new system on the fly.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Spellbook/CanRemove

Post by RusseL »

ok:) thank you.
i'll wait for update..
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Re: Spellbook/CanRemove

Post by OldnGrey »

For 098 - official spellbooks only?
There are probably uses for a general insertion into a container where the item isn't actually added but it increments some sort of property and is destroyed.
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: Spellbook/CanRemove

Post by Nando »

OldnGrey wrote:For 098 - official spellbooks only?
There are probably uses for a general insertion into a container where the item isn't actually added but it increments some sort of property and is destroyed.
like...? :P
Madman
POL Developer
Posts: 62
Joined: Sun Feb 05, 2006 7:20 pm

Re: Spellbook/CanRemove

Post by Madman »

And would those uses not be well enough served with onInsert?
Locked