corrade-lsl-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 15  →  ?path2? @ 14
File deleted
/source/eggdrop/softban.lsl
File deleted
/source/eggdrop/Jokes_3.txt
File deleted
/source/eggdrop/Jokes_2.txt
File deleted
/source/eggdrop/Jokes_7.txt
File deleted
/source/eggdrop/Jokes_6.txt
File deleted
/source/eggdrop/version.lsl
File deleted
/source/eggdrop/softunban.lsl
File deleted
/source/eggdrop/stitch.lsl
File deleted
/source/eggdrop/Help.txt
File deleted
/source/eggdrop/Jokes_1.txt
File deleted
/source/eggdrop/Jokes_5.txt
File deleted
/source/eggdrop/Jokes_4.txt
File deleted
/source/eggdrop/Jokes_9.txt
File deleted
/source/eggdrop/Jokes_8.txt
File deleted
\ No newline at end of file
/source/eggdrop/Jokes_10.txt
File deleted
/source/eggdrop/Jokes_11.txt
File deleted
/source/eggdrop/Jokes_12.txt
File deleted
/source/eggdrop/Jokes_13.txt
File deleted
/source/eggdrop/Jokes_14.txt
File deleted
/source/eggdrop/Jokes_15.txt
File deleted
/source/eggdrop/Jokes_16.txt
File deleted
/source/eggdrop/Jokes_17.txt
File deleted
/source/eggdrop/Jokes_18.txt
File deleted
/source/eggdrop/Jokes_19.txt
File deleted
/source/eggdrop/Jokes_27.txt
File deleted
/source/eggdrop/Jokes_26.txt
File deleted
/source/eggdrop/Jokes_25.txt
File deleted
/source/eggdrop/Jokes_24.txt
File deleted
/source/eggdrop/Jokes_23.txt
File deleted
/source/eggdrop/Jokes_22.txt
File deleted
/source/eggdrop/Jokes_20.txt
File deleted
/source/eggdrop/Jokes_21.txt
File deleted
/source/eggdrop/ai.lsl
/source/eggdrop/ban.lsl
@@ -182,7 +182,6 @@
// banee
string firstname = "";
string lastname = "";
string soft = "True";
 
default {
state_entry() {
@@ -242,14 +241,11 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "ban")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "ban")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
firstname = wasKeyValueGet("firstname", message);
lastname = wasKeyValueGet("lastname", message);
@@ -257,7 +253,10 @@
data = "And who would yarr be?";
state tell;
}
// Remove command.
command = llDeleteSubList(command, 0, 0);
// Dump the rest of the message.
data = llDumpList2String(command, " ");
@@ -371,9 +370,7 @@
list banee = llParseString2List(data, [" "], []);
firstname = llList2String(banee, 0);
banee = llDeleteSubList(banee, 0, 0);
lastname = llList2String(banee, 0);
banee = llDeleteSubList(banee, 0, 0);
lastname = llList2String(banee, 1);
if(firstname == "" || lastname == "") {
data = "Full name required.";
@@ -380,12 +377,6 @@
state tell;
}
if(llGetListLength(banee) != 0 &&
llToLower(llList2String(banee, 0)) == "nosoft") {
soft = "False";
banee = llDeleteSubList(banee, 0, 0);
}
// GC
banee = [];
state get_banee_roles;
@@ -445,11 +436,6 @@
llHTTPResponse(id, 200, "OK");
if(wasKeyValueGet("command", body) != "getmemberroles" ||
wasKeyValueGet("success", body) != "True") {
if(wasKeyValueGet("status", body) == "19862") {
// DEBUG
llOwnerSay("[Ban] User not in group, but proceeding anyway...");
jump continue;
}
// DEBUG
llOwnerSay("[Ban] Unable to get member roles: " +
wasURLUnescape(
@@ -460,13 +446,12 @@
state listen_group;
}
@continue;
string result = wasURLUnescape(
wasKeyValueGet("data", body)
);
if(result != "" && llListFindList(wasCSVToList(result), (list)"Owners") != -1) {
data = "Ejectee is an owner. I'm not gunna open the pod bay doors.";
data = "Ejectee is an owner. I'm not gonna open the pod bay doors.";
llReleaseURL(URL);
state tell;
}
@@ -516,7 +501,6 @@
configuration
)
),
"soft", soft,
"action", "ban",
"avatars", wasURLEscape(
wasListToCSV(
@@ -598,10 +582,6 @@
]
)
);
// reset variables.
soft = "True";
state listen_group;
}
}
/source/eggdrop/configuration.txt
@@ -13,7 +13,7 @@
 
