Page 1 of 1

Forced sleep and Replacement of some object.

Posted: Fri Jun 21, 2013 11:54 am
by Daght
I need help on this code, i'm not a scripter and so I ask you some help.

Code: Select all

function strangeAltar()
if containsItem(strangeAltar, "remains_of_toorum_1")
  then
    --the players fall uncosciuos (forced sleep for 5 secs)
    -- after they wake up the follow new setting must be applied
     --the altar is moved (during the sleep so they see only the changes after they wake up) from 12,0 on level 3, to 13,0 on the same level, with the remains of toorum on it)
      --the pitXX has opened, always during the sleep
  end
end
Thanks to this great community! :mrgreen:

Re: Forced sleep and Replacement of some object.

Posted: Fri Jun 21, 2013 1:45 pm
by Komag
You'll have to mess around with onRest and onWakeUp hooks, with return false at times, to keep them asleep for the 5 secs.

Re: Forced sleep and Replacement of some object.

Posted: Fri Jun 21, 2013 3:52 pm
by Daght
Komag wrote:You'll have to mess around with onRest and onWakeUp hooks, with return false at times, to keep them asleep for the 5 secs.
Thanks, but to me this seem Korean :-/
I got no basic on lua scripting, but many thanks!