Fix compile chain, and add final FFF version of boards
This commit is contained in:
parent
b1fc57b931
commit
a1a93ea994
17 changed files with 421 additions and 172 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,3 +1,9 @@
|
|||
[submodule "LSL/external/Dialogs"]
|
||||
path = LSL/external/Dialogs
|
||||
url = ssh://git@git.zontreck.com:1212/AriasCreations/Dialogs
|
||||
[submodule "LSL/external/furware"]
|
||||
path = LSL/external/furware
|
||||
url = ssh://git@git.zontreck.com:1212/AriasCreations/furware
|
||||
[submodule "LSL/external/CommonLSL"]
|
||||
path = LSL/external/CommonLSL
|
||||
url = ssh://git@git.zontreck.com:1212/AriasCreations/CommonLSL
|
||||
|
|
1
LSL/external/furware
vendored
Submodule
1
LSL/external/furware
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 979c617edd1bb2bfe7f27ce07378b3198bed9b8e
|
96
LSL/includes/functions.lsl
Normal file
96
LSL/includes/functions.lsl
Normal file
|
@ -0,0 +1,96 @@
|
|||
|
||||
MainMenu(key kAv)
|
||||
{
|
||||
list lAppend = [];
|
||||
// Check against ZNI Support roster
|
||||
integer iAdmin=0;
|
||||
string sAppend;
|
||||
string sTag = llList2String(llGetObjectDetails(kAv,[OBJECT_GROUP_TAG]),0);
|
||||
if(llListFindList(g_lSupport, [(string)kAv])!=-1 || llListFindList(g_lAdminTag, [sTag])!=-1){
|
||||
if(g_kLeasedTo!=NULL)lAppend += ["PermaLease"];
|
||||
iAdmin=1;
|
||||
|
||||
lAppend += ["Import", "Export", "MemStick"];
|
||||
}
|
||||
|
||||
if(llListFindList(g_lManagerTag, [sTag])!=-1)iAdmin=1;
|
||||
|
||||
if(g_kLeasedTo == NULL){
|
||||
lAppend += ["Lease"];
|
||||
}else if(g_kLeasedTo == kAv || iAdmin || g_kOwner == kAv){
|
||||
lAppend += ["End Lease", "Renew", "Set Picture", "Set Owner", "TransferLease", "Set Name", Checkbox(g_iWhiteFrame, "White Frame"), Checkbox(g_iLogo, "Logo"), Checkbox(g_iCustomTextColor, "CustomTxt"), "SetTxtC", "*RESET*"];
|
||||
|
||||
sAppend += "\n* CustomTxt, and SetTxtC relate to custom text colors.";
|
||||
}
|
||||
|
||||
if(g_kLeasedTo != NULL){
|
||||
lAppend += ["TimeRemain", "WhoLeased"];
|
||||
}
|
||||
|
||||
if(g_kOwner!=NULL)sAppend+="\nOwner is : secondlife:///app/agent/"+(string)g_kOwner+"/about";
|
||||
|
||||
Menu(g_kAuthorized, MAIN_MENU_TEXT+sAppend, MAIN_MENU_BUTTONS+lAppend, "menu~main");
|
||||
}
|
||||
Menu(key kAv, string sText, list lButtons, string sIdent)
|
||||
{
|
||||
llMessageLinked(LINK_THIS, LINK_MENU_DISPLAY, llDumpList2String([sIdent, "TRUE", sText, llDumpList2String(lButtons, "~")], "|"), kAv);
|
||||
}
|
||||
GetArbitraryData(key kAv, string sText, string sIdent){
|
||||
llMessageLinked(LINK_THIS, LINK_MENU_DISPLAY, llDumpList2String([sIdent, "FALSE", sText, ""], "|"), kAv);
|
||||
}
|
||||
|
||||
string StripResident(string a)
|
||||
{
|
||||
list lParam = llParseString2List(a,[" ", "."],[]);
|
||||
if(llGetListLength(lParam)==0 || llGetListLength(lParam)==1)return a;
|
||||
|
||||
if(llToLower(llList2String(lParam,1)) == "resident"){
|
||||
lParam = llDeleteSubList(lParam,1,1);
|
||||
}else return a;
|
||||
return llDumpList2String(lParam, " ");
|
||||
}
|
||||
|
||||
Text(){
|
||||
string sColor = GetColorStr(g_iWhiteFrame);
|
||||
g_sName = StripResident(g_sName);
|
||||
if(g_sPreferredName == ""){
|
||||
if(g_sDisplayName != g_sName)
|
||||
llMessageLinked(LINK_SET, 0,"<!c="+sColor+">"+ llGetSubString(g_sDisplayName+" ("+g_sName+")",0,23), "fw_data");
|
||||
else
|
||||
llMessageLinked(LINK_SET,0,"<!c="+sColor+">"+llGetSubString(g_sName,0,23),"fw_data");
|
||||
} else llMessageLinked(LINK_SET,0,"<!c="+sColor+">"+g_sPreferredName, "fw_data");
|
||||
}
|
||||
|
||||
CleanInventory()
|
||||
{
|
||||
list lDefaults = ["Board [ZNI]", "Dialog Module", "Text", "FFF Stall Board Flash Drive [ZNI]", "Update Module [ZNI]"];
|
||||
integer i=0;
|
||||
integer end = llGetInventoryNumber(INVENTORY_ALL);
|
||||
for(i=0;i<end;i++){
|
||||
string sName = llGetInventoryName(INVENTORY_ALL,i);
|
||||
if(llListFindList( lDefaults, [sName] ) == -1) {
|
||||
llRemoveInventory(sName);
|
||||
i=-1;
|
||||
end = llGetInventoryNumber(INVENTORY_ALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SavePayload(){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op", "request", "get", "kvp_store", "var", "$.FFF."+llGetObjectDesc(), "val", llList2Json(JSON_OBJECT, ["lease", g_kLeasedTo, "texture", g_kTexture, "expire", g_iExpireAt, "owner", g_kOwner, "notif", g_iNotification, "name", g_sPreferredName, "whiteframe", g_iWhiteFrame, "logo", g_iLogo, "transfer", g_kTransferID, "transfer_expire", g_iTransferTimeout, "customtxtcolor", g_vCustomColorText, "usecustomtxt", g_iCustomTextColor])]));
|
||||
}
|
||||
|
||||
DeletePayload(){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op", "request", "get", "kvp_del", "var", "$.FFF."+llGetObjectDesc()]));
|
||||
}
|
||||
|
||||
string GetColorStr(integer iWhite)
|
||||
{
|
||||
if(g_iCustomTextColor){
|
||||
return (((string)g_vCustomColorText.x)+","+((string)g_vCustomColorText.y)+","+((string)g_vCustomColorText.z));
|
||||
}else {
|
||||
if(iWhite)return "0,0,0.5";
|
||||
else return "white"; // black frame
|
||||
}
|
||||
}
|
79
LSL/includes/variables.lsl
Normal file
79
LSL/includes/variables.lsl
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
Global variables for stall board
|
||||
*/
|
||||
|
||||
#define DEVELOPER 0
|
||||
|
||||
|
||||
integer g_iWaitFor = 0;
|
||||
key FFF_CIRCLE_LOGO = "f063237e-429b-5e02-dbfb-8a2a69535cdc";
|
||||
key OFFLINE_TEXTURE = "62f26398-4d32-15fb-38d8-d59e31dd0a86";
|
||||
key ONLINE_TEXTURE = "69fdb503-d13b-8b21-98c9-70011db399d3";
|
||||
#if DEVELOPER == 0
|
||||
key AVAILABLE = "8833aa83-b7f1-5c40-f4e8-fdf6d397ef1b";
|
||||
#else
|
||||
key AVAILABLE = "8833aa83-b7f1-5c40-f4e8-fdf6d397ef1b";
|
||||
#endif
|
||||
|
||||
key NO_TEXTURE = "a67ed6f6-dca8-4ce4-a338-13ac5f32e9d0";
|
||||
|
||||
|
||||
list g_lAdminTag = ["FFF Stable Mistress", "FFF Stable Master"];
|
||||
list g_lManagerTag = ["FFF Trainer", "FFF Senior Trainer"];
|
||||
|
||||
|
||||
|
||||
integer LINK_MENU_DISPLAY = 300;
|
||||
integer LINK_MENU_REMOVE = 310;
|
||||
integer LINK_MENU_RETURN = 320;
|
||||
integer LINK_MENU_TIMEOUT = 330;
|
||||
|
||||
string g_sDate;
|
||||
|
||||
list MAIN_MENU_BUTTONS = ["Reboot"];
|
||||
string MAIN_MENU_TEXT = "";
|
||||
string IMPORT_MENU_TEXT = "";
|
||||
|
||||
key g_kInvLoad;
|
||||
key g_kTransferID=NULL_KEY;
|
||||
integer g_iTransferTimeout;
|
||||
integer g_iHaveKVP = 0;
|
||||
integer g_iLastKVPTry;
|
||||
|
||||
|
||||
string HEADER = "FFF Stall Board\n[By ZNI Creations]\nVersion 3.9.0430220029 (Apr 30, 2022)\n \n";
|
||||
|
||||
|
||||
integer g_iAuthorized;
|
||||
key g_kAuthorized;
|
||||
|
||||
key g_kLeasedTo=NULL_KEY;
|
||||
key g_kTexture=NULL_KEY;
|
||||
integer g_iExpireAt;
|
||||
key g_kOwner=NULL_KEY;
|
||||
string g_sPreferredName;
|
||||
integer g_iWhiteFrame = FALSE;
|
||||
|
||||
integer g_iNotification;
|
||||
|
||||
string g_sName;
|
||||
string g_sDisplayName;
|
||||
integer g_iOnline;
|
||||
|
||||
|
||||
integer g_iLogo=1;
|
||||
vector g_vCustomColorText;
|
||||
integer g_iCustomTextColor=FALSE;
|
||||
|
||||
|
||||
|
||||
integer g_iProtocol;
|
||||
integer g_iFill = 0;
|
||||
|
||||
string g_sPayload = "";
|
||||
|
||||
integer g_iNotifFlags; // (may be incompatible!)
|
||||
|
||||
|
||||
string g_sLeasedTo;
|
||||
key g_kTransferDest=NULL_KEY;
|
|
@ -1,164 +1,6 @@
|
|||
#include "MasterFile.lsl"
|
||||
#define DEVELOPER 0
|
||||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
|
||||
integer g_iWaitFor = 0;
|
||||
key FFF_CIRCLE_LOGO = "f063237e-429b-5e02-dbfb-8a2a69535cdc";
|
||||
key OFFLINE_TEXTURE = "62f26398-4d32-15fb-38d8-d59e31dd0a86";
|
||||
key ONLINE_TEXTURE = "69fdb503-d13b-8b21-98c9-70011db399d3";
|
||||
#if DEVELOPER == 0
|
||||
key AVAILABLE = "8833aa83-b7f1-5c40-f4e8-fdf6d397ef1b";
|
||||
#else
|
||||
key AVAILABLE = "8833aa83-b7f1-5c40-f4e8-fdf6d397ef1b";
|
||||
#endif
|
||||
|
||||
key NO_TEXTURE = "a67ed6f6-dca8-4ce4-a338-13ac5f32e9d0";
|
||||
|
||||
|
||||
list g_lAdminTag = ["FFF Stable Mistress", "FFF Stable Master"];
|
||||
list g_lManagerTag = ["FFF Trainer", "FFF Senior Trainer"];
|
||||
|
||||
|
||||
|
||||
integer LINK_MENU_DISPLAY = 300;
|
||||
integer LINK_MENU_REMOVE = 310;
|
||||
integer LINK_MENU_RETURN = 320;
|
||||
integer LINK_MENU_TIMEOUT = 330;
|
||||
|
||||
string g_sDate;
|
||||
|
||||
list MAIN_MENU_BUTTONS = ["Reboot"];
|
||||
string MAIN_MENU_TEXT = "";
|
||||
string IMPORT_MENU_TEXT = "";
|
||||
|
||||
key g_kInvLoad;
|
||||
key g_kTransferID=NULL_KEY;
|
||||
integer g_iTransferTimeout;
|
||||
integer g_iHaveKVP = 0;
|
||||
integer g_iLastKVPTry;
|
||||
|
||||
#define THIRTY_DAYS (((60*60)*24)*30)
|
||||
#define ONE_DAY ((60*60)*24)
|
||||
|
||||
string HEADER = "FFF Stall Board\n[By ZNI Creations]\nVersion 3.9.0430220029 (Apr 30, 2022)\n \n";
|
||||
|
||||
|
||||
integer g_iAuthorized;
|
||||
key g_kAuthorized;
|
||||
|
||||
key g_kLeasedTo=NULL_KEY;
|
||||
key g_kTexture=NULL_KEY;
|
||||
integer g_iExpireAt;
|
||||
key g_kOwner=NULL_KEY;
|
||||
string g_sPreferredName;
|
||||
integer g_iWhiteFrame = FALSE;
|
||||
|
||||
integer g_iNotification;
|
||||
|
||||
string g_sName;
|
||||
string g_sDisplayName;
|
||||
integer g_iOnline;
|
||||
|
||||
list g_lSupport = [];
|
||||
|
||||
MainMenu(key kAv)
|
||||
{
|
||||
list lAppend = [];
|
||||
// Check against ZNI Support roster
|
||||
integer iAdmin=0;
|
||||
string sAppend;
|
||||
string sTag = llList2String(llGetObjectDetails(kAv,[OBJECT_GROUP_TAG]),0);
|
||||
if(llListFindList(g_lSupport, [(string)kAv])!=-1 || llListFindList(g_lAdminTag, [sTag])!=-1){
|
||||
if(g_kLeasedTo!=NULL)lAppend += ["PermaLease"];
|
||||
iAdmin=1;
|
||||
|
||||
lAppend += ["Import", "Export", "MemStick"];
|
||||
}
|
||||
|
||||
if(llListFindList(g_lManagerTag, [sTag])!=-1)iAdmin=1;
|
||||
|
||||
if(g_kLeasedTo == NULL){
|
||||
lAppend += ["Lease"];
|
||||
}else if(g_kLeasedTo == kAv || iAdmin || g_kOwner == kAv){
|
||||
lAppend += ["End Lease", "Renew", "Set Picture", "Set Owner", "TransferLease", "Set Name", Checkbox(g_iWhiteFrame, "White Frame"), Checkbox(g_iLogo, "Logo"), Checkbox(g_iCustomTextColor, "CustomTxt"), "SetTxtC", "*RESET*"];
|
||||
|
||||
sAppend += "\n* CustomTxt, and SetTxtC relate to custom text colors.";
|
||||
}
|
||||
|
||||
if(g_kLeasedTo != NULL){
|
||||
lAppend += ["TimeRemain", "WhoLeased"];
|
||||
}
|
||||
|
||||
if(g_kOwner!=NULL)sAppend+="\nOwner is : secondlife:///app/agent/"+(string)g_kOwner+"/about";
|
||||
|
||||
Menu(g_kAuthorized, MAIN_MENU_TEXT+sAppend, MAIN_MENU_BUTTONS+lAppend, "menu~main");
|
||||
}
|
||||
Menu(key kAv, string sText, list lButtons, string sIdent)
|
||||
{
|
||||
llMessageLinked(LINK_THIS, LINK_MENU_DISPLAY, llDumpList2String([sIdent, "TRUE", sText, llDumpList2String(lButtons, "~")], "|"), kAv);
|
||||
}
|
||||
GetArbitraryData(key kAv, string sText, string sIdent){
|
||||
llMessageLinked(LINK_THIS, LINK_MENU_DISPLAY, llDumpList2String([sIdent, "FALSE", sText, ""], "|"), kAv);
|
||||
}
|
||||
|
||||
string StripResident(string a)
|
||||
{
|
||||
list lParam = llParseString2List(a,[" ", "."],[]);
|
||||
if(llGetListLength(lParam)==0 || llGetListLength(lParam)==1)return a;
|
||||
|
||||
if(llToLower(llList2String(lParam,1)) == "resident"){
|
||||
lParam = llDeleteSubList(lParam,1,1);
|
||||
}else return a;
|
||||
return llDumpList2String(lParam, " ");
|
||||
}
|
||||
|
||||
Text(){
|
||||
string sColor = GetColorStr(g_iWhiteFrame);
|
||||
g_sName = StripResident(g_sName);
|
||||
if(g_sPreferredName == ""){
|
||||
if(g_sDisplayName != g_sName)
|
||||
llMessageLinked(LINK_SET, 0,"<!c="+sColor+">"+ llGetSubString(g_sDisplayName+" ("+g_sName+")",0,23), "fw_data");
|
||||
else
|
||||
llMessageLinked(LINK_SET,0,"<!c="+sColor+">"+llGetSubString(g_sName,0,23),"fw_data");
|
||||
} else llMessageLinked(LINK_SET,0,"<!c="+sColor+">"+g_sPreferredName, "fw_data");
|
||||
}
|
||||
|
||||
CleanInventory()
|
||||
{
|
||||
list lDefaults = ["Board [ZNI]", "Dialog Module", "Text", "FFF Stall Board Flash Drive [ZNI]", "Update Module [ZNI]"];
|
||||
integer i=0;
|
||||
integer end = llGetInventoryNumber(INVENTORY_ALL);
|
||||
for(i=0;i<end;i++){
|
||||
string sName = llGetInventoryName(INVENTORY_ALL,i);
|
||||
if(llListFindList( lDefaults, [sName] ) == -1) {
|
||||
llRemoveInventory(sName);
|
||||
i=-1;
|
||||
end = llGetInventoryNumber(INVENTORY_ALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
integer g_iLogo=1;
|
||||
vector g_vCustomColorText;
|
||||
integer g_iCustomTextColor=FALSE;
|
||||
|
||||
SavePayload(){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op", "request", "get", "kvp_store", "var", "$.FFF."+llGetObjectDesc(), "val", llList2Json(JSON_OBJECT, ["lease", g_kLeasedTo, "texture", g_kTexture, "expire", g_iExpireAt, "owner", g_kOwner, "notif", g_iNotification, "name", g_sPreferredName, "whiteframe", g_iWhiteFrame, "logo", g_iLogo, "transfer", g_kTransferID, "transfer_expire", g_iTransferTimeout, "customtxtcolor", g_vCustomColorText, "usecustomtxt", g_iCustomTextColor])]));
|
||||
}
|
||||
|
||||
DeletePayload(){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op", "request", "get", "kvp_del", "var", "$.FFF."+llGetObjectDesc()]));
|
||||
}
|
||||
|
||||
string GetColorStr(integer iWhite)
|
||||
{
|
||||
if(g_iCustomTextColor){
|
||||
return (((string)g_vCustomColorText.x)+","+((string)g_vCustomColorText.y)+","+((string)g_vCustomColorText.z));
|
||||
}else {
|
||||
if(iWhite)return "0,0,0.5";
|
||||
else return "white"; // black frame
|
||||
}
|
||||
}
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
|
@ -247,6 +89,7 @@ state boot
|
|||
llSetLinkTexture(LINK_ROOT,TEXTURE_TRANSPARENT,2);
|
||||
}
|
||||
|
||||
initBasicSupport();
|
||||
//llSetLinkTexture(LINK_ROOT, OFFLINE_TEXTURE, 3);
|
||||
//llSetLinkColor(LINK_ROOT, <1,1,1>, 3);
|
||||
llSetLinkPrimitiveParams(LINK_SET, [PRIM_FULLBRIGHT, ALL_SIDES, TRUE]); // Set the entire linkset to fullbright.. this will help with night time lighting problems.
|
||||
|
@ -289,7 +132,7 @@ state boot
|
|||
llSetLinkColor(LINK_ROOT, <1,1,1>, 0);
|
||||
}
|
||||
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/Get_Support.php", [], ""), "get_sup");
|
||||
checkSupport();
|
||||
|
||||
if(g_kLeasedTo==NULL){
|
||||
llRegionSay(0x99f9, llList2Json(JSON_OBJECT, ["op","request","get","kvp_get", "var", "$.FFF."+llGetObjectDesc()]));
|
||||
|
|
179
LSL/raw/Flash.lsl
Normal file
179
LSL/raw/Flash.lsl
Normal file
|
@ -0,0 +1,179 @@
|
|||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llSetObjectName("FFF Stall Board Flash Drive [ZNI]");
|
||||
llListen(5, "", "", "");
|
||||
llListen(99, "", llGetOwner(), "");
|
||||
//llSay(0, "Memory stick is ready");
|
||||
g_iProtocol = 0x2110b;
|
||||
llSetLinkColor(LINK_ROOT, <1,0,0>, 6);
|
||||
//llSay(0, "Flash Memory is empty");
|
||||
|
||||
llSetText("", ZERO_VECTOR, 0);
|
||||
llSetLinkTexture(2, TEXTURE_TRANSPARENT, 1);
|
||||
}
|
||||
listen(integer c,string n,key i,string m){
|
||||
if(c == 99){
|
||||
// This is the ID of the board to download
|
||||
llRegionSayTo((key)m, 5, llList2Json(JSON_OBJECT, ["cmd", "memcpy", "protocol", g_iProtocol]));
|
||||
}else if(c == 5){
|
||||
if(llJsonGetValue(m,["cmd"])=="set" || llJsonGetValue(m,["cmd"])=="set_memstick"){
|
||||
g_sPayload = m;
|
||||
state fill;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
state fill{
|
||||
state_entry(){
|
||||
llSetTimerEvent(1);
|
||||
}
|
||||
timer(){
|
||||
switch(g_iFill){
|
||||
case 0:{
|
||||
llSetText("[]",<1,1,1>,1);
|
||||
g_kLeasedTo = (key)llJsonGetValue(g_sPayload, ["leasee"]);
|
||||
llSetLinkColor(LINK_ROOT, <0.75,0.15,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 1:{
|
||||
llSetText("[->]",<1,1,1>,1);
|
||||
g_kTexture = (key)llJsonGetValue(g_sPayload, ["texture"]);
|
||||
llSetLinkColor(LINK_ROOT, <0.75,0.25,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 2:{
|
||||
llSetText("[->->]",<1,1,1>,1);
|
||||
g_iExpireAt = (integer)llJsonGetValue(g_sPayload, ["expire_time"]);
|
||||
llSetLinkColor(LINK_ROOT, <0.5,0.5,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 3:{
|
||||
llSetText("[->->->]",<1,1,1>,1);
|
||||
g_kOwner = (key)llJsonGetValue(g_sPayload, ["owner"]);
|
||||
llSetLinkColor(LINK_ROOT, <0.25,0.75,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 4:{
|
||||
llSetText("[->->->->]",<1,1,1>,1);
|
||||
g_iNotifFlags = (integer)llJsonGetValue(g_sPayload, ["notif"]);
|
||||
llSetLinkColor(LINK_ROOT, <0.15,0.75,0>, 6);
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
state full;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
g_iFill++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
state full
|
||||
{
|
||||
state_entry(){
|
||||
llSetText("[Saving...]",<1,1,1>,1);
|
||||
UpdateDSRequest(NULL, llRequestAgentData(g_kLeasedTo, DATA_NAME), SetDSMeta(["leased"]));
|
||||
llSetLinkColor(LINK_ROOT, <0,1,0>, 6);
|
||||
llSetLinkTexture(2, g_kTexture, 1);
|
||||
|
||||
llListen(0x9f, "", "", "");
|
||||
}
|
||||
dataserver(key k,string d){
|
||||
if(HasDSRequest(k)!=-1){
|
||||
list lMeta = GetMetaList(k);
|
||||
if(llList2String(lMeta,0) == "leased"){
|
||||
g_sLeasedTo = d;
|
||||
DeleteDSReq(k);
|
||||
llSetText(g_sLeasedTo+"\n----\nStall Board Settings: 1", <0,1,1>,1);
|
||||
llSetObjectName("["+d+"] Stall Board FlashMemory [ZNI]");
|
||||
}
|
||||
}
|
||||
}
|
||||
touch_start(integer t){
|
||||
llSay(0, "click and hold for 5 seconds or longer to erase");
|
||||
llResetTime();
|
||||
}
|
||||
touch(integer t){
|
||||
if(llGetTime()>5){
|
||||
state empty;
|
||||
}
|
||||
}
|
||||
listen(integer c,string n,key i,string m)
|
||||
{
|
||||
if(llJsonGetValue(m,["cmd"]) == "retrieve")
|
||||
{
|
||||
g_kTransferDest = i;
|
||||
|
||||
state package;
|
||||
}
|
||||
}
|
||||
}
|
||||
state package
|
||||
{
|
||||
state_entry(){
|
||||
llSetText("[scp /flash.raw newboard:/import.raw]",<1,1,1>,1);
|
||||
g_sPayload = llList2Json(JSON_OBJECT,["lease", g_kLeasedTo, "texture", g_kTexture, "expire", g_iExpireAt, "owner", g_kOwner]);
|
||||
|
||||
g_sPayload = llList2Json(JSON_OBJECT, ["target", g_kTransferDest, "payload", g_sPayload]);
|
||||
|
||||
state empty;
|
||||
}
|
||||
}
|
||||
state empty
|
||||
{
|
||||
state_entry(){
|
||||
g_iFill = 0;
|
||||
llSetTimerEvent(1);
|
||||
}
|
||||
timer(){
|
||||
switch(g_iFill){
|
||||
case 0:{
|
||||
llSetLinkColor(LINK_ROOT, <0.15,0.75,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 1:{
|
||||
llSetLinkTexture(2, TEXTURE_TRANSPARENT, 1);
|
||||
|
||||
llSetLinkColor(LINK_ROOT, <0.25,0.75,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 2:{
|
||||
|
||||
llSetLinkColor(LINK_ROOT, <0.5,0.5,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 3:{
|
||||
|
||||
llSetLinkColor(LINK_ROOT, <0.75,0.25,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 4:{
|
||||
|
||||
llSetLinkColor(LINK_ROOT, <0.75,0.15,0>, 6);
|
||||
break;
|
||||
}
|
||||
case 5:{
|
||||
if(g_kTransferDest != NULL)
|
||||
llRegionSayTo(g_kTransferDest, 0x9f, g_sPayload);
|
||||
llSleep(1);
|
||||
llSetText("", ZERO_VECTOR,0);
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
llResetScript();
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_iFill++;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
#include "MasterFile.lsl"
|
||||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
integer g_iTotalKeys;
|
||||
integer g_iProcessedKeys;
|
||||
|
||||
|
@ -66,7 +68,7 @@ default
|
|||
DeleteDSReq(kID);
|
||||
|
||||
llSleep(0.5);
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStore.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","set", "id", sKey, "val", sValue])), "sv");
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStore.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","set", "id", sKey, "val", sValue])), "sv");
|
||||
g_iProcessedKeys++;
|
||||
SET_HOVER();
|
||||
llSleep(0.5);
|
||||
|
@ -90,7 +92,7 @@ default
|
|||
llRegionSay(5, "restore9f");
|
||||
|
||||
llSetText("Please Stand By\nPerforming daily KVP store backup",<1,0,0>,1);
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStore.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","clear"])), "sv");
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStore.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","clear"])), "sv");
|
||||
|
||||
llSleep(10);
|
||||
UpdateDSRequest(NULL, llKeyCountKeyValue(), "count");
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "MasterFile.lsl"
|
||||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
|
||||
integer g_iTotalKeys;
|
||||
integer g_iProcessedKeys;
|
||||
|
||||
|
@ -66,7 +69,7 @@ default
|
|||
DeleteDSReq(kID);
|
||||
|
||||
llSleep(0.5);
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStoreTesting.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","set", "id", sKey, "val", sValue])), "sv");
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStoreTesting.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","set", "id", sKey, "val", sValue])), "sv");
|
||||
g_iProcessedKeys++;
|
||||
SET_HOVER();
|
||||
llSleep(0.5);
|
||||
|
@ -90,7 +93,7 @@ default
|
|||
llRegionSay(5, "restore9f");
|
||||
|
||||
llSetText("Please Stand By\nPerforming daily KVP store backup",<1,0,0>,1);
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStoreTesting.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","clear"])), "sv");
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStoreTesting.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","clear"])), "sv");
|
||||
|
||||
llSleep(10);
|
||||
UpdateDSRequest(NULL, llKeyCountKeyValue(), "count");
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "MasterFile.lsl"
|
||||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
string g_sDate;
|
||||
integer g_iTotal = 0;
|
||||
|
@ -6,7 +7,7 @@ integer g_iTotalDB;
|
|||
integer g_iProcessed = 0;
|
||||
GetKVP(integer iOffset)
|
||||
{
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStore.php", [HTTP_METHOD,"POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","get","offset",iOffset])), SetDSMeta(["get", iOffset]));
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStore.php", [HTTP_METHOD,"POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op","get","offset",iOffset])), SetDSMeta(["get", iOffset]));
|
||||
}
|
||||
|
||||
integer Percent(integer I, integer M)
|
||||
|
@ -43,7 +44,7 @@ text(){
|
|||
bootstrap()
|
||||
{
|
||||
llSleep(2);
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStore.php", [HTTP_METHOD,"POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op", "get", "offset", g_iProcessed])), SetDSMeta(["download"]));
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStore.php", [HTTP_METHOD,"POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op", "get", "offset", g_iProcessed])), SetDSMeta(["download"]));
|
||||
}
|
||||
default
|
||||
{
|
||||
|
@ -61,7 +62,7 @@ default
|
|||
listen(integer c,string n,key i,string m){
|
||||
g_sDate = m;
|
||||
llSay(0, "Preparing to restore date: "+g_sDate);
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.dev/zni/SLKVPStore.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op", "restore", "date", g_sDate])), SetDSMeta(["restore"]));
|
||||
UpdateDSRequest(NULL, llHTTPRequest("https://api.zontreck.com/zni/SLKVPStore.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], llList2Json(JSON_OBJECT,["op", "restore", "date", g_sDate])), SetDSMeta(["restore"]));
|
||||
}
|
||||
http_response(key k, integer s,list m,string b){
|
||||
if(HasDSRequest(k)!=-1){
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "MasterFile.lsl"
|
||||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
integer g_iAt;
|
||||
integer g_iOffset;
|
||||
|
|
11
LSL/raw/test.lsl
Normal file
11
LSL/raw/test.lsl
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "variables.lsl"
|
||||
#include "functions.lsl"
|
||||
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
4
LSL/src/Board [ZNI].lsl
Normal file
4
LSL/src/Board [ZNI].lsl
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "../external/CommonLSL/variables.lsl"
|
||||
#include "../external/CommonLSL/functions.lsl"
|
||||
|
||||
#include "../raw/Board.lsl"
|
4
LSL/src/Dialog Module [ZNI].lsl
Normal file
4
LSL/src/Dialog Module [ZNI].lsl
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "../external/CommonLSL/variables.lsl"
|
||||
#include "../external/CommonLSL/functions.lsl"
|
||||
|
||||
#include "../external/Dialogs/Dialog Module.lsl"
|
4
LSL/src/Flash Drive [ZNI].lsl
Normal file
4
LSL/src/Flash Drive [ZNI].lsl
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "../external/CommonLSL/variables.lsl"
|
||||
#include "../external/CommonLSL/functions.lsl"
|
||||
|
||||
#include "../raw/Flash.lsl"
|
4
LSL/src/Restorer [ZNI].lsl
Normal file
4
LSL/src/Restorer [ZNI].lsl
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "../external/CommonLSL/variables.lsl"
|
||||
#include "../external/CommonLSL/functions.lsl"
|
||||
|
||||
#include "../raw/Restorer.lsl"
|
4
LSL/src/Text.lsl
Normal file
4
LSL/src/Text.lsl
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "../external/CommonLSL/variables.lsl"
|
||||
#include "../external/CommonLSL/functions.lsl"
|
||||
|
||||
#include "../external/furware/FURWARE text.lsl"
|
7
LSL/src/Update Module [ZNI].lsl
Normal file
7
LSL/src/Update Module [ZNI].lsl
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
This script does not exist anymore in the original form.
|
||||
*/
|
||||
#include "../external/CommonLSL/variables.lsl"
|
||||
#include "../external/CommonLSL/functions.lsl"
|
||||
|
||||
#include "../raw/update_module.lsl"
|
Loading…
Reference in a new issue