# Set this to the UUID of the Corrade bot.
# Ecto Resident
corrade = "861eb918-0be7-4aa1-a6ed-d495f99c2af3"
corrade = "2ac12631-b9e8-4ec2-822e-946591a41469"
 
# The name of the group - it can also be the UUID of the group.
group = "My Group"
@@ -21,14 +21,11 @@
# The password for the group.
password = "mypassword"
 
# A short nickname for the bot - something you would call it for short.
nickname = "corrade"
 
# The notification tag - any string you can come up with except the empty string.
notification tag = "bf712608-4132-45c2-b770-bcdfa32146ba"
notification tag = "5dfea3c3-1d70-4477-89a8-835072fbb6fa"
 
# The version that this template is compatible with (no need to change).
version = 9.173
version = 9.164
 
# The character to use for commands.
command = @
@@ -39,23 +36,16 @@
# The roles that are eligible for administrative group functions such as "eject".
admin roles = Owners,Officers,Ecto
 
# Restrict wiki operations to admin roles.
restricted wiki = True
 
# Wiki database table.
wiki table = "corrade-eggdrop-wiki"
 
# The number of records to be retrieved from a namespace.
# This limit works around LSL HTTP limitations not being able to receive more than 2KiB.
wiki results limit = 15
 
# How many paths in total should be returned when looking up data.
wiki search limit = 5
 
# MOTD database table.
motd table = "corrade-eggdrop-motd"
 
# The name of the help notecard in this primitive's inventory.
help card = "Help"
help card = "[WaS] Corrade: Eggdrop - Help Card"
 
# All joke notecards have the following string in their name (case sensitive).
jokes = "Jokes"
 
########################### END CONFIGURATION #############################
/source/eggdrop/control.lsl
@@ -122,7 +122,7 @@
string URL = "";
 
// The notifications to bind to.
list notifications = [ "group", "membership", "login" ];
list notifications = [ "group", "membership" ];
 
default {
state_entry() {
/source/eggdrop/dice.lsl
@@ -226,19 +226,16 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "roll")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "roll")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
list range = wasCSVToList(
wasKeyValueGet("roll range", configuration)
);
integer roll = llList2Integer(command, 0);
integer roll = llList2Integer(command, 1);
if(roll < llList2Integer(range, 0) || roll > llList2Integer(range, 1)) {
data = "Value should be within bounds [" +
llList2String(range, 0) +
/source/eggdrop/eval.lsl
@@ -394,11 +394,11 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "eval")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "eval")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
/source/eggdrop/fortune.lsl
@@ -265,14 +265,15 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "fortune")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "fortune")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
list range = wasCSVToList(
wasKeyValueGet("roll range", configuration)
);
data = llList2String(
nList,
(integer)
/source/eggdrop/help.lsl
@@ -234,24 +234,19 @@
)
);
// Check if this is an eggdrop command.
if(llGetSubString(data, 0, 0) !=
wasKeyValueGet("command", configuration))
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "help")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], []);
if(llList2String(command, 0) != "help")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
if(llGetInventoryType(wasKeyValueGet("help card", configuration))
!= INVENTORY_NOTECARD) {
data = "Hmm. I have not notecard to hand out - contact my owner please?";
state tell;
return;
}
// Hand out the notecard.
/source/eggdrop/invite.lsl
@@ -228,11 +228,11 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "invite")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "invite")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
/source/eggdrop/joke.lsl
@@ -170,20 +170,9 @@
 
// Notecard reading.
key nQuery = NULL_KEY;
string joke = "";
list q = [ ];
integer nLine = 0;
list nList = [];
 
///////////////////////////////////////////////////////////////////////////
// Copyright (C) 2011 Wizardry and Steamworks - License: GNU GPLv3 //
///////////////////////////////////////////////////////////////////////////
// Requires: a limit.
// Provides: true random number between [0, max) or (-max, 0].
//////////////////////////////////////////////////////////
integer wasFPSrand(integer max) {
integer r = (integer)(llGetRegionFPS() * 10000000.0) % max;
if(max > 0) return r; else return -r;
}
 
