Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //URL Variables
- key TouchingAvatar = llDetectedKey(0);
- string PopUpInfo = "Join the official The School Of All Trades Discord server!";
- string URL = "https://discord.gg/n6cghUYzuH";
- //Is the Avatar In The Same Region? True/False
- integer AvatarInSameRegion = (llGetAgentSize(id) != ZERO_VECTOR);
- //Hover-Text Variables
- string HoverText = "Click For Discord Server";
- vector Color = <1.0, 1.0, 1.0>;
- float TextAlpha = 1.0;
- default
- {
- state_entry()
- {
- llSetText(HoverText, Color, TextAlpha);
- }
- touch_start(integer total_number)
- {
- if (AvatarInSameRegion)
- {
- llLoadURL(TouchingAvatar, PopUpInfo, URL);
- }
- else
- {
- // If the agent is not in the same region, send a message instead
- // The viewer will turn the URL clickable
- llInstantMessage(TouchingAvatar, PopUpInfo + " " + URL);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement