WiccanSeductress Posted March 18 Share Posted March 18 I am looking for a points system that gives points, much similar to that of the points system used in Harry Potter (house cup in first movie). Any ideas on where to find one in-world? Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 18 Share Posted March 18 1 hour ago, WiccanSeductress said: the points system used in Harry Potter Since I haven't read the movie or watched the book in years, I looked it up. The Harry potter wiki says: Quote The House Cup is a yearly award at Hogwarts. It is given at the end of the school year to the House with the most House points. Points are given to Houses by teachers and prefects throughout the year for various things including answering questions correctly and doing good deeds. The winners of school Quidditch games also receive points. Points can be taken away for things such as misbehaving or rule-breaking. On its face, seems like a rather simple idea, but there are a lot of fiddly nuances depending on exactly how you'd want it to work. I don't know of anywhere in-world that would magically have exactly what you're looking for. Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 18 Share Posted March 18 4 minutes ago, Quistess Alpha said: Quote The House Cup is a yearly award at Hogwarts. It is given at the end of the school year to the House with the most House points. Points are given to Houses by teachers and prefects throughout the year for various things including answering questions correctly and doing good deeds. The winners of school Quidditch games also receive points. Points can be taken away for things such as misbehaving or rule-breaking. On its face, seems like a rather simple idea, but there are a lot of fiddly nuances depending on exactly how you'd want it to work. I don't know of anywhere in-world that would magically have exactly what you're looking for. It almost seems more like a "voting" system, since points aren't awarded "automatically" by accomplishing tasks (I forgot that part), but manually by characters.. Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 18 Share Posted March 18 Something something, scripting forum isn't the place to ask for custom scripts etc. etc. but I was bored, so. . . Quote //Public domain script, by Quistess Alpha. //USAGE: // Edit the global variables for setup, then press 'save' in the lower right of this window. // anyone may touch the object to get a menu, to list points or full point change log. // teachers may use a 'chat command' on gChan to add or remove points from a given house. // /gChan pointChange House explanation // for example: // /17 3 Plum for Miss Winsor's superb performance on her potions exam // /17 -7 Weasel as a deterrent to all those who would blatently scorn curfew // /17 +4 Weasel to soften the impact of the overwrathful curfew deterrence from Proffessor Q // // The owner of this object may use the chat command 'CLEAR' on the same channel to wipe the entire log and reset all points to 0. // setup variables, edit these and save script to configure: integer gChan = 17; // channel this object uses for dialog and chat commands. float gReadSleep = 1.0; // how long to sleep between reading messages. list gTeachers = // UUID, fancy name. [ "8645873d-1306-4f22-a60c-4f2bc3bb9ca2", "Proffessor Q", "68686474-391b-44ea-b68f-9b88a566af9f", "Teacher #2" // no final ',' in the list. ]; list gHouses = // case sensitive! (Gryffindor is different than gryffindor) [ "Snake", "Weasel", "Pony", "Plum" ]; // working variables, changing default value has little to no effect: // Intentionally left blank. // LSD key values used: // houseName:points // numLogs:totalNumberOfLogs // log#:log // starts at log1 default { state_entry() { llListen(gChan, "","",""); // initialize points if not already: integer i = llGetListLength(gHouses); while(~--i) { string house = llList2String(gHouses,i); string points = llLinksetDataRead(house); if(""==points) { llLinksetDataWrite(house,"0"); llOwnerSay("Initializing "+house); } } } touch_start(integer n) { while(~--n) { llDialog(llDetectedKey(n), "Points: Point totals for each house.\n"+ "Full log: List every point change (may be very long).",["Points","Full log"],gChan); } } listen(integer Channel, string Name, key ID, string Text) { integer indexTeacher; if("Points"==Text) { list pointList; // read into list, then sort. integer i = llGetListLength(gHouses); while(~--i) { string house = llList2String(gHouses,i); integer points = (integer)llLinksetDataRead(house); pointList+=[house,points]; } pointList = llListSortStrided(pointList,2,1,FALSE); i = llGetListLength(pointList); // could micro-optimize by *2 original i. while((i-=2)>=0) { string house = llList2String(pointList,i); string points = llList2String(pointList,i+1); // implicit type-cast. llSay(0,"House "+house+" has "+points+" points."); llSleep(gReadSleep); } }else if("Full log"==Text) { integer index; integer indexMax = (integer)llLinksetDataRead("numLogs"); for(index=0;index<=indexMax;++index) { llSay(0,llLinksetDataRead("log"+(string)index)); llSleep(gReadSleep); } }else if("CLEAR"==Text && ID==llGetOwner()) { llSay(0,"I have reset all my data!"); llLinksetDataReset(); llResetScript(); // lazy hack to redo 0 point initialization. }else if(-1!= (indexTeacher=llListFindList(gTeachers,[(string)ID])) ) { // teacher setting points and is authorized. string name = llList2String(gTeachers,indexTeacher+1); // assume format: points housename flavor text integer points = (integer)Text; Text = llDeleteSubString(Text,0,llSubStringIndex(Text," ")); // pop points string house = llGetSubString(Text,0,llSubStringIndex(Text," ")-1); Text = llDeleteSubString(Text,0,llSubStringIndex(Text," ")); // pop housename // Capitalization: string l = llToUpper(llGetSubString(Text,0,0)); Text = l+llDeleteSubString(Text,0,0); if(-1==llListFindList(gHouses,[house])) { llRegionSayTo(ID,0,"Error: "+house+" is not a valid house!"); }else { // set the log: string time = llGetTimestamp(); time = llDeleteSubString(time,llSubStringIndex(time,"T"),-1); string sign; // because I'm fiddly. if(points>0) { sign="+"; } string sPoints = sign+(string)points; string log = time+" : "+Text+" : "+sPoints+" to house "+house+" from "+name; integer numLog = (integer)llLinksetDataRead("numLogs"); llLinksetDataWrite("numLogs",(string)(++numLog)); llLinksetDataWrite("log"+(string)numLog,log); // update points: integer pointsPrev = (integer)llLinksetDataRead(house); llLinksetDataWrite(house,(string)(pointsPrev+points)); string pointsNow = llLinksetDataRead(house); // reading from LSD for sanity-check. // report: llRegionSayTo(ID,0,log); llRegionSayTo(ID,0,house+" had "+(string)pointsPrev+" points, but now has "+pointsNow+"."); } }else { llRegionSayTo(ID,0,"Not authorized."); } } } (quote reduces spaminess) 1 2 1 Link to comment Share on other sites More sharing options...
WiccanSeductress Posted March 19 Author Share Posted March 19 On 3/18/2024 at 11:51 AM, Quistess Alpha said: Something something, scripting forum isn't the place to ask for custom scripts etc. etc. but I was bored, so. . . (quote reduces spaminess) May I use this script? Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 20 Share Posted March 20 17 hours ago, WiccanSeductress said: May I use this script? yes. 1 Link to comment Share on other sites More sharing options...
WiccanSeductress Posted March 22 Author Share Posted March 22 On 3/20/2024 at 12:53 PM, Quistess Alpha said: yes. Thank you! Also, the script has the four houses in it, but can it be adjusted to just one house for each cup? For example, one script for one house, one script for another house and so on? Link to comment Share on other sites More sharing options...
Marvin Benelli Posted March 22 Share Posted March 22 Yes ofcourse it can be adapted!Just put a request with all requirements in the Inworld Employment section. That’s were you can commission scripters to work for you. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now