I didn't get an answer yet and this problem really bugs me.
I really need an example to get me started...
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. After I choose the Charm spell.
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 !"
Someone suggested putting a hascall(), like
if(hascall(usr.verbs,"Charm")).
It compiles well, but the magicshop just ignores that part of the code.
Thx for those who tried to help before.
Any new suggestions?
THX.
and see if that works.