Talk:LlGetOwner
From Second Life Wiki
Perhaps we should explain how to choose by owner ... either in this article or linked nearby ...
For example, to choose between 0 and 99 inclusive, making the same choice for the same owner every time while yet likely making a different choice for any few owners, is:
integer byOwner(integer beyond)
{
string nybbles = llMD5String(llGetOwner(), 0);
string literal = "0x" + llGetSubString(nybbles, -8, -1);
integer choice = (integer) literal;
return (choice % beyond);
}
default
{
state_entry()
{
llOwnerSay((string) byOwner(100));
}
}
See also: 32bit_Hash

