Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnStart()
- {
- AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
- AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1);
- }
- void UseKeyOnDoor(string &in asItem, string &in asEntity)
- {
- SetSwingDoorLocked(asEntity, false, true);
- PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
- RemoveItem(asItem);
- SetLocalVarInt("Switch", 1);
- CompleteQuest("door", "touchdoor");
- }
- void PickUpLantern(string &in asEntity, string &in type)
- {
- AddQuest("lantern", "pickuplantern");
- }
- void EventQuest(string &in asParent, string &in asChild, int alState)
- {
- AddQuest("area", "enterarea");
- }
- void TouchDoor(string &in asEntity)
- {
- if(GetLocalVarInt("Switch") == 0)
- {
- AddQuest("door", "touchdoor");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement