lsl Changing shared medial url when a word is typed in local chat?

EmpressOfCommunism

Too Cute for Capitalism ❤️
Sep 20, 2018
207
This is probably frighteningly simple, but I can't find any script on the marketplace that does this, and only this without 100s of other possibly laggy features for multi thousands price tag.

I need a script that changes the shared media url on a face of an object, when it hears for a phrase typed into local chat. I already have a functional script that shows the shared media url. It is this:
Shared Media kiosk mode simple display
// Written by PanteraPolnocy Resident

string URLlink = (my url)";

default{state_entry(){llSetPrimMediaParams(0,
[PRIM_MEDIA_AUTO_PLAY,TRUE,PRIM_MEDIA_CURRENT_URL,URLlink,
PRIM_MEDIA_HOME_URL,URLlink,PRIM_MEDIA_PERMS_INTERACT,
PRIM_MEDIA_PERM_ANYONE,PRIM_MEDIA_PERMS_CONTROL,
PRIM_MEDIA_PERM_ANYONE,PRIM_MEDIA_HEIGHT_PIXELS,
1024,PRIM_MEDIA_WIDTH_PIXELS,1024,PRIM_MEDIA_CONTROLS,1]);}}

How do I make this listen to local chat and then change the url when it hears a word? The thing I'm struggling with is that it cannot alter the home url in any way OR be one single iteration of doing this, I need to be able to add potentially multiple keywords for different urls. I'm really sorry if this is either too easy or extremely difficult; I am not a master scripter. Any help would be greatly appreciated , or even MP links to a script that can do this!