Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // see https://www.youtube.com/watch?v=WSYoEe6ctWM for usage
- // DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- // Version 2, December 2004
- //
- // Copyright (C) 2017 Salahzar Stenvaag <[email protected]>
- //
- // Everyone is permitted to copy and distribute verbatim or modified
- // copies of this license document, and changing it is allowed as long
- // as the name is changed.
- //
- // DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- // TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- //
- // 0. You just DO WHAT THE FUCK YOU WANT TO.
- integer index;
- show()
- {
- string t=llGetInventoryName(INVENTORY_TEXTURE,index);
- llSetTexture(t, ALL_SIDES);
- llSetText(t+"\n"+(string)(index+1)+" / "+(string)llGetInventoryNumber(INVENTORY_TEXTURE),<1,1,1>,1);
- }
- default
- {
- state_entry()
- {
- index=0;
- show();
- }
- on_rez(integer Param) {
- llResetScript();
- }
- touch_start(integer total_number) {
- if(llDetectedKey(0)!=llGetOwner()) return;
- vector s=llDetectedTouchST(0);
- if(s.x>0.5) index+=1; else index-=1;
- integer number=llGetInventoryNumber(INVENTORY_TEXTURE);
- if(index<0) index=number-1;
- if(index>=number) index=0;
- show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement