Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This is the API Channel that needs to be set in the Garage Control Panel */
- integer api_channel = 5000;
- /* This DoorID will need to be added into the Garage Control Panel by select "Add ID" */
- string door_id = "ExampleDoor";
- default {
- on_rez(integer s)
- {
- llResetScript();
- }
- state_entry()
- {
- llListen(api_channel,"","","");
- }
- listen(integer channel, string name, key id, string message)
- {
- if(llGetOwnerKey(id) == llGetOwner())
- {
- list parse = llParseStringKeepNulls(message,["@"],[]);
- string command = llList2String(parse,0);
- string parse_door_id = llList2String(parse,1);
- if(parse_door_id == door_id)
- {
- if(command == "OPEN")
- {
- llOwnerSay("Door Open");
- llSetStatus(STATUS_PHANTOM,TRUE);
- llSetAlpha(0.1,ALL_SIDES);
- }
- else if(command == "CLOSE")
- {
- llOwnerSay("Door Open");
- llSetStatus(STATUS_PHANTOM,FALSE);
- llSetAlpha(1,ALL_SIDES);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement