Author Topic: How to use existing verbs ?  (Read 2754 times)

Offline jarda128

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
How to use existing verbs ?
« on: June 18, 2012, 02:51:20 am »
I have got the entrace to the tomb,but it should be  to open it by placing the special ring in the hole on the grate ...
but i dont know how handle put verb ... there are many functions in  /verbs/items/put.c and i dont know which function
is nessesary to redefine ...could someone show me an example how to use that put verb or maybe some simplest verb ...
I dont know how to define which ring nebo which container is correct ...

Offline z993126

  • BFF
  • ***
  • Posts: 128
    • View Profile
Re: How to use existing verbs ?
« Reply #1 on: June 18, 2012, 07:18:00 pm »
One way of doing it,  you'd want to modify the tomb entrance room (or grate object if it's separate). #include LIB_STORAGE, and could do it in a heart_beat(), check for if( present( "special ring", this_object() ) then do things in there.

Offline jarda128

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: How to use existing verbs ?
« Reply #2 on: June 19, 2012, 02:55:40 am »
thank you very much ...
i do similiar way as you said, i put LIB_STORAGE in the hole object and redefine CanReceive function so it returns 1 when a correct ring is placed there ... only a thing which it is not perfect is default message such
for example when the ring is already placed in the hole: The hole is already full.The golden ring stays where it is.second sentence i dont like ...