Difference between revisions of "User:Daemonika Nightfire/Scripts/Region Reboot Messenger"
(Created page with '==*DS* Region Reboot Messenger== ==Multi-User Version== With this script, find all that are specified in the list when the Sim is back after a restart. So you must then not alway...') |
|||
Line 59: | Line 59: | ||
==Single-User (Owner) Version== | ==Single-User (Owner) Version== | ||
With this script, disguised as "LM giver" you are always up to date, how many times your rented shop, a sim restart is exposed. | With this script, disguised as "LM giver" you are always up to date, how many times your rented shop, a sim restart is exposed. | ||
'''Script Time!''' | '''Script Time!''' | ||
The Script 0.002 - 0.003 ms. | The Script 0.002 - 0.003 ms. |
Revision as of 05:26, 12 December 2010
*DS* Region Reboot Messenger
Multi-User Version
With this script, find all that are specified in the list when the Sim is back after a restart. So you must then not always look on the map, if the sim is back there.
This is very useful if the sim is restarted during a party.
Script Time!
The Script 0.002 - 0.003 ms.
<lsl> // *DS* Region Reboot Messenger by Daemonika Nightfire (daemonika.nightfire) // Ready for Multi-User, you can set more than one Person to get a message when the Sim where this script is running has restart. // The Messenger tell you the SLurl to the Region too.
// change in this Memberslist the UUIDs with the Keys from the People you need to get a message. list Members = ["61ee201a-81cf-4322-b9a8-a5eb8da777c2", // its me
"61ee201a-81cf-4322-b9a8-a5eb8da777c2", // me again "61ee201a-81cf-4322-b9a8-a5eb8da777c2"]; // another one me (list expandable)
string SLurl; string BuildSlurl(string region_name, vector pos) {
return "http://slurl.com/secondlife/" + llEscapeURL(region_name) + "/"+ (string)((integer)pos.x) + "/"+ (string)((integer)pos.y) + "/"+ (string)(llCeil(pos.z));
}
default {
state_entry() { llSetText("Landmark to the Club/Mainstore",<1,1,1>,1.0); // floating text SLurl = BuildSlurl(llGetRegionName(),llGetPos()); } changed(integer ch) { if(ch & CHANGED_REGION_START) { integer i; for(i=0; i<llGetListLength(Members); i++) { llInstantMessage(llList2String(Members,i),"Region has Restarted @ " + SLurl); } } } touch_start(integer nd) { if(llGetInventoryNumber(INVENTORY_LANDMARK) > 0) // LM giver { llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_LANDMARK, 0)); } } on_rez(integer st) { llResetScript(); }
} </lsl>
Single-User (Owner) Version
With this script, disguised as "LM giver" you are always up to date, how many times your rented shop, a sim restart is exposed.
Script Time!
The Script 0.002 - 0.003 ms.
<lsl> key Owner;
string SLurl; string BuildSlurl(string region_name, vector pos) {
return "http://slurl.com/secondlife/" + llEscapeURL(region_name) + "/"+ (string)((integer)pos.x) + "/"+ (string)((integer)pos.y) + "/"+ (string)(llCeil(pos.z));
}
default {
state_entry() { Owner = llGetOwner(); llSetText("Landmark to the Club/Mainstore",<1,1,1>,1.0); // floating text SLurl = BuildSlurl(llGetRegionName(),llGetPos()); } changed(integer ch) { if(ch & CHANGED_REGION_START) { llInstantMessage(Owner,"Region has Restarted @ " + SLurl); } } touch_start(integer nd) { if(llGetInventoryNumber(INVENTORY_LANDMARK) > 0) // LM giver { llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_LANDMARK, 0)); } } on_rez(integer st) { llResetScript(); }
} </lsl> German Diskusion