It has a floating text above it, and I am trying to figure out how to remove the words. There is no "Set Text" script in the inventory so the words must be part of rthe freebie giver script......Can anyone tell me from the code below how I would remove the float text from it?
Thank You
// Time from last touch to return to first item in list, in seconds
// Change to 0.0 to not return at all
float gResetTime = 90.0;
integer gItem = 0;
string gName = "";
integer gItemMax = 0;
integer gThisScript = 0;
// The colour to display text in
vector COLOUR = <>;
// This list holds the items to be dispensed
list gItemNames = [];
// This is the texture to display if there is no illustration in the box
// Change as desired....
string TEXTURE_NO_PIC = "0e90ed6b-84c2-8a81-359a-e556e42417dd";
list list_types = [INVENTORY_NONE, INVENTORY_TEXTURE, INVENTORY_SOUND,
INVENTORY_LANDMARK, INVENTORY_CLOTHING, INVENTORY_OBJECT, INVENTORY_NOTECARD,
INVENTORY_SCRIPT, INVENTORY_BODYPART, INVENTORY_ANIMATION, INVENTORY_GESTURE];
// this list is of the string names corresponding to the one above.
list list_names = ["None", "Texture", "Sound", "Landmark", "Clothing",
"Object", "Notecard", "Script", "Body Part", "Animation", "Gesture"];
string item_type(string item_name)
{
integer detected_type = llGetInventoryType(item_name);
integer type_index = llListFindList(list_types,[detected_type]);
return llList2String(list_names, type_index);
}
get_items()
{
integer f = 0;
string name = "";
gItemNames = [];
do {
name = llGetInventoryName(INVENTORY_ALL, f++);
// Will not vend itself, or any illustration
if (name != llGetScriptName()
&& (
// Check whether it is a picture of another item in the box
llGetSubString(name, -3, -1) != "pic"
|| llGetInventoryType(llGetSubString(name, 0, -5)) == INVENTORY_NONE
)
&& name != ""
{gItemNames += [name];
}
} while (name != ""
;gItemMax = llGetListLength(gItemNames) - 1;
if (gItem < 0) gItem = 0;
else if (gItem > gItemMax) gItem = gItemMax;
display();
}
display()
{
if (llGetListLength(gItemNames) == 0) {
llSetText("No items available", COLOUR, 1.0);
llSetTexture(TEXTURE_NO_PIC, 2);
return;
}
gName = llList2String(gItemNames, gItem);
list permList = [];
integer perms = llGetInventoryPermMask(gName, MASK_NEXT);
if (!(perms & PERM_MODIFY)) permList += "
no mod)";if (!(perms & PERM_COPY)) permList += "
no copy)";if (!(perms & PERM_TRANSFER)) permList += "
no transfer)";string permMsg = "
full permissions)";if (permList != []) permMsg = llDumpList2String(permList, " "
;string itemType = item_type(gName);
llSetText("ITEM " + (string)(gItem + 1) + " OF " + (string)(gItemMax + 1) + "\n" + gName + "\n" + itemType + " " + permMsg, COLOUR, 1.0);
// Set picture, if available
if (llGetInventoryType(gName + " pic"
!= INVENTORY_NONE) {llSetTexture(gName + " pic", 2);
}
else if (itemType == "Texture"
{// Preview textures here
llSetTexture(gName, 2);
}
else {
llSetTexture(TEXTURE_NO_PIC, 2);
}
}
default
{
state_entry()
{
llOwnerSay("Ready to dispense items"
;get_items();
}
touch_start(integer total_number)
{
if (gItemMax == -1) {
llWhisper(0, "No items available"
;return;
}
string name = llDetectedName(0);
llSetText("Giving " + gName + "\nto " + name + "...", COLOUR, 1.0);
// if you want to record who took what, listen on this channel
llShout(-122, name + " took " + gName);
llGiveInventory(llDetectedKey(0), gName);
display();
}
link_message(integer s, integer n, string str, key id)
{
gItem += n;
if (gItem < 0) gItem = gItemMax;
else if (gItem > gItemMax) gItem = 0;
display();
llSetTimerEvent(gResetTime);
}
timer()
{
gItem = 0;
display();
llSetTimerEvent(0.0);
}
changed(integer change)
{
if (change & CHANGED_INVENTORY) {
get_items();
}
}
}
