Difference between revisions of "User:Ugleh Ulrik"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{SL-hCard/2.0
{{skills
|name=Ugleh Ulrik
|Builder=
|image=Anonymous.jpg
|Scripter=*
|rezday=6th March 2009
|}}
|about=I have no face
{{ISO_639-3/cat-speaking|eng}}
|fields={{SL-hCard/field|Achievements|
* Avid Programmer
** LSL
** PHP
** MySql
** CSS
** Javascript/jQuery/ajax
}}
}}


== About ==
=== About ===
Before Ugleh Ulrik, I was Ugleh Ugajin, hanging with the wrong gang which got me banned. I am now back as a Expert programmer in lsl and more. I code for cheap or even free. I love making weapons, and creating new things to put in an attack hud. Most of my time I sell stuff that should be worth alot, for free. If you see me in SL the chances are im scripting, or teaching people how to script.
Started Second Life in 2009 and has been a scripter since. I rarely make an appearance nowadays. Second Life had its ups and downs but lately it has been a glorified chat room instead of an experience. I wish the best to anyone viewing this page for coding or otherwise.  


__TOC__
__TOC__


=== XStreetSL ===
 
[https://xstreetsl.com/modules.php?name=Marketplace&MerchantID=704873 Xstreet Link]
== UD Functions ==
Below are some User-Defined functions I have created and use in most of my items. Some other scripters have helped out with improvements on some if you go to the discussion section for the "More at" links.
=== Vector2List ===
=== Vector2List ===
<lsl>
<source lang="lsl2">
list Vector2List(vector v){
    list alist = llParseString2List((string)v,[",", ">", "<"],[]);
return alist;
}
</lsl>
'''or'''
<lsl>
list Vector2List(vector v){  
list Vector2List(vector v){  
     return [v.x, v.y, v.z]; // *Tips a wink to Strife*
     return [v.x, v.y, v.z]; // *Tips a wink to Strife*
}
}
</lsl>
</source>


More at [[User:Ugleh_Ulrik/Vector2List]]
More at [[User:Ugleh_Ulrik/Vector2List]]


=== FirstName ===
=== FirstName ===
<lsl>
<source lang="lsl2">
string FirstName(key k){
string FirstName(key k){
list fn = llParseString2List(llKey2Name(k),[" "],[]);
list fn = llParseString2List(llKey2Name(k),[" "],[]);
Line 44: Line 29:
return firstn;
return firstn;
}
}
</lsl>
</source>
More at [[User:Ugleh_Ulrik/FirstName]]
More at [[User:Ugleh_Ulrik/FirstName]]
=== LastName ===
=== LastName ===


<lsl>
<source lang="lsl2">
string LastName (key k){
string LastName (key k){
list ln = llParseString2List(llKey2Name(k),[" "],[]);
list ln = llParseString2List(llKey2Name(k),[" "],[]);
Line 54: Line 39:
return lastn;
return lastn;
}
}
</lsl>
</source>
More at [[User:Ugleh_Ulrik/LastName]]
More at [[User:Ugleh_Ulrik/LastName]]


=== trimstring ===
=== StringTruncate ===


<lsl>
<source lang="lsl2">
string trimstring(string text, integer length) {
string trimstring(string text, integer length) {
     if (length < llStringLength(text)){
     if (length < llStringLength(text)){
Line 69: Line 54:
}
}
}
}
</lsl>
</source>
More at [[User:Ugleh_Ulrik/trimstring]]
More at [[StringTruncate]]


=== GiveBulkMoney ===
=== GiveBulkMoney ===
<lsl>
<source lang="lsl2">
GiveBulkMoney(list u, integer amount){
GiveBulkMoney(list u, integer amount){
integer a = 0;
integer a = 0;
Line 82: Line 67:
}
}
}
}
</lsl>
</source>
More at [[User:Ugleh_Ulrik/GiveBulkMoney]]
More at [[User:Ugleh_Ulrik/GiveBulkMoney]]


=== Other Scripts ===
=== Other Functions ===
PHP Name2Key [[User:Ugleh_Ulrik/Name2Key]]
 
Random String [[User:Ugleh_Ulrik/RandomString]]
 
====ListKeyCase====
[[User:Ugleh_Ulrik/ListKeyCase]]
Changes the Key Case of the list, based off a PHP function called '''array_change_key_case'''.
 
====Random String ====
[[RandomString]]
Creates a random string, 2 examples 1 with strings and numbers, and 1 with just strings.
 
====Time Ago====
[[TimeAgo]]
a function to set "time ago", i.e '3 minutes ago'.
 
====DialogPlus====
[[DialogPlus]]
Dialog plus is a function that creates a dialog menu that will use more then 12 buttons.
 
====ListAverage====
[[ListAverage]]
ListAverage will take all the integers from a list and return the average of all the integers.
 
====GradientValue====
[[GradientValue]]
GradientValue will take 2 vectors, beginColor, and endColor, and a percentage, and grab the color between those two based off the percentage given.
 
====TrimList====
[[TrimList]]
TrimList will do the final process of trimming a whole list before its output in a dialog box.

Latest revision as of 19:09, 3 March 2020


About

Started Second Life in 2009 and has been a scripter since. I rarely make an appearance nowadays. Second Life had its ups and downs but lately it has been a glorified chat room instead of an experience. I wish the best to anyone viewing this page for coding or otherwise.


UD Functions

Below are some User-Defined functions I have created and use in most of my items. Some other scripters have helped out with improvements on some if you go to the discussion section for the "More at" links.

Vector2List

list Vector2List(vector v){ 
    return [v.x, v.y, v.z]; // *Tips a wink to Strife*
}

More at User:Ugleh_Ulrik/Vector2List

FirstName

string FirstName(key k){
list fn = llParseString2List(llKey2Name(k),[" "],[]);
string firstn = llList2String(fn,0);
return firstn;
}

More at User:Ugleh_Ulrik/FirstName

LastName

string LastName (key k){
list ln = llParseString2List(llKey2Name(k),[" "],[]);
string lastn = llList2String(ln,1);
return lastn;
}

More at User:Ugleh_Ulrik/LastName

StringTruncate

string trimstring(string text, integer length) {
    if (length < llStringLength(text)){
    length = length-1;
    string newstring = llGetSubString(text,0, length) + "...";
    return newstring;
}else{
    return text;
}
}

More at StringTruncate

GiveBulkMoney

GiveBulkMoney(list u, integer amount){
integer a = 0;
while(a < llGetListLength(u))
{
    llGiveMoney(llList2Key(u,a), amount);
    ++a;
}
}

More at User:Ugleh_Ulrik/GiveBulkMoney

Other Functions

ListKeyCase

User:Ugleh_Ulrik/ListKeyCase Changes the Key Case of the list, based off a PHP function called array_change_key_case.

Random String

RandomString Creates a random string, 2 examples 1 with strings and numbers, and 1 with just strings.

Time Ago

TimeAgo a function to set "time ago", i.e '3 minutes ago'.

DialogPlus

DialogPlus Dialog plus is a function that creates a dialog menu that will use more then 12 buttons.

ListAverage

ListAverage ListAverage will take all the integers from a list and return the average of all the integers.

GradientValue

GradientValue GradientValue will take 2 vectors, beginColor, and endColor, and a percentage, and grab the color between those two based off the percentage given.

TrimList

TrimList TrimList will do the final process of trimming a whole list before its output in a dialog box.