lslsnips
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| lslsnips [2025/11/10 01:55] – [Find an avatar key on region] miko | lslsnips [2026/02/24 15:22] (current) – miko | ||
|---|---|---|---|
| Line 49: | Line 49: | ||
| </ | </ | ||
| - | + | ===== SL to Telegram ===== | |
| - | < | + | < |
| string TELEGRAM_API_URL = " | string TELEGRAM_API_URL = " | ||
| string chat_id = "< | string chat_id = "< | ||
| Line 80: | Line 80: | ||
| } | } | ||
| </ | </ | ||
| - | ===== SL2Telegram | + | ===== SL2Discord |
| - | < | + | < |
| string discord_web_hook = " | string discord_web_hook = " | ||
| Line 107: | Line 107: | ||
| </ | </ | ||
| ===== Rezz at feet ==== | ===== Rezz at feet ==== | ||
| - | < | + | < |
| integer canRezAt(vector pos) //can I rez at this place? | integer canRezAt(vector pos) //can I rez at this place? | ||
| { | { | ||
| Line 149: | Line 149: | ||
| </ | </ | ||
| ===== Random giver ===== | ===== Random giver ===== | ||
| - | < | + | < |
| //gimme random | //gimme random | ||
| integer random_integer(integer min, integer max) | integer random_integer(integer min, integer max) | ||
| Line 158: | Line 158: | ||
| </ | </ | ||
| ===== Find in List ===== | ===== Find in List ===== | ||
| - | < | + | < |
| // find stuff in my list or not | // find stuff in my list or not | ||
| Line 294: | Line 294: | ||
| </ | </ | ||
| ===== Binary converter ===== | ===== Binary converter ===== | ||
| - | < | + | < |
| Line 420: | Line 420: | ||
| } | } | ||
| </ | </ | ||
| + | ===== Float Link Number ===== | ||
| + | < | ||
| + | /* | ||
| + | *DS* FloatLinkNumber by Daemonika Nightfire (daemonika.nightfire) | ||
| + | |||
| + | Features: | ||
| + | Nuetzlicher Helfer fuer Ersteller & Scripter | ||
| + | Mit diesem Tool kannst du saemtliche Linknummern direkt als Hovertext ueber den Prims sehen | ||
| + | Lege das Script einfach in den Root-Prim und klicke ihn zum ein/ | ||
| + | |||
| + | Info: | ||
| + | ein einzelner Prim zeigt LinkNumber 0 fuer den root | ||
| + | in einem LINK_SET zeigt der root die LinkNumber 1 | ||
| + | */ | ||
| + | |||
| + | integer text = 0; | ||
| + | |||
| + | // setze TRUE oder FALSE fuer mit oder ohne LinkName | ||
| + | integer name = TRUE; | ||
| + | |||
| + | Links() | ||
| + | { | ||
| + | integer i; | ||
| + | for(i = 0; i <= llGetNumberOfPrims(); | ||
| + | { | ||
| + | if(text) | ||
| + | { | ||
| + | string num; | ||
| + | if(i < 2) | ||
| + | { | ||
| + | num = (string)i + " (root)"; | ||
| + | if(name) | ||
| + | { | ||
| + | num = (string)i + " (root)\n" | ||
| + | } | ||
| + | } | ||
| + | else if(i >= 2) | ||
| + | { | ||
| + | num = (string)i; | ||
| + | if(name) | ||
| + | { | ||
| + | num = (string)i + " | ||
| + | } | ||
| + | } | ||
| + | llSetLinkPrimitiveParamsFast(i, | ||
| + | } | ||
| + | else if(!text) | ||
| + | { | ||
| + | llSetLinkPrimitiveParamsFast(i, | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | default | ||
| + | { | ||
| + | state_entry() | ||
| + | { | ||
| + | Links(); | ||
| + | } | ||
| + | |||
| + | touch_start(integer num_detected) | ||
| + | { | ||
| + | // Zum ein/aus schalten, musst du den Root Prim klicken | ||
| + | if(llDetectedKey(0) == llGetOwner() && llDetectedLinkNumber(0) < 2) | ||
| + | { | ||
| + | if(!text) | ||
| + | { | ||
| + | text = 1; | ||
| + | } | ||
| + | else if(text) | ||
| + | { | ||
| + | text = 0; | ||
| + | } | ||
| + | Links(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | on_rez(integer Dae) | ||
| + | { | ||
| + | llResetScript(); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ===== GetPrimInfo ===== | ||
| + | < | ||
| + | default | ||
| + | { | ||
| + | touch_start(integer num_detected) | ||
| + | { | ||
| + | integer i; | ||
| + | for(i=0; i< | ||
| + | { | ||
| + | llOwnerSay("/ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | "\nPos (root): " | ||
| + | "\nRot (root): " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ===== RealEncryption ===== | ||
| + | < | ||
| + | string xorSalted(string msg, string salt) | ||
| + | { | ||
| + | // Derive a numeric key from the salt | ||
| + | integer key = 0; | ||
| + | integer i; | ||
| + | integer slen = llStringLength(salt); | ||
| - | ~~DISCUSSION~~ | + | for (i = 0; i < slen; ++i) |
| + | { | ||
| + | key = key ^ llOrd(salt, i); // XOR all salt chars together | ||
| + | key = (key * 31) & 0xFF; // scramble it a bit | ||
| + | } | ||
| + | |||
| + | // Now XOR the message with the salted key | ||
| + | string out = ""; | ||
| + | integer mlen = llStringLength(msg); | ||
| + | |||
| + | for (i = 0; i < mlen; ++i) | ||
| + | { | ||
| + | integer c = llOrd(msg, i); | ||
| + | c = c ^ key; // XOR with salted key | ||
| + | out += llChar(c); | ||
| + | } | ||
| + | |||
| + | return out; | ||
| + | } | ||
| + | </ | ||
| + | 🧪 How to use it | ||
| + | < | ||
| + | string encrypted = xorSalted(" | ||
| + | |||
| + | string decrypted = xorSalted(encrypted, | ||
| + | </ | ||
| + | 🧠 Why this works | ||
| + | The salt is turned into a derived key | ||
| + | * Even a small change in the salt produces a completely different output | ||
| + | * The cipher is reversible only if you know the salt | ||
| + | * It’s compact and fast enough for LSL | ||
| + | * This is the closest you can get to “real” salted encryption inside Second Life scripting. | ||
lslsnips.1762739750.txt.gz · Last modified: (external edit)