default {
state_entry() {
llOwnerSay("[Joke] Starting module...");
@@ -193,7 +182,7 @@
if(id != "configuration") return;
llOwnerSay("[Joke] Got configuration...");
configuration = message;
state count_jokes;
state read_jokes;
}
timer() {
llOwnerSay("[Joke] Requesting configuration...");
@@ -214,33 +203,27 @@
}
}
 
state count_jokes {
state read_jokes {
state_entry() {
// Build a list of dataserver queries and retrieve the number of lines.
joke = (string)llGetInventoryNumber(INVENTORY_NOTECARD);
integer i = (integer)joke - 1;
do {
string card = llGetInventoryName(INVENTORY_NOTECARD, i);
// Filter notecards containing the "jokes" configuration key value.
if(llSubStringIndex(card, wasKeyValueGet("jokes", configuration)) == -1) {
joke = (string)((integer)joke - 1);
jump continue;
}
q = llListInsertList(q, [ llGetNumberOfNotecardLines(card) ], 0);
@continue;
} while(--i >= -1);
q += NULL_KEY;
// DEBUG
llOwnerSay("[Joke] Reading jokes...");
if(llGetInventoryType("Joke") != INVENTORY_NOTECARD) {
llOwnerSay("[Joke] Failed to find a notecard named Joke in the primitive's inventory.");
return;
}
nQuery = llGetNotecardLine("Joke", nLine);
}
dataserver(key id, string data) {
// Find the query in the query list.
integer i = llListFindList(q, [ id ]);
if(i == -1) return;
// Replace the query by the number of notecard lines (lists are covariant).
q = llListReplaceList(q, [ (integer) data ], i, i);
joke = (string)((integer)joke - 1);
if((integer)joke == 0)
if(id != nQuery) return;
if(data == EOF) {
// DEBUG
llOwnerSay("[Joke] Read jokes...");
state listen_group;
}
if(data == "") jump continue;
nList += data;
@continue;
nQuery = llGetNotecardLine("Joke", ++nLine);
}
on_rez(integer num) {
llResetScript();
@@ -282,63 +265,23 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "joke")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "joke")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
state read_joke;
}
on_rez(integer num) {
llResetScript();
}
changed(integer change) {
if((change & CHANGED_INVENTORY) ||
(change & CHANGED_REGION_START) ||
(change & CHANGED_OWNER)) {
llResetScript();
}
}
}
 
state read_joke {
state_entry() {
// DEBUG
llOwnerSay("[Joke] Reading a joke...");
list range = wasCSVToList(
wasKeyValueGet("roll range", configuration)
);
integer i = llGetInventoryNumber(INVENTORY_NOTECARD) - 1;
list c = [];
do {
string card = llGetInventoryName(INVENTORY_NOTECARD, i);
if(llSubStringIndex(card, wasKeyValueGet("jokes", configuration)) == -1)
jump continue;
c = llListInsertList(c, [ i ], 0);
@continue;
} while(--i >= -1);
i = (integer)llFrand(llGetListLength(c));
nQuery = llGetNotecardLine(
llGetInventoryName(
INVENTORY_NOTECARD,
llList2Integer(c, i)
),
data = llList2String(
nList,
(integer)
(
llFrand(
llList2Integer(
q,
i
)
)
llFrand(
llGetListLength(nList)
)
);
}
dataserver(key id, string data) {
if(id != nQuery) return;
joke = data;
state tell;
}
on_rez(integer num) {
@@ -378,14 +321,10 @@
)
),
"entity", "group",
"message", wasURLEscape(joke)
"message", wasURLEscape(data)
]
)
);
// GC
joke = "";
state listen_group;
}
}
/source/eggdrop/motd.lsl
@@ -365,9 +365,9 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "motd")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "motd")
return;
// Remove command.
/source/eggdrop/spank.lsl
@@ -226,11 +226,11 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "spank")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "spank")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
/source/eggdrop/unban.lsl
@@ -182,7 +182,6 @@
// banee
string firstname = "";
string lastname = "";
string soft = "True";
 
