Advertisement
Kalle1111

Necklace(ObjectReference)

Feb 24th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. Scriptname BQ_Necklace extends ObjectReference ;DO NOT COPY THIS, THIS SHOULD AUTOMATICALLY BE GENERATED
  2. BQ_ControlScript Property qscript Auto ;exchange "BQ_ControlScript" with whatever your script located at the quest is called, be sure to define this variable!
  3.  
  4. Event OnEquipped(Actor akActor)
  5. if (akActor == Game.GetPlayer()) ;checks that the one who equipped the item was the player
  6. if (qscript.GetCurrentTimeOfDay() >= 11.00) && (qscript.GetCurrentTimeOfDay() <= 13.00) ;checks if the current time is between 11 and 13
  7. qscript.RequirementsMet() ;launches the tp function
  8. else ;what the script should do if the condition/s is/are not fullfilled
  9. qscript.RegisterForSingleUpdateGameTime(qscript.TimeTillEleven()) ;launches onupdate() at 11 am
  10. ;debug.messagebox("registered for update in: " + qscript.TimeTillEleven() + " hours") ;disabled currently (as seen by the ";". used to check the time till 11
  11. EndIf
  12. EndIf
  13. EndEvent
  14.  
  15.  
  16. Event OnUnequipped(Actor akActor)
  17. if (akActor == Game.GetPlayer()) ;checks that the player was the one who unequipped the item
  18. qscript.UnregisterForUpdateGameTime() ;aborts the timer(in the quest script), since the item was unequipped
  19. EndIf
  20. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement