ID:266462
 
OK.If they get 7 keys from these monsters,they get a wish and i when there done making there wish,I want the keys to go back to there original location and take the item out of Inventory.If you know how to do that,plz tell me.Thanks!

-Kappa the Imp
Well here is a different way.

obj
stone
verb
Get()
set src in usr.loc
gobackx=src.x
gobacky=src.y
gobackz=src.z
Move(usr)

obj
var
gobackx
gobacky
gobackz

Now when you do that stuff add a line like this

for(var/obj/stone/O in usr.contents)
O.Move(locate(gobackx,gobacky,gobackz))
In response to Super16
Can anybody show me a better way,PLEASE!!??

-Kappa the Imp
In response to Kappa the Imp
Hey I posted a pretty good one its an edit to my lazy cheap way>
In response to Super16
Hey Hes Right That is pretty much the only way so live with it!!!!!!!!!
In response to Super16
Super16 wrote:
Hey I posted a pretty good one its an edit to my lazy cheap way>
Yeah i saw it.this should take the item out of the Inventory and put it back to the original location?

mob/verb/Wish()
for(var/obj/Key/O in usr.contents)
spawn(10000000000)
O.Move(locate(x,y,z))
var/wish = input("What would you like to wish for?","Wish") in list("Money","Nevermind","Nothing")
switch(wish)
if("Money")
usr.Money = 999999999999999999999999999999999999999999999999999999999999.....
usr.verbs-=/mob/verb/Wish


-Kappa the Imp


In response to Kappa the Imp
eh? How does that have to do wit ya question
In response to Kappa the Imp
Kappa the Imp wrote:
Super16 wrote:
Hey I posted a pretty good one its an edit to my lazy cheap way>
Yeah i saw it.this should take the item out of the Inventory and put it back to the original location?

> mob/verb/Wish()
> for(var/obj/Key/O in usr.contents)
> spawn(10000000000)
> O.Move(locate(x,y,z))
> var/wish = input("What would you like to wish for?","Wish") in list("Money","Nevermind","Nothing")
> switch(wish)
> if("Money")
> usr.Money = 999999999999999999999999999999999999999999999999999999999999.....
> usr.verbs-=/mob/verb/Wish
>

-Kappa the Imp

If you saw the O.Move I had vars set for gobackx gobacky gobackz. Before getting the keys you should in the Gte verb, make the gobackx etc.. the src.x and so on. THen when Moving them you should use those vars.
In response to Strange Kidd
Strange Kidd wrote:
eh? How does that have to do wit ya question?


That does have to do with my question.I want it to be taken out of the Inventory and go back to its original location.I don't know the code i just posted works.

-Kappa the Imp
In response to Kappa the Imp
Well any ways this is what it should look like.

obj/stone
icon='s.dmi'
verb
Get()
set src in usr.loc
src.gobackx=src.x
src.gobacky=src.y
src.gobackz=src.z
Move(usr)
obj
var
gobackx
gobacky
gobackz

mob/verb/Wish()
for(var/obj/stone/O in usr.contents)
O.Move(locate(O.gobackx,O.gobacky,O.gobackz))
In response to Kappa the Imp
Kappa the Imp wrote:
Strange Kidd wrote:
eh? How does that have to do wit ya question?


That does have to do with my question.I want it to be taken out of the Inventory and go back to its original location.I don't know the code i just posted works.

-Kappa the Imp

I tested it too and ti works.
In response to Super16
Taking An it4em out of inventory is easy i just didnt think of it :P


usr.contents-=/obj/bah
In response to Kappa the Imp
Can you fix this code plz?
mob/verb/Wish()
for(var/obj/Key/O in usr.contents)
var
gobackx=src.x
gobacky=src.y
gobackz=src.z
O.Move(locate(gobackx,gobacky,gobackz))
var/wish = input("What would you like to wish for?","Wish") in list("Money")
switch(wish)
if("Money")
usr.Money = 99999
usr.verbs-=/mob/verb/Wish

-Kappa the Imp

In response to Strange Kidd
Strange Kidd wrote:
Taking An it4em out of inventory is easy i just didnt think of it :P


usr.contents-=/obj/bah

What he was asking for is when he wishes the item moves to its original location.
In response to Super16
ohhhhhhhhhhhh
In response to Kappa the Imp
Here,
mob/verb/Wish()
for(var/obj/Key/O in usr.contents)
O.Move(locate(O.gobackx,O.gobacky,O.gobackz))
var/wish = input("What would you like to wish for?","Wish") in list("Money")
switch(wish)
if("Money")
usr.Money = 999999

obj/key
verb
Get()
set src in usr.loc
src.gobackx=src.x
src.gobacky=src.y
src.gobackz=src.z
Move(usr)

obj
var
gobackx
gobacky
gobackz



In response to Super16
Thanks Super16!

-Kappa the Imp