1. I finally found a way to fix this...
Now for No.2
2.I've been trying to make a magic shop where you can learn a magic spell only once.
Thx to Nadrews spell system, I made a spell and a small shop.
The only problem i've had is to find a code that allows the magicshop to know if I already have learned the spell or not.
//part of the shop code.
if("Charm")
if(...) // I need to find something to put here...
alert("You know this spell!","Sorry")
return 0
else
usr.verbs+=new/mob/proc/Charm
... //rest of the code here.
This is the only spell I have for now (it works):
mob/proc/Charm(mob/M as mob in view(10))
set category = "Magic"
if(usr.mp>=10)
view() <<"[usr] casts Charm!"
M.hp=min(M.hp+100,M.maxhp)
usr.mp-=10
else
usr<<"You don't have enough MP !"
Thx for those who tried to help before.
Any new suggestions?
THX
Just before deleting the item, check to see if it's equipped and if so, unequip it. Alternatively, you could add that code to the item's Del() proc.
Lummox JR