Jump to content

Furware text from notecard


Birdguru
 Share

You are about to reply to a thread that has been inactive for 1113 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

hi i'm looking for a way to make the script from furware read of a notecard to make a prefered text to be displayed once it's set in the notecard

i'm trying to make 3 trophy's for horseracing 

i've been trying to tinker on the script a bit but so far only errors

so if anyone can help ?

 

a83dd2f8383b3da58594712aa62e8584.png

Link to comment
Share on other sites

Heya @Birdguru,  here is a snippet that seems to work ?..

string msg = "Default message here!!! ";
string mess;
string color = "rand";
string CurrNC;
key kQuery;
integer from;
integer x;

default
{
    state_entry()
    {  llMessageLinked(LINK_SET, 0, "", "fw_reset"); 
       CurrNC  =  llGetInventoryName(INVENTORY_NOTECARD,0);
       kQuery = llGetNotecardLine(CurrNC, 0);      
    }
    touch_start(integer total_number)
    {
    }
    link_message(integer sender, integer num, string str, key id)
    {   from = sender;
        if (id == "fw_ready") 
        {
            llOwnerSay("FW text is up and running!");        
            llMessageLinked(LINK_SET, 0, "c=" + color + "; a=center", "fw_conf");       
            llSetTimerEvent(0.5);
        }
    }
    dataserver(key query_id, string data)
    {   if (query_id == kQuery)
        {              
            if (data == EOF) 
            { 
                if(mess != "")
                {  msg = mess;
                }               
            }
            else 
            {   mess = llStringTrim( data, STRING_TRIM );
                llOwnerSay("mess : " + mess); 
                kQuery = llGetNotecardLine(CurrNC, 1);              
            }
        } 
    }
    timer()
    {   color = "rand";
        llMessageLinked(LINK_SET, 0, "c=" + color + "; a=center", "fw_conf");
        llMessageLinked(from, 0, msg , "fw_data");  
        llSetTimerEvent(6.0);     
    }
    changed(integer change)
    {
        if (change & CHANGED_INVENTORY)         
        { llOwnerSay("The inventory has changed.");
          llResetScript();
        }
    }
}

 

Edited by Xiija
added string trim
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1113 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...