Birdguru Posted April 7, 2021 Share Posted April 7, 2021 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 ? Link to comment Share on other sites More sharing options...
Xiija Posted April 7, 2021 Share Posted April 7, 2021 (edited) 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 April 8, 2021 by Xiija added string trim Link to comment Share on other sites More sharing options...
Birdguru Posted April 7, 2021 Author Share Posted April 7, 2021 it 's somehow spamming mess and still from script off the idea is to put in a nc the message that needs to turn up on the trophy itself instead of placing the text in the script but it is interesting Link to comment Share on other sites More sharing options...
Xiija Posted April 8, 2021 Share Posted April 8, 2021 @Birdguru make sure you have no whitespace after your one line in your notecard. here is mine, working.... Link to comment Share on other sites More sharing options...
Recommended Posts
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