default {
state_entry() {
@@ -242,14 +241,11 @@
return;
// Check if the command matches the current module.
list command = llParseString2List(data, [" "], []);
if(llList2String(command, 0) !=
wasKeyValueGet("command", configuration) + "unban")
list command = llParseString2List(data,
[wasKeyValueGet("command", configuration), " "], ["@"]);
if(llList2String(command, 0) != "unban")
return;
// Remove command.
command = llDeleteSubList(command, 0, 0);
firstname = wasKeyValueGet("firstname", message);
lastname = wasKeyValueGet("lastname", message);
@@ -258,6 +254,9 @@
state tell;
}
// Remove command.
command = llDeleteSubList(command, 0, 0);
// Dump the rest of the message.
data = llDumpList2String(command, " ");
@@ -371,9 +370,7 @@
list banee = llParseString2List(data, [" "], []);
firstname = llList2String(banee, 0);
banee = llDeleteSubList(banee, 0, 0);
lastname = llList2String(banee, 0);
banee = llDeleteSubList(banee, 0, 0);
lastname = llList2String(banee, 1);
if(firstname == "" || lastname == "") {
data = "Full name required.";
@@ -380,12 +377,6 @@
state tell;
}
if(llGetListLength(banee) != 0 &&
llToLower(llList2String(banee, 0)) == "nosoft") {
soft = "False";
banee = llDeleteSubList(banee, 0, 0);
}
// GC
banee = [];
state get_banee_roles;
@@ -445,11 +436,6 @@
llHTTPResponse(id, 200, "OK");
if(wasKeyValueGet("command", body) != "getmemberroles" ||
wasKeyValueGet("success", body) != "True") {
if(wasKeyValueGet("status", body) == "19862") {
// DEBUG
llOwnerSay("[Unban] User not in group, but proceeding anyway...");
jump continue;
}
// DEBUG
llOwnerSay("[Unban] Unable to get member roles: " +
wasURLUnescape(
@@ -470,9 +456,7 @@
state tell;
}
@continue;
 
state unban;
state ban;
}
timer() {
llReleaseURL(URL);
@@ -493,7 +477,7 @@
}
}
 
state unban {
state ban {
state_entry() {
// DEBUG
llOwnerSay("[Unban] Unbanning...");
@@ -504,7 +488,7 @@
),
wasKeyValueEncode(
[
"command", "ban",
"command", "unban",
"group", wasURLEscape(
wasKeyValueGet(
"group",
@@ -517,7 +501,6 @@
configuration
)
),
"soft", soft,
"action", "unban",
"avatars", wasURLEscape(
wasListToCSV(
@@ -546,7 +529,7 @@
state listen_group;
}
data = "They'll be bak!";
data = "Hasta la vista, baby!";
state tell;
}
@@ -598,10 +581,6 @@
]
)
);
// reset variables.
soft = "True";
state listen_group;
}
}
/source/eggdrop/Joke.txt
@@ -0,0 +1,67 @@
Can a kangaroo jump higher than a house? Of course, a house doesn’t jump at all.
Doctor: "I'm sorry but you suffer from a terminal illness and have only 10 to live." Patient: "What do you mean, 10? 10 what? Months? Weeks?!" Doctor: "Nine."
A man asks a farmer near a field, “Sorry sir, would you mind if I crossed your field instead of going around it? You see, I have to catch the 4:23 train.” The farmer says, “Sure, go right ahead. And if my bull sees you, you’ll even catch the 4:11 one.”
Anton, do you think I’m a bad mother? My name is Paul.
My dog used to chase people on a bike a lot. It got so bad, finally I had to take his bike away.
What is the difference between a snowman and a snowwoman? Snowballs.
"Mom, where do tampons go?" / "Where the babies come from, darling." / "In the stork?"
Police officer: "Can you identify yourself, sir?" / Driver pulls out his mirror and says: "Yes, it's me."
Some nice Chinese couple gave me a very good camera down by the Washington Monument. I didn’t really understand what they were saying, but it was very nice of them.
Dentist: "You need a crown." / Patient: "Finally someone who understands me"
Two flies are sitting on a pile of dog poop. One suggests to the other: “Do you want to hear a really good joke?” The other fly replies: “But nothing disgusting like last time, I’m trying to eat here!”
Coco Chanel once said that you should put perfume on places where you want to be kissed by a man. But hell does that burn!
Me and my wife decided that we don't want to have children anymore. So anybody who wants one can leave us their phone number and address and we will bring you one.
It is so cold outside I saw a politician with his hands in his own pockets.
In a boomerang shop: "I'd like to buy a new boomerang please. Also, can you tell me how to throw the old one away?"
Patient: Oh doctor, I’m just so nervous. This is my first operation. Doctor: Don't worry. Mine too.
Why is women’s soccer so rare? It’s quite hard to find enough women willing to wear the same outfit.
Guest at a restaurant: “I refuse to eat this roastbeef. Please call the manager!“ Waiter: “That’s no use. He won’t eat it either.”
“You are so kind, funny and beautiful.” / “Oh come on. You just want to get me to bed.” / “And smart, too!”
Why haven’t you ever seen any elephants hiding up trees? Because they’re really, really good at it.
Two elephants meet a totally naked guy. After a while one elephant says to the other: “I really don’t get how he can feed himself with that thing!”
"Grandpa, why don't you have any life insurance?" / "So you can all be really sad when I die."
A wife is like a hand grenade. Take off the ring and say good bye to your house.
I’m certain there are female hormones in beer. When I drink too much, I talk nonsense and I cannot control my car.
Man: Hi, do you want to dance? / Woman: Yeah, sure! / Man: Great, go and dance, I want to talk to your pretty friend!
Waiter, I am outraged. There is one hair in my soup. And what do you expect for this price? A whole wig?!
I got another letter from this lawyer today. It said “Final Notice”. Good that he will not bother me anymore.
Yes, money cannot buy you happiness, but I’d still feel a lot more comfortable crying in a new BMW than on a bike.
Meanwhile in a parallel universe: “Oh for God’s sake! Where are all these extra single socks coming from?!”
I have a bumper sticker saying, "Honk if you think I'm sexy". Some days I just stand at a green light till I’m feeling good about myself.
I met two guys wearing matching clothing. So I asked them if they were gay. They promptly arrested me.
Did anyone notice that the “&”symbol looks like a dog dragging his butt across the floor?
My car horn now sounds like gunshots. People move out of the way much faster recently.
Police officer to a driver: “OK, driver’s license, vehicle license, first aid kit and warning triangle.” / Driver: “Nah, I’ve already got all that. But how much for that funny Captain’s cap?“
Not every badly unkempt guy is homeless. It could well be that he lives with 3 females and only 1 bathroom.
Do not go to the bathroom in a dream. It’s a trap!
aw a poster today, somebody was asking “Have you seen my cat?” So I called the number and said that I didn’t. - I like to help where I can.
I read the mass chicken farms pump chickens full of antibiotics. Well, that would at least explain why chicken soup is so good when you have a cold.
What do you call the soft tissue between a shark's teeth? The slow swimmer.
I called the hospital but the line was dead.
I fear my neighbor may be stalking me, she's been googling my name last night on her computer. I saw it clearly through my binoculars.
You know you’re old when your friends start having kids on purpose.
Why do people never eat clocks? Because it’s really time consuming.
Backing rapidly at a tree significantly reduces your trunk space.
If you step on someone’s foot, they open their mouth – just like a garbage bin.
My head is very slowly 3D printing my hair.
Sweater is a pretty disgusting name for a piece of clothing.
Bill Gates and I have a combined fortune of approximately 80 billion dollars.
It would be very nice if the car navigation voice would get more and more excited as you'd get closer to your destination.
Are those who sneeze the most blessed?
I wonder what dirty talk looks like in sign language.
When a pregnant woman takes a bath, she’s become a human submarine.
The first parents ever to have identical twins must have been really confused.
The Titanic’s sinking was a true miracle to the lobsters in the kitchens.
If every person on Earth blinked at the same time, nobody would ever find out.
When you clap, you hit yourself repeatedly because you like it.
I’d love to know how the phrase “when the shit hits the fan” came into being – with dates, names and pictures.
Chances are, good looking nurses and doctors never get accurate blood pressure level readings from their patients of the opposite gender.
The next generation kids will be able to look up their parents on the internet and see their whole lives documented, no excuses.
Tissues in a box should have different colors so you’d be warned that you’re approaching the last tissue.
What is white and flies up? A retarded snowflake
Why are pigs not allowed to ride bikes? Because they lack the thumbs to ring the bell.
At work: Excuse me, may I disturb you shortly? / Of course, what is it? / Nothing, I just wanted to disturb you.
Andy has 150 candy bars. He eats 125. What does Andy have now? Andy has diabetes now.
What is yellow and cannot swim? An excavator! And why? Because it only has one arm.
Why do bees hum? They don't remember the text!
What do you get when you cross a dog and an antenna? A Golden Receiver.