ID:149838
 
obj/rock
icon = ('rocks.dmi')
density = 1
verb/Check_Rocks()
set src in oview(1)
if(usr.Mining<=20)
usr<<"You cant mine this yet!"
else if(usr.Mining>=20)
usr<<"You can mine, because you are a high enough level"

That is my code i need to be able to create a new verb when ever you check a rock then be able to mine it if you are a high enough level. Then once you move away from it you have to check it again. Can anybody help me.
By the way my email is [email protected]
I came up with an interesting solution for this for my game. make a mob like this

mob/hidden
verb
YourVerbHere()

Then u just add this verb in your check.
usr.verbs += /mob/hidden/verb/YourVerbHere

LJR
In response to LordJR
YEAH! thanks my game will be online soon it is called Aranum Death And Magik! thanks for the help!
In response to Mrhat99au
That doesnt work bugger i keeps the verb mine if you move away from the rock
like this



rock
player-moves away
mine verb stays
somebody help!
What you should do is surround the place where you can mine with an invisiable area/ and make use of the Exit() proc. That way when they move out of the area, it takes their verb away.

area/MiningVerbDel
Exited()
usr.verbs -= (your verb here as before)

Don't forget to add the areas once you create them. They will not appear on the map when you add then so Right-click on the space to make sure it is listed there, its be towards the bottom of the popup window.

LJR
In response to Mrhat99au
It always comes up with this

Objects.dm:365:error:usr.verbs:duplicate definition
Objects.dm:365:error:mob/hidden/verb/mine:duplicate definition
Objects.dm:365:error:-= :instruction not allowed here