73 lines
No EOL
2.3 KiB
Text
Executable file
73 lines
No EOL
2.3 KiB
Text
Executable file
#include "variables.lsl"
|
|
#include "functions.lsl"
|
|
|
|
|
|
default
|
|
{
|
|
link_message(integer s,integer n,string m,key i){
|
|
if(n == 0x4C9F)
|
|
{
|
|
integer iDays = (integer)llJsonGetValue(m,["days"]);
|
|
integer iMask = (integer)llJsonGetValue(m,["mask"]);
|
|
|
|
// NOW - Check days remaining
|
|
if(!(iMask & 32))
|
|
{
|
|
if(iDays <= 14)
|
|
{
|
|
llInstantMessage(i, "/!\\ ATTENTION /!\\\n \n [ 14 days remain on your stall ]");
|
|
iMask += 32;
|
|
}
|
|
}
|
|
|
|
if(!(iMask & 1)){
|
|
if(iDays <= 7){
|
|
llInstantMessage(i, "/!\\ ATTENTION /!\\\n \n [ 7 days remain on your stall ]");
|
|
iMask+=1;
|
|
}
|
|
}
|
|
if(!(iMask & 2)){
|
|
if(iDays <= 6){
|
|
llInstantMessage(i, "/!\\ ATTENTION /!\\\n \n [ 6 days remain on your stall ]");
|
|
iMask+=2;
|
|
}
|
|
}
|
|
|
|
if(!(iMask & 4)){
|
|
if(iDays <= 3){
|
|
llInstantMessage(i, "/!\\ ATTENTION /!\\\n \n [ 3 days remaining on your stall, please renew soon ]");
|
|
iMask += 4;
|
|
}
|
|
}
|
|
|
|
if(!(iMask & 8)){
|
|
if(iDays <= 2){
|
|
llInstantMessage(i, "/!\\ ATTENTION /!\\\n \n [ 2 days remaining on your stall, please renew soon ]");
|
|
iMask += 8;
|
|
}
|
|
}
|
|
|
|
if(!(iMask & 16)){
|
|
if(iDays <= 1){
|
|
llInstantMessage(i, "/!\\ ATTENTION /!\\\n \n [ Your lease will expire within 24 hours ]");
|
|
iMask += 16;
|
|
}
|
|
}
|
|
|
|
|
|
llMessageLinked(LINK_SET, 0x4C9F1, llList2Json(JSON_OBJECT, ["mask", iMask]), i);
|
|
} else if(n == 0x3E)
|
|
{
|
|
if(llJsonGetValue(m,["op"]) == "pay")
|
|
{
|
|
integer L = (integer)llJsonGetValue(m,["L"]);
|
|
llGiveMoney(i, L);
|
|
} else if(llJsonGetValue(m,["op"]) == "money_enabled")
|
|
{
|
|
// OK
|
|
if(!(llGetPermissions()&PERMISSION_DEBIT))
|
|
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
|
|
}
|
|
}
|
|
}
|
|
} |