since i'm getting abit of headway on this lua script stuff i thought i'd give it a shot and make a little program to help fortify my skills a bit. after a bit of thinking i thought of an interesting way to kill two birsts with one stone. Frogboy mentioned thinking of a way to detect premade games so that they can either be flagged or warned. i did my best to build a little lua script to do this but being so new to it i've only been able to come this far.
reason for this post is to see if anyone else out in the community is willing it help out with completeing the script so that someone like SD could simply impliment it into the system to draw stats from the servers to figure out premaded.
EDIT: Made a bunch of edits since i made a few break throughs...
Lua Script: PremadeDetection (EDITED)
Description:
this here is the best decription of what i'm trying to do, thank you alvaro202:
A properly made script will just allow new players in the match to see that you have continuosly played games together. If you and say 5 people are all playing back to back it wont matter, because you all wont care. But say you and 2 of your buddies keep rejoining the winning team, and 3 new pubbers join up, they may not want to fight the 3 of you.
If your just interested in playing, than you can simply switch teams and distribute your forces and the 'flags' would go away, since you wouldn't be on the same team.
Script
P1 = {"Bill","Fred","Sam"}
P2 = {"Sam","Bill","Josh"}
P3 = {"Jim","Jack","Sam"}
print("Have they played with Bill? \n")
B1 = P1[1]
B2 = P1[2]
B3 = P1[3]
F1 = P2[1]
F2 = P2[2]
F3 = P2[3]
J1 = P3[1]
J2 = P3[2]
J3 = P3[3]
ifB1 == F1
then print("Bill is Freds Teammate") BillFred = true
elseifB1 == F2
then print("Bill is Freds Teammate") BillFred = true
elseifB1 == F2
then print("Bill is Freds Teammate") BillFred = true
else
print("Bill hasn\'t met Fred") BillFred = false
endifB1 == J1
then print("Bill is Jims Teammate") BillJim = true
elseifB1 == J2
then print("Bill is Jims Teammate") BillJim = true
elseifB1 == J2
then print("Bill is Jims Teammate") BillJim = true
else
print("Bill hasn\'t met Jim") BillJim = false
end
print("\n Premade?"
if
BillFred == true
or BillJim == true
then print("Premade")
else print("nope")
end
in this i made an example of a new game where Bill, Fred and Jim are all on the same team... after running the script it checks their last games (the tables at the top) and references their teammates. the outcome for this is:\
|
Return
Have they played with Bill?
Bill is Freds Teammate
Bill hasn't met Jim
Premade?
Premade
so from this Bill and Fred would be tagged as premade teammates
conclusion
would really love to hear some imput from people on how this might come together as well as lua script that would actualy work. make sure u point out my mistakes and what they should be changed to (and why) so i can learn from this. at the very least if someone form SD or GPG can do this better feel free to take the idea and run with it.
still waiting to hear is anyone knows how to access the demigod stats.. and how i would access them with a lua script, so if u know anything about that let me know 