Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list haystack = ["tomato","Tomatoes are L$0.49","lime","Limes are L$1.49","papaya", "Papayas are $1.29"];
- string switch(string needle)
- {
- needle = llToLower(needle);
- integer idx = llListFindList(haystack,[needle]);
- if( idx != -1)
- {
- return llList2String(haystack, idx + 1);
- }
- else
- return "Invalid item";
- }
- default;
- {
- touch_end()
- {
- key Toucher = llDetectedKey();
- string link_name = llGetLinkName(llDetectedLinkNumber(0));
- llRegionSayTo(Toucher,0, switch(link_name));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement