User Tools

Site Tools


lslsnips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lslsnips [2025/11/10 01:36] mikolslsnips [2025/11/25 16:37] (current) – external edit 127.0.0.1
Line 49: Line 49:
  
 </code> </code>
 +===== SL to Telegram =====
 <code> <code>
 string TELEGRAM_API_URL = "https://api.telegram.org/bot<YOUR-BOT-TOKEN>/sendMessage"; string TELEGRAM_API_URL = "https://api.telegram.org/bot<YOUR-BOT-TOKEN>/sendMessage";
Line 80: Line 80:
 } }
 </code> </code>
 +===== SL2Discord ===== 
 <code> <code>
 string discord_web_hook = "wehhookURL"; // this is where your web hook url from discord goes string discord_web_hook = "wehhookURL"; // this is where your web hook url from discord goes
Line 105: Line 106:
 } }
 </code> </code>
-=====SNIPPETS=====+===== Rezz at feet ====
 <code> <code>
 integer canRezAt(vector pos) //can I rez at this place? integer canRezAt(vector pos) //can I rez at this place?
Line 146: Line 147:
     }     }
 } }
 +</code> 
 +===== Random giver ===== 
 +<code>
 //gimme random //gimme random
 integer random_integer(integer min, integer max) integer random_integer(integer min, integer max)
Line 152: Line 155:
     return min + (integer)(llFrand(max - min + 1));     return min + (integer)(llFrand(max - min + 1));
 } }
 +
 +</code>
 +===== Find in List =====
 +<code>
  
 // find stuff in my list or not // find stuff in my list or not
Line 162: Line 169:
 } }
  
- +</code> 
-//create a channel by unixtime +===== Find an avatar key on region ===== 
- +<code>
-integer menuChan llGetUnixTime() / 18; +
- +
- +
-// find an avatar key on region+
  
 string getKey(string req) string getKey(string req)
Line 203: Line 206:
 } }
  
 +</code> 
 +===== Check if object is original ===== 
 +<code>
  
 integer checkOriginal(key id) { integer checkOriginal(key id) {
Line 222: Line 227:
 } }
  
 +</code>
 +===== Shield effect =====
 +<code>
  
 ShieldFade(integer link_num, float alpha_start, float alpha_end, float glow_start, float glow_end, float speed) ShieldFade(integer link_num, float alpha_start, float alpha_end, float glow_start, float glow_end, float speed)
Line 268: Line 276:
 } }
  
-/WarpPos function+</code> 
 +===== WarpPos ===== 
 +<code>
 warpPos(vector destpos) { warpPos(vector destpos) {
     integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;     integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;
Line 282: Line 292:
     }     }
 } }
 +</code> 
 +===== Binary converter ===== 
 +<code>
  
  
Line 394: Line 406:
         showDialog(user, currentPage);         showDialog(user, currentPage);
     }     }
 +}
 +</code>
 +===== Turn Avatar to Target / RLV =====
 +<code>
 +vector pointTo = targetpos - llGetPos();
 +float angleTo = llAtan2(pointTo.x, pointTo.y);
 +llOwnerSay("@setrot:" + (string)angleTo + "=force");
 +</code>
 +===== Key2Number =====
 +<code>
 +integer Key2Number(key objKey) {
 +  return -(integer)("0x8" + llGetSubString(llGetKey(), 0, 6));
 } }
 </code> </code>
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
lslsnips.1762738569.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki