LSL Wiki Mirror 10-5-2006: llPizza

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
llPizza(key agent,integer constant)

This function redirects key agent to a predetermined site, given by our constant.
This function was created for April Fools Day 2005 and is kept in for the sake of practical demonstration of global variables, and llLoadURL functions.
My understanding was this wasn't associated with April Fools, and it's a misrepresentation to say it was. It was intended to be in the vein of EQ2 /pizza. The debate over this function was about if it was right for users to post fake functions masquerading as really functions via the "ll" prefix. --BW

Order constants (for llPizza):
Constant Description
ORDER_PIZZA_HUT Takes user to Pizza Hut's order page
ORDER_PAPA_JOHNS Takes user to Papa John's order page
ORDER_DOMINOS Takes user to Domino's web page

Example code:

integer ORDER_PIZZA_HUT = 0;
integer ORDER_PAPA_JOHNS = 1;
integer ORDER_DOMINOS = 2;
llPizza(key agent, integer constant)
{
    if(constant == ORDER_PIZZA_HUT) 
        llLoadURL(agent,"Click Here to Order Pizza from Pizza Hut!","http://www.pizzahut.com/order/");
    else if(constant == ORDER_PAPA_JOHNS)
        llLoadURL(agent,"Click Here to Order Pizza from Papa Johns!","http://www.papajohnsonline.com/index.html");
    else if(constant == ORDER_DOMINOS)
        llLoadURL(agent,"Click Here to Order Pizza from Dominos!","http://www.dominos.com/");
}   

default
{
    state_entry()
    {
        llPizza(llGetOwner(),ORDER_DOMINOS);
    }
}


Humor
There are 16 comments on this page. [Display comments/form]