This Is The Giver Script It goes Into the prim that you will be sending to the other prim from
the current chat uses whisper so the prims need to be close together can be modified with llSay , llShout but whisper works fine since you dont want the chat channel picking up other peoples commands
this script can be named to whatever you want it to
IMPORTANT!
the prims need to at least be set to Modify for this to work! otherwise you will get a script error!.
CODE
// Created By Jodie Suisei 14/09/2008
// Free To Modify , Copy , Giveaway Under No Circumstances Should This Script Be Sold For Profit
// If You Happen To Use My Code Or Modify it Please Keep The Comments At The Top Here Intact Give Credit Where Due Please :)
// Special Thanks To All The SL Forum Goers For Pointing Me In The Right Directions For This Small Learning Project :)
// Basic Product Updater Can Be Used For Any Application Involving Object To Object Inventory Transfers. Uses llSetRemoteAccessPin & Object To Object Chat Via Private Chat Channel
integer channel = 4567; // Listen Channel For The Chat Between The Prims
integer Pin = 4567; // Pin For The Object To Object Transfers Of Scripts
string Inventory = "A Notecard"; // Our Notecard Name On A Global Variable ;)
integer start_param; // Start Param To Pass Onto The Script That Was Just Transfered
integer Running = TRUE; // Set The Script That Was Transfer To Automatically Running
default
{
state_entry()
{
llListen(channel, "", "", ""); // Open Listen Channel
}
listen(integer channel, string name, key id, string message)
{
if ( message == "UpdateCheckDumplings") // Password Check Response
{
llWhisper(0, "Product Verified Sending New Items Over"); // Messaging to Inform Clicker Whats Going On
llGiveInventory(id, Inventory); // Pass Our Notcard Named A Notecard Over
llRemoteLoadScriptPin( id, // Idenfify our Talking Objects With ID
"Updater Menu V1.1", // Name Of Script Being Passed Over
Pin, // The Pin That Needs To Match
Running, // Set The Script To Running.
start_param); // Start Parameter.
llWhisper(4567, "SelfDelete"); // Self Cleanup Command
}
}
on_rez(integer start_param)
{
llResetScript(); // Reset Script When Object Is Rezzed
}
}
and the second and final script is the one you will need to click on to start the basic product updater by clicking it.
Needs to be Named Updater Menu V1.1 And Placed Into The Prim With The Giver And Into The Recieving Prim if course with a little modificationt o the code you can change that and name the script to whatever you want to
CODE
// Created By Jodie Suisei 14/09/2008
// Free To Modify , Copy , Giveaway Under No Circumstances Should This Script Be Sold For Profit
// If You Happen To Use My Code Or Modify Please Keep The Comments At The Top Here Intact Give Credit Where Due Please :)
// Special Thanks To All The SL Forum Goers For Pointing Me In The Right Directions For This Small Learning Project :)
// Basic Product Updater Can Be Used For Any Application Involving Object To Object Inventory Transfers. Uses llSetRemoteAccessPin & Object To Object Chat Via Private Chat Channel
list Main = ["Update"]; // Mini Options Menu
integer channel = 4567; // Listen Channel For The Chat Between The Prims
integer Pin = 4567; // Pin For The Object To Object Transfers Of Scripts
key avatar; // Our Clicker's ID
integer update_timer = 30; // The Timer Before The Inventory Contents Are Cleaned Up
default
{
state_entry()
{
llSetRemoteScriptAccessPin(Pin); // Set The Remote Access Pin For The Script Transfers
avatar = llGetOwner(); // Identify Our Clicker
llListen(channel, "","",""); // Listen Channel
}
touch_start(integer total_number)
{
if (avatar == llGetOwner()) // If Our Object Owner Then Allow Them Access To The Menu
{
llDialog(llGetOwner(), "A Dialog Message", Main, channel); // Basic llDialog
}
}
listen(integer channel, string name, key id, string message)
{
if ( message == "Update") // Messaging Between The Prims
{
llWhisper(4567, "UpdateCheckDumplings"); // Password Check To Make Sure The Updater And Recieving Script is The Same
}
if ( message == "SelfDelete") // Messaging For The Self Cleanup Of Old Uneeded Files Or Scripts
{
llSetTimerEvent(update_timer); // Event Timer So The Tick Down Before The Inventory Contents Is Wiped
llSleep(10); // Tell The Script To Take A Nap To Give The Contents Enough Time To Show Up In The prim
llWhisper(0, "Transfer Complete Cleaning Up Old Files Within Product"); // Basic Chat To Inform Clicker What Is Going On
}
}
timer() // Timer Event
{
llSetTimerEvent(0); // When Timer Hits 0 Do The Below
llWhisper(0, "Finished Cleaning Up Old Files"); // Say What We Are Upto
llRemoveInventory("Updater Menu V1.1"); // Remove The Script We Just Transfered For The Purpose Of Keeping The Prim Clean
llRemoveInventory("A Notecard"); // Clean Up The Notecard We Just Dropped Into The Prim
}
on_rez(integer start_param)
{
llResetScript(); // Reset The Script For The Sake Of having it There So The Dialog Doesnt Foul Up For Whatever Reason
}
}
and the notecard required is Simply name A Notecard the contents do not matter since it will be deleted after the system has transfered itself over.
it maybe an idea to disable the copied Updater Menu V1.1 script in the giver script prim so as you dont get confused to which you are clicking on. with a little modifcation to the giver script you can easily disable the script with a changed inventory event.
simply once the two prims are set out and scripts are setup the prim containing only the Updater Menu V1.1 should be clicked and simply click the update button to start its little copy inventory over and a running script then sit back and wait for the final message should clean up after itself leaving the prim you orginally clicked on empty. you can then just drag drop another copy of the Updater Menu V1.1 into it to redo what you done.
I provide Limited support for this script as it was mainly a learning project and i am still a learner scripter but i will be happy to answer questions about the script on the forum



