Jump to content

Fleischgeiger

Resident
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Fleischgeiger

  1. Hi guys =)

     

    first of all, sorry for my bad english =)

    second of all...im a totally noob in scripting...

     

    I need a script that do something like this.

     

    First costumer pays a box 1L$ and get a item that is in the box. The second costumer need to pay 2L$ to get that object in the box...the third needs to pay 3L$ and the fourth 4L$ and so on. Basically the cost of the item increases by 1 $L everytime.

     

    It would be great if the current cost would be in a hovertext over the box. And it would be awesome if you could set the price increase through a menu and a starting price. So you could say ||Starting Price 100 L$ and the price Incrase by 10L$ each time anyone pay the Box||. And a option to "reset" that whole thing would be aweome =)

     

    Anyone who could help me out?

     

    Thank you :3

     

  2. Hi guys ;)

     

    First of all...my english is pretty bad...sorry for it =)

    Second of all...im a totally noob in scripting :(

     

    I really need a script for texturechanging.

    My idea is to click "prim 1" ( that i will attach to "hud" ) to change "prim 2" that i will attach to my Body. Mesheyes to be exactly.

     

    That is the "Texturechange Menu" script i have. Works perfectly as far as i know. But now i want it to be a "remote" so it changes the texture on another Prim ( the mesh eyes ).

    //______Change Texture Menu___Alicia Stella______
    //__________last modifed__May 2009___________
    //_____more scripts: www.aliciastella.com_____
    
    //Drop this script into an object with up to 22 textures inside.
    
    //When anyone Touches they will get a menu with all the textures available. Button names in menu will be first 10 characters from that item's name. 
    
    //NOTE: Texture Names may not exceed 24 characters or script error and menu fails.
    
    
    integer side = ALL_SIDES; //ALL_SIDES or any face number 0 through 5
    
    list texture_list;
    list texture_list2;
    key user = NULL_KEY;
    
    composelist()
    {
        integer currenttexture = 0;
        integer totaltextures = llGetInventoryNumber(INVENTORY_TEXTURE);
        
        if(totaltextures > 0 & totaltextures <= 12)
        {
            texture_list = [];
            do
            {
                texture_list = texture_list + llGetInventoryName(INVENTORY_TEXTURE, currenttexture);
                currenttexture++;
            }
            while (currenttexture > 0 & currenttexture < totaltextures);
        }
        
        if(totaltextures > 12 & totaltextures <= 22)
        {
            texture_list = ["Next Page"];
            do
            {
                texture_list = texture_list + llGetInventoryName(INVENTORY_TEXTURE, currenttexture);
                currenttexture++;
            }
            while (currenttexture > 0 & currenttexture < 11);
            
            texture_list2 = ["Last Page"];
            do
            {
                texture_list2 = texture_list2 + llGetInventoryName(INVENTORY_TEXTURE, currenttexture);
                currenttexture++;
            }
            while (currenttexture >= 11 & currenttexture < totaltextures);
        }
        
        if(totaltextures > 22)
        {
            llWhisper(0, "You may only have a maximimum of 22 Textures. Please remove any extra ones.");
        }
        if(totaltextures == 0)
        {
            llWhisper(0, "Please add up to 22 Textures inside this object.");
        }
    }
    
    
    //The Menu
    integer menu_handler;
    integer menu_channel;
    menu(key user,string title,list texture_list)
    {
        menu_channel = (integer)(llFrand(99999.0) * -1); //random channel
        menu_handler = llListen(menu_channel,"","","");
        llDialog(user,title,texture_list,menu_channel);
        llSetTimerEvent(30.0); //menu channel open for 30 seconds
    }
    
    default
    {
        state_entry()
        {
            composelist(); //make list from inventory textures
        }
    
        touch_start(integer total_number)
        {
            user = llDetectedKey(0);
            menu(user,"\n\nPlease select one below.",texture_list);
        }
        
        listen(integer channel,string name,key id,string message)
        {
            if (channel == menu_channel)
            {
                llSetTimerEvent(0.0);
                llListenRemove(menu_handler);
                if(message == "Next Page")
                {
                    menu(user,"\n\nPlease select one below.",texture_list2);
                }
                else if(message == "Last Page")
                {
                    menu(user,"\n\nPlease select one below.",texture_list);
                }
                else
                {
                    llSetTexture(message, side);
                }
            }
        }
        
        timer() //Close the Menu Listen or we'll get laggy
        {
            llSetTimerEvent(0.0); 
            llListenRemove(menu_handler);
        }
        
        changed(integer change) 
        {
            if (change & CHANGED_INVENTORY) //inventory has changed
            {
                llSleep(0.5);
                composelist(); //rebuild the list
            }
        }
    }

    i really hope you guys can understand my problem and maybe help me out a little bit =)

     

    Thank you very much ^^

×
×
  • Create New...