----
2
600
10
----so simple
2//L$
600//sec (600=10minutes)
10//MAX L$ per day..0:00PDT reset
integer campmoney = 0;
integer campadd = 0;
integer camptime = 0;
integer limit;
string reciever;
integer pula;
string gName = "Settings";
integer gLine = 0;
key gQueryID;
default {
dataserver(key query_id, string data)
{ if (query_id == gQueryID)
{ if (data != EOF)
{
if (gLine == 0)
{
campadd = (integer)data;
}
if (gLine == 1)
{
camptime = (integer)data;
pula = camptime/60;
}
if (gLine == 2)
{
limit = (integer)data;
}
++gLine;
gQueryID = llGetNotecardLine(gName, gLine);
}
}
}
state_entry() {
gQueryID = llGetNotecardLine(gName, gLine);
llRequestPermissions(llGetOwner(),PERMISSION_DEBIT );
llSetText("Sit here to Make Money .\nL$"+(string)campadd+" every "+(string)pula+" minutes",<0,1,0>,1);
llSitTarget(<0,0,-0.6>, <180,0,0,0>);
}
changed(integer change) {
if (change & CHANGED_LINK) {
if (llAvatarOnSitTarget() != NULL_KEY) {
reciever = llAvatarOnSitTarget();
llSetText("Money Made:"+(string)campmoney,<0,1,0>,1);
llSetTimerEvent(camptime);
}
else{if (campmoney > 0) {
llGiveMoney(reciever,campmoney);}
reciever="";
campmoney=0;
llSetText("Sit here to Make Money .\nL$"+(string)campadd+" every "+(string)pula+" minutes",<0,1,0>,1);
llSetTimerEvent(100000000);
}
}
}on_rez(integer start_param)
{llResetScript();}
timer()
{ campmoney = campmoney+campadd;
llSetText("Money:"+(string)campmoney,<0,1,0>,1);
if (llAvatarOnSitTarget() != NULL_KEY)
{
if ( campmoney == limit ) {llUnSit(reciever);}
}
else
{
reciever="";
campmoney=0;
llSetText("Sit here to Make Money .\nL$"+(string)campadd+" every "+(string)pula+" minutes",<0,1,0>,1);
llSetTimerEvent(100000000);
}
}
}
キャンプはすっかり姿を消しましたね
返信削除