Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string Type;
- string Color;
- string Error;
- integer listenHandle;
- integer step;
- remove_listen_handle()
- {
- llListenRemove(listenHandle);
- }
- default
- {
- state_entry()
- {
- listenHandle = llListen(14995, "", llGetOwner(), "");
- step = 1;
- }
- touch_start(integer total_number)
- {
- step = 2;
- llOwnerSay("@getinv:Wardrobe/Layer2/Bottom/=14995");
- }
- listen(integer channel, string name, key id, string message)
- {
- if(step = 2)
- {
- list RawTypes = llCSV2List(message);
- list RandomTypes = llListRandomize(RawTypes, 1);
- string Type = llList2String(RandomTypes, 0);
- string Type2 = llList2String(RandomTypes, 1);
- Error = "";
- if(Type == Error)
- {
- Type = Type2;
- }
- step = 3;
- llOwnerSay("@getinv:Wardrobe/Layer2/Bottom/"+Type+"=14995");
- }
- else if(step = 3)
- {
- list RawColors = llCSV2List(message);
- list RandomColors = llListRandomize(RawColors, 1);
- string Color = llList2String(RandomColors, 0);
- string Color2 = llList2String(RandomColors, 1);
- Error = "";
- if(Color == Error)
- {
- Color = Color2;
- }
- step = 4;
- llSay(0, "I chose type: "+Type+" and color: "+Color+".");
- }
- else if (step += 4);
- {
- llSay(14995, "Script finished. Removing handle now.");
- remove_listen_handle();
- llResetScript();
- }
- }
- on_rez(integer start_param)
- {
- llResetScript();
- }
- changed(integer change)
- {
- if (change & CHANGED_OWNER)
- {
- llResetScript();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement