Thank you again for your reply... I am trying to learn scripting but I'm a noob
This is the script I have in my tipjar request button:
integer DEDICATION_CHANNEL = 98;
list requests = [];
default
{
touch_start(integer total_number)
{
if(llDetectedKey(0) != llGetOwner())
jump user;
if(llGetListLength(requests) == 0) {
llOwnerSay("No dedications are currently lined up.");
return;
}
llOwnerSay("----------------- BEGIN REQUESTS ------------------");
integer itra;
for(itra=0; itra<llGetListLength(requests); itra+=3) {
llOwnerSay(llList2String(requests, itra) + " requested the song: " + llList2String(requests, itra+1));
llOwnerSay("With the dedication: " + llList2String(requests, itra+2));
if(itra+3<llGetListLength(requests)-1)
llOwnerSay("-------------------------------------------------------");
}
llOwnerSay("------------------ END REQUESTS -------------------");
return;
@user;
integer comHandle = llListen(DEDICATION_CHANNEL, "", llDetectedKey(0), "");
llInstantMessage(llDetectedKey(0), "To request a song \"Song Title - Aritist\" with the dedication \"For (NAME)!\", you would type into the main chat:\n\n/" + (string)DEDICATION_CHANNEL + " Song Title - Artist Name%For (Name)\n\nThe forward-slash and the number after the slash are important.");
}
listen( integer channel, string name, key id, string message )
{
if(channel != DEDICATION_CHANNEL) return;
requests += (list)name + llList2List(llParseString2List(message, ["%"], [""]), 0, 0) + llList2List(llParseString2List(message, ["%"], [""]), 1, 1);
llInstantMessage(id, "Thank you! Your dedication has been stored and will be forwarded to the artist.");
}
}
Script that is in the Hud:
default
{
state_entry()
{
llRequestPermissions( llGetOwner(), PERMISSION_ATTACH );
}
run_time_permissions( integer vBitPermissions )
{
if(PERMISSION_ATTACH & vBitPermissions)
{
llAttachToAvatar( ATTACH_HUD_BOTTOM );
}
else
{
llOwnerSay( "You must attach this as a HUD" );
}
}
on_rez(integer rez)
{
if(!llGetAttached())
{ //reset the script if it's not attached.
llResetScript();
}
}
}// END //