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
ID:266462
![]() Mar 17 2002, 3:46 am
|
|
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() -Kappa the Imp |
Kappa the Imp wrote:
Super16 wrote: > 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. |
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 |
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)) |
Kappa the Imp wrote:
Strange Kidd wrote: I tested it too and ti works. |
Can you fix this code plz?
mob/verb/Wish() -Kappa the Imp |
Strange Kidd wrote:
Taking An it4em out of inventory is easy i just didnt think of it :P What he was asking for is when he wishes the item moves to its original location. |
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 |
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))