Get stall scripts functional
This commit is contained in:
parent
b6a59a6673
commit
cf5144befb
4 changed files with 204 additions and 81 deletions
|
@ -5,7 +5,6 @@ default
|
|||
{
|
||||
state_entry()
|
||||
{
|
||||
THIRTY_DAYS=ONE_DAY*30;
|
||||
if(llGetObjectDesc() == "" || llGetObjectDesc() == "(No Description)")
|
||||
{
|
||||
llSetObjectDesc((string)llGenerateKey());
|
||||
|
@ -25,6 +24,7 @@ default
|
|||
NO_TEXTURE = "";
|
||||
}
|
||||
|
||||
|
||||
listen(integer c,string n,key i,string m)
|
||||
{
|
||||
//llSay(0, m);
|
||||
|
@ -58,6 +58,7 @@ default
|
|||
g_iBoot=1;
|
||||
}
|
||||
}
|
||||
|
||||
link_message(integer s,integer n,string m,key i){
|
||||
if(i == "fw_ready")
|
||||
{
|
||||
|
@ -78,12 +79,12 @@ default
|
|||
#endif
|
||||
//llSetTimerEvent(1);
|
||||
}
|
||||
|
||||
if(n == 0x004f) {
|
||||
API_SERVER = DecipherService(m,"api");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
timer()
|
||||
{
|
||||
if(g_iState & STATE_REBOOT_FAST)
|
||||
|
@ -101,6 +102,7 @@ default
|
|||
state boot;
|
||||
}
|
||||
}
|
||||
|
||||
changed(integer t){
|
||||
if(t&CHANGED_REGION_START){
|
||||
state reboot;
|
||||
|
@ -111,6 +113,7 @@ default
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
state off{
|
||||
state_entry(){
|
||||
llMessageLinked(LINK_SET, 0, "<!c=red>Currently Offline", "fw_data");
|
||||
|
@ -124,6 +127,7 @@ state off{
|
|||
state reboot;
|
||||
}
|
||||
}
|
||||
|
||||
state reboot
|
||||
{
|
||||
state_entry(){
|
||||
|
@ -131,6 +135,7 @@ state reboot
|
|||
}
|
||||
}
|
||||
state boot{
|
||||
|
||||
state_entry()
|
||||
{
|
||||
if(g_iHaveKVP)RestoreFromKVP(); // solve some issues related to the bitmasks
|
||||
|
@ -203,6 +208,8 @@ state boot{
|
|||
} else llSetPayPrice(PAY_HIDE, [PAY_HIDE, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
money( key id, integer amount )
|
||||
{
|
||||
integer days = amount/g_iPricePerDay;
|
||||
|
@ -234,6 +241,7 @@ state boot{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
state_exit()
|
||||
{
|
||||
g_iState = mask(UNSET, g_iState, STATE_REBOOT_PENDING);
|
||||
|
@ -298,6 +306,7 @@ state boot{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
changed(integer t){
|
||||
if(t&CHANGED_REGION_START){
|
||||
state reboot;
|
||||
|
@ -327,48 +336,49 @@ state boot{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
on_rez(integer i){
|
||||
state reboot;
|
||||
}
|
||||
touch_start(integer i)
|
||||
{
|
||||
if(!g_iHaveKVP){
|
||||
llRegionSayTo(llDetectedKey(0), 0, "/!\\ WARNING: The board is not done loading yet, please be patient");
|
||||
return;
|
||||
}
|
||||
if(g_kTexture!=NULL && g_kLeasedTo == NULL){
|
||||
if(llSameGroup(llDetectedKey(0))){
|
||||
|
||||
g_kLeasedTo = llDetectedKey(0);
|
||||
state reboot;
|
||||
return;
|
||||
}else{
|
||||
llSay(0, "Group tag is required to lease");
|
||||
llResetScript(); // refuse to lease
|
||||
}
|
||||
}
|
||||
|
||||
if(g_kTransferID!=NULL && g_kTransferID == llDetectedKey(0)){
|
||||
g_kLeasedTo = llDetectedKey(0);
|
||||
llWhisper(0, "Transfer Completed");
|
||||
g_kTransferID=NULL;
|
||||
g_iTransferTimeout = 0;
|
||||
g_sPreferredName="";
|
||||
SavePayload();
|
||||
llSleep(10);
|
||||
|
||||
g_iState = mask(SET, g_iState, STATE_REBOOT_PENDING);
|
||||
|
||||
return;
|
||||
}
|
||||
llRegionSay(70, llDumpList2String(["checkgroup", "menu", llDetectedKey(0)], "%"));
|
||||
}
|
||||
|
||||
touch_end(integer n) {
|
||||
if(llDetectedTouchPos(0) == ZERO_VECTOR) {
|
||||
// Dragged off
|
||||
if(g_lSupport == [])
|
||||
checkSupport();
|
||||
} else {
|
||||
|
||||
if(!g_iHaveKVP){
|
||||
llRegionSayTo(llDetectedKey(0), 0, "/!\\ WARNING: The board is not done loading yet, please be patient");
|
||||
return;
|
||||
}
|
||||
if(g_kTexture!=NULL && g_kLeasedTo == NULL){
|
||||
if(llSameGroup(llDetectedKey(0))){
|
||||
|
||||
g_kLeasedTo = llDetectedKey(0);
|
||||
state reboot;
|
||||
return;
|
||||
}else{
|
||||
llSay(0, "Group tag is required to lease");
|
||||
llResetScript(); // refuse to lease
|
||||
}
|
||||
}
|
||||
|
||||
if(g_kTransferID!=NULL && g_kTransferID == llDetectedKey(0)){
|
||||
g_kLeasedTo = llDetectedKey(0);
|
||||
llWhisper(0, "Transfer Completed");
|
||||
g_kTransferID=NULL;
|
||||
g_iTransferTimeout = 0;
|
||||
g_sPreferredName="";
|
||||
SavePayload();
|
||||
llSleep(10);
|
||||
|
||||
g_iState = mask(SET, g_iState, STATE_REBOOT_PENDING);
|
||||
|
||||
return;
|
||||
}
|
||||
llRegionSay(70, llDumpList2String(["checkgroup", "menu", llDetectedKey(0)], "%"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -422,6 +432,7 @@ state boot{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
dataserver(key kID, string sData)
|
||||
{
|
||||
if(HasDSRequest(kID) != -1)
|
||||
|
@ -464,6 +475,7 @@ state boot{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
http_response(key k,integer s,list m,string b){
|
||||
if(HasDSRequest(k)!=-1){
|
||||
list lMeta = GetMetaList(k);
|
||||
|
@ -471,10 +483,9 @@ state boot{
|
|||
|
||||
list lPar = llParseStringKeepNulls(b,[";;"],[]);
|
||||
if(llList2String(lPar,0)=="GetSupport"){
|
||||
g_lSupport = StrideOfList(llParseString2List(llList2String(lPar,1), ["~"],[]), 2, 0, -1);
|
||||
g_lSupport = llParseString2List(llList2String(lPar,1), ["~"],[]);
|
||||
llMessageLinked(LINK_SET, 0x1D, llList2Json(JSON_ARRAY, g_lSupport), "");
|
||||
|
||||
llWhisper(0, "Obtained support representative list");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +501,7 @@ state boot{
|
|||
|
||||
g_iNotification = iNotification;
|
||||
llSetTimerEvent(5);
|
||||
} else if(n == 0x004f) {
|
||||
} else if(n == 0x004f){
|
||||
API_SERVER = DecipherService(m,"api");
|
||||
} else if(n == 0x3E)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue