ID:162693
 
Lets say I have a healing pill that if I have it I only want the power for the user to eat it and not the the user eatting it and it affects someone nearby.
I can't really describe it..
you mean that you use the healing pill it only affects the people around you?
In response to Scarymonkeys623
no, it only affects you, like when I use the verb Eat() it selects me and the mob that is in the same room as me. I just want it to select me. I know it has to do with something like set src in ?
In response to Lundex
like this?
obj
item
healthpill
verb
eat()
set name="Eat"
set desc="Heal your health"
set category="Eat"
src.health += 50

In response to Scarymonkeys623
noooo.....
In response to Lundex
wat are you talking about!!!, can u atleast code a example of what ur saying
In response to Scarymonkeys623
        bluesoldierpill
name = "Blue Soldier Pill"
desc = "This pill can restore the chakra, by one hundred points."
short1 = "A blue pill lays on the ground."
immovable=0
verb
Eat(mob/M)
set hidden = 1
view(M) << "[usr] eats a [src]."
sleep(10)
view(M) <<"[M] looks refreshed."



Yeah, this is the code I used, to eat the pill and it restores HP.
In response to Lundex
OOOOOOOOO you wanna make it so you have to be right next to the pill to use it???
In response to Scarymonkeys623
noo, you have to have it inside of your contents and can only use it on you when its in their.
In response to Lundex
obj
item
bluesoldierpill
name="Blue Soldier Pill"
desc="This pill can restore the chakra, by one hundred points."
short1 = "A blue pill lays on the ground."
immovable=0
verb
Eat(mob/M)
set src in usr
set hidden = 1
view(M) << "[usr] eats a [src]."
sleep(10)
src.chakra+=100
view(M) <<"[M] looks refreshed."
if(usr.chakra > usr.maxchakra)
usr.chakra=usr.maxchakra
del(src)

like this????
In response to Scarymonkeys623
Only heal by 100
In response to Lundex
Lundex wrote:
Only heal by 100

that what it does, here i'll make it more understandable for you.
obj
item
bluesoldierpill
name="Blue Soldier Pill"
desc="This pill can restore the chakra, by one hundred points."
short1 = "A blue pill lays on the ground."
immovable=0
verb
Eat(mob/M)
set src in usr//sets pill in usr
set hidden = 1
view(M) << "[usr] eats a [src]."
sleep(10)
src.chakra+=100//heals chakra by 100
view(M) <<"[M] looks refreshed."
if(usr.chakra > usr.maxchakra)//if chakra goes over max
usr.chakra=usr.maxchakra//take usr's chakra back down to max
del(src)//deletes pill
In response to Scarymonkeys623
WOW, I'm a dumbie, I need to sleep...thanks man..
In response to Lundex
no problem

-Tony
In response to Scarymonkeys623
I would just like to say, thanks man for all your help.
In response to Lundex
its NP helping makes me feel good :)