ID:179732
 
Say if i use a potion and i would want it to get placed randomly on the map so the person who had it couldnt just use it again and again. how would i do this
Gouku wrote:
Say if i use a potion and i would want it to get placed randomly on the map so the person who had it couldnt just use it again and again. how would i do this



obj/Potion
icon='potion.dmi'
verb/Use()
set src in usr
usr.HP+=10
src.loc=locate(rand(1,20))//change the 20 to the max x/y in the world
In response to Nadrew
Wouldnt that just make it a random x location
In response to Gouku
Item.loc = locate(rand(1,2),rand(1,2),rand(1,2))
In response to Gouku
Whoops got ahead of myself there.