From: The Claw
This post* is fucked
Fixed :)
From: mastaraymond
Really; You cannot say 'Pascal > Python' without having tried it, that's a biased call. However that's not the issue here.. I'm sure it was Icefire's intention to just say "Don't switch programming language" however this general argument failed so the topic went down to bitching at python which is fucking irrelevant.
Besides I see no reason to 'block' this language out? Just let them Python guys do there thing, it's not like they actively develop SRL in it's current Pascal-state.. So who gives a damn what they do? It's not like there is any intention to 'erase' pascal from SRL? If there is a group of people who want to switch to another language, let them be? It's not like SRL isn't big enough for these kind of developments… On the contrary, it might actually improve SRL as a community..
I only looked through most of python2&3 manuals, sure maybe I didn't pick up everything in the dam thing. But what more must I do to "try it" convert every function I need to work in python then write a script totally in python just so I can run into the exact same problems on python that I do in pascal like failed randoms, script bugging up, OCR not working ect. ect. ?
Yea let the 'python people' do what they want, I'm not stopping them… I'm just pointing out what a unneeded use of time it is for everyone else to have to live with it involving the SRL include.
There might not be intentions to "erase" pascal from SRL, but there are intentions to
- Erase SCAR
- Promote Simba in every single way possible
- Crush anyone who disagrees
- And do what ever you can to justify it
Switching to python would be a big plus +1 for simba right?
Don't believe me, I can dig up
plenty of quotes from around the forum that prove every statement and I've said and more on these 'intentions'.
From: Wizzup?
Actually, it does support cases, it just doesn't have a keyword for them, as that's not really required to do a case statement;
if & elif are quite fine as they are. (Nice going checking the language spec again, Icefire)
They are also easily recreated using Python's o-so-powerful hashmap. (It really is one of the world's top 5.)
>>> {'VWB' : [1, 0.12, 0.29, MSX1, MSCY, 2443092, 5, 30, 30, 150],
'VEB' : [0, 0.11, 1.70, MSCX, MSCY, 2115671, 5, 30, 30, 100],
'AKB' : [0, 3.40, 0.84, MSCX, MSCY, 7435867, 14, 15, 30, 200],
'EB' : [0, 0.34, 0.99, MSCX, MSCY, 4216161, 1, 35, 35, 75]}['VWB']
[1, 0.12, 0.28999999999999998, 0, 0, 2443092, 5, 30, 30, 150]
import sys, time, random
class TPoint(object):
def __init__(self, x=0, y=0):
self.x = x
self.y = y
class TPlayer(object):
def __init__(self, strs=[]):
self.Strings = strs
self.Banked = 0
def Loggedin():
return True
def Between(st, en, inp):
s = inp.find(st) + len(st)
e = inp.find(en, s)
if (s == len(st) - 1) or (e == -1):
return ''
else:
return inp[s:e]
def ColorToleranceSpeed(x):
return
def SetColorSpeed2Modifiers(x, y):
return
def FindColorsSpiralTolerance(x, y, tpa, color, x1, y1, x2, y2, tol):
tpa = [TPoint(), TPoint(5, 5), TPoint(10, 0)]
return True
def TPAToATPAEx(TPA, w, h):
return [TPA]
def SortATPAFromFirstPoint(ATPA, Point):
return ATPA
def MiddleTPA(tpa):
return tpa[0]
def MMouse(x, y, rx, ry):
return
def Mouse(x, y, rx, ry, click):
return
def CountColorTolerance(c, x1, y1, x2, y2, t):
return 42
def GetMousePos(x, y):
return TPoint(x + 5, y - 7)
def ChooseOptionMulti(x):
return True
def FFlag(x):
return
def PinScreen():
return False
def InPin(x):
return
def ClickToContinue():
return
def BankScreen():
return True
def OpenBankFast(bank):
return True
def LogOut():
return
def OpenBankIce():
if not Loggedin():
return False
Bank = Between('(', ')', Players[CurrentPlayer].Strings[1])
if Bank == 'VWB':
BankInfo = [1, 0.12, 0.29, MSX1, MSCY, 2443092, 5, 30, 30, 150]
elif Bank == 'VEB':
BankInfo = [0, 0.11, 1.70, MSCX, MSCY, 2115671, 5, 30, 30, 100]
elif Bank == 'AKB':
BankInfo = [0, 3.40, 0.84, MSCX, MSCY, 7435867, 14, 15, 30, 200]
elif Bank == 'EB':
BankInfo = [0, 0.34, 0.99, MSCX, MSCY, 4216161, 1, 35, 35, 75]
else:
return False # Really just a failsafe to ensure Python doesn't crash when passed an invalid bank as you don't check that
print('Opening ' + Bank + '...')
res = False
for Re in range(0, BankInfo[0]):
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(BankInfo[1], BankInfo[2]);
TPA = []
FindColorsSpiralTolerance(BankInfo[3], BankInfo[4], TPA, BankInfo[5], MSX1, MSY1, MSX2, MSY2, BankInfo[6]);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
if len(TPA) > 0:
TPAA = TPAToATPAEx(TPA, BankInfo[7], BankInfo[8])
SortATPAFromFirstPoint(TPAA, TPoint(BankInfo[3], BankInfo[4]))
for curTPA in TPAA:
if len(curTPA) < BankInfo[9]:
continue
OB = MiddleTPA(curTPA)
MMouse(OB.x, OB.y, 1, 1)
time.sleep(0.2 + (random.random() * 0.05))
use = []
if CountColorTolerance(14342657, 7, 7, 100, 25, 70) > 150:
use = ['quick', 'uick', 'uic']
elif CountColorTolerance(648165, 7, 7, 100, 25, 50) > 100:
use = ['ank B', 'nk B', 'k Ba']
if len(use) > 0:
OB = GetMousePos(OB.x, OB.y)
Mouse(OB.x, OB.y, 0, 0, False)
time.sleep(0.2 + (random.random() * 0.05))
if not ChooseOptionMulti(use):
continue
FFlag(0)
t = time.clock() + 6
while time.clock() < t:
time.sleep(0.1 + (random.random()*0.05))
if PinScreen():
InPin(Players[CurrentPlayer].Strings[0])
time.sleep(2 + (random.random() * 0.2))
ClickToContinue()
if BankScreen():
res = True
break
if res:
break
if not res:
if (Re == 0) and (Bank == 'VWB'):
Mouse(MMCX, MMCY - 10, 0, 0, True)
FFlag(0)
time.sleep(1 + random.random())
else:
res = OpenBankFast(Bank)
if res:
print('Opened ' + Bank + ' using OpenBankFast.')
if res:
print('Opened ' + Bank + '.')
Players[CurrentPlayer].Banked += 1
# Insert some other incs here
return res
print('Failed to open ' + Bank + ', logging out...')
LogOut()
return False
def Test(a):
a.x += 1
Players = [TPlayer(['', '(VWB)'])]
CurrentPlayer = 0
MSX1, MSY1 = 0, 0
MSCY = 0
MSX2, MSY2 = 0, 0
MMCX, MMCY = 0, 0
random.seed()
OpenBankIce()
Hey everyone what is easier to read?
This
>>> {'VWB' : [1, 0.12, 0.29, MSX1, MSCY, 2443092, 5, 30, 30, 150],
'VEB' : [0, 0.11, 1.70, MSCX, MSCY, 2115671, 5, 30, 30, 100],
'AKB' : [0, 3.40, 0.84, MSCX, MSCY, 7435867, 14, 15, 30, 200],
'EB' : [0, 0.34, 0.99, MSCX, MSCY, 4216161, 1, 35, 35, 75]}['VWB']
[1, 0.12, 0.28999999999999998, 0, 0, 2443092, 5, 30, 30, 150]
or this
case Bank of
'VWB': BankInfo := [1, 0.12, 0.29, MSX1, MSCY, 2443092, 5, 30, 30, 150];
'VEB': BankInfo := [0, 0.11, 1.70, MSCX, MSCY, 2115671, 5, 30, 30, 100];
'AKB': BankInfo := [0, 3.40, 0.84, MSCX, MSCY, 7435867, 14, 15, 30, 200];
'EB': BankInfo := [0, 0.34, 0.99, MSCX, MSCY, 4216161, 1, 35, 35, 75];
end;
and
this
case Random(100) of
0..25: WriteLn('bottom quarter');
26..50: WriteLn('third quarter');
51..75: WriteLn('second quarter');
76..100: WriteLn('first quarter');
end;
or this
import random
r = random.randrange(100)
if r in range(0, 25):
print('bottom quarter')
elif r in range(26, 50):
print('third quarter')
elif r in range(51, 75):
print('second quarter')
elif r in range(76, 100):
print('first quarter')
s = 'a'
if s in 'abcdefghijk':
print('lmaooo!')
I think it's pretty obvious, but to confuse everyone I'll say it's better to use python now instead of more readable in pascal… which was the focus in the first place =/
From: mixster
So we still use PascalScript, but tell everyone to go learn Java? Please, I asked you to tell me your stance for this very reason and you said `Stick with PascalScript, learn Java over Python' and I then said why Java is a pretty horrible language for macroing, but you meant just like, learn both at the same? The problem with that being people who have wanted to fix reflection have kind of tried to and I don't think many succeeded. So if people who want to do it failed, why would the average Joe scripter who doesn't really want to be able to do it?
Yes we still use Pascal, because it's already very fluent in a very very very large percentage of the population of SRL.
And we spend our time learning Java instead of Python, not so we can "macro with it" what ever the hell that means, and use that knowledge to pursue Reflection and understanding the Runescape client.
@Lasttwosentances
Ok in that case, what makes you think 'average joe' is gonna go, omfg python
*starts over his knowledge*
only to come out with a product in the end where none of his original problems where solved by switching, his bank still fails every 15 trys, randoms don't really work to well… and the auto responder isn't timed right.
But it's all better now! It's written in Python!
Wtf?
From: mixster
Sure I agree, having a Java-fluent community would most likely lead to reflection being more permanently fixed, but why would the whole community learn Java when they're already learning PascalScript and Java wouldn't actually allow them to macro?
It doesn't sound like you agree in the other above quote box, but hey I'm not here to question your sense of surroundings so I'll just ignore that.
Having Java-fluency would push SRL over the top, and make it better than any other runescape cheating community ever made, and would attract more people, and ultimately the increase in people would push every aspect of SRL over the top.. where switching to python has the potential to do serious damage to a lot of aspects of SRL.. including activity and likability, as well as user friendliness.. but hey… who cares about the "what-if-ers" anyways right?
Lol Java wouldn't allow them to macro, only open up the source code to RS and maybe actually pick up on a few things….
From: mixster
Why can't they include the whole thing? But anyway, useful parts of the library are improved mouse functions, improved typing functions, the Object.scar file has multiple FindObject's that can are pretty useful if you remove the UpText checking. Color.scar has some general use wrappers for harder to use functions and a couple of nice general use functions (GetBestColor for example). Text.scar has the explode and implode for older Scar versions as well as a few like InStrArr and others rearranging those words. Timing.scar has a few expansions to Scar's normal time functions.
Heres a clue, because on my computer SRL slows it the hell down… there's so much unneeded (not even working) junk dead and buried being compiled it takes 9001 m-seconds just to compile my firemaker when it only takes 100 ms to compile no includes at all.
Are you seriously trying to tell me that if you removed uptext from FindObj you could some how use it to find crap in other things not runescape related? Wow…. that just made my day.
Sure there may be a few things you would need out of SRL… but no one is going to make a script for Eve online and include the entire SRL and be like "ah shit it's written in Pascal… I wish it were python!!!! :( :duh: )
From: mixster
It may not be overly much, but it is a lot of useful additions to Scar. Then there's also all the neat stuff in WizzyPlugin (yes that is part of SRL - it comes with SRL's plugins) that's pretty useful if you plan on doing anything serious.
You don't need to include SRL to use things in any plugin, in fact, but you probably already knew that. =/
From: mixster
Anyway, I in no way suggested they were a majority, but I do think that dismissing them because they don't auto is out of hand as they are still members of the community.
I'm dismissing "them" as they (people not using SRL include) to tell people (using SRL include) that SRL include will be written in this language. When people who use SRL include should decide, and not people who don't use it at all.
Either way it's not even close to a majority, so it will never fly… it's just the fact that you something outlandish like that and knew it was made my laugh and I couldn't resist posting a picture of a collideascope as I though it displayed what you said perfectly.
Hey we can't have a sense of humor? We're all friends here.
From: mixster
The idea of using Python for Runescape macroing is almost as far out and crazy as using PascalScript to do it!
LOL ok.
Especially when people are already fluent in one and not the other.
Let's write the SAT in Spanish too.
From: mixster
This hasn't been about telling you to use it, but trying to show you why I think it would be beneficial to use it rather than PascalScript (something which is less clear when you see how far the debate has come).
So far, I've seen absolutely nothing in this thread worth my while to use python over pascal when making a runescape script.
Absolutely nothing.
From: mixster
If am indeed correct with my above thought that you want to encourage learning Java alongside PascalScript, then indeed that would make what I said wrong.
That is correct…. the last part anyways… because from what I've seen so far I have no idea what to interpret that first part of your sentence to mean so I'm not going to.
From: mixster
Just want to point you to Method's post here which clearly does say that him learning Java helped him become awesome… oh no wait, it doesn't. But wait, he posted again here where he said that learning general Java probably won't be enough and say `that is nothing close to the amount required to build an updater and look through the client for fields you're interested in (and then to build patterns to locate those fields across client revisions).' - yeah, quite a supportive view for you. After that, you then have HyperSecret here talking about him learning Java in no way enabled him to help with reflection at all. True, he does say he would like to try again after Java classes.
I'd just like to post them here to make them more readable
From: Method
Well, you'd need some basic knowledge of Java involving methods, fields, variables, the API, etc. to make a script for iBot or one of the other Java bots, but that is nothing close to the amount required to build an updater and look through the client for fields you're interested in (and then to build patterns to locate those fields across client revisions).
edit: That's one of the reasons why botting (and private server) communties are so poor. People learn just enough to get by and don't take the time to really learn the language to investigate further applications of it.
From: HyperSecret
I was able to write a script for iBot, RSBot, etc… before taking any java classes and was not able to make an updater or anything to really help with reflection (on the java side).
I really want to try again since I took a Java class.
From: Method
If by specific you mean actually learning the fundamentals behind the language instead of using one specific API (that of one of the popular RuneScape bots), then yes, you will need to learn a lot of "specific Java". Learning Java is more than just making a script for a bot that requires little work to be effective.
Was anyone even debating this? Of course people with little Java experience couldn't maintain an updater to get our reflection implementation up-and-running again…
From: mixster
I'm sorry, but I did see it as quite a negative post regarding learning Java leading to fixing reflection and I see the rest of your post as that too. It still seems to be that you're saying learning basic Java isn't enough - only learning a crap load of specific Java would be. I'm not denying that you have to learn Java initially to get to that goal - I'm saying that teaching a lot of people a little bit of Java will not mean that suddenly there will be a group of people with enough skill and the like to fix reflection and keep it up to date forever.
From: HyperSecret
It would probably be just as easy to learn if we have the same type of tutorials for it as we do for using Pascal. I have never written anything in Pascal outside of using it with SCAR.
So if we had the tutorials to teach people how to use Python directed towards Runescape autoing, just like we do Pascal here, I would assume people would be able to pick it up just as easily.
I think that about sums it up. And hyper sceret, from Methods' explanation on what he had to do to understand the client, sounds like hyper didn't go to far with it.
From: mixster
Since when does PascalScript help you understand the Runescape client? SRL has actually never been about understanding it or using reflection at all - it was an unofficial side project of a group of people. Why Python over PascalScript? For all the reasons that have been said that you have dismissed as `false' for reasons only known to you.
Since when does Python. I have never said PascalScript helps you understand the client, only Java.. You have clearly misread my post. Try again.
"Reasons only known to me" I seriously lol'd at that one.
I've yet to see any great advantage for runescape macroing by using python, only that Wizzup said there was… and could not produce one.
So maybe you were talking about Wizzup and somehow put my name in there.
From: mixster
The claim I was referring to was actually the bit right before that - `With every ounce of my reasoning behind me, I can only see Java as a good move if SRL were to only auto RS and use a client like Smart (similar to RSBot and co).'
That did indeed have support - the previous few paragraphs. I'll put this little slip-up down to a mistake and not you purposely picking the weaker one and then assuming what I said only referred to that to make it easier for you to break it.
I'm sorry but, wtf are you talking about… SMART already grabs reflection hooks.. thats all pascal based functions need (in combination with understanding the Runescape source code "I-kno-crazy-ritee?") to get the maths right in pascal.
I can't really make sense of your post right there for some reason.
From: mixster
Anyway, as you did want to focus on that, it's because Scar & Simba are very much general macroers, but by switching to Java you would indeed make them very different products for the reasons I stated.
Who said anything about switching ANYTHING to Java?
I said it would be more helpful to pursue Java than Python, and it is.
You're still a very confused person.
From: mixster
Because making a silly joke some how makes my defence of producing a functioning Python equivalent of a PascalScript script that doesn't relate to RS any less important? The main point of the script anyway was to show you how similar the general syntax is - I bet if you looked at them side by side you could easily match up the same lines and read one just as easily as the other. Oh and for the record, my script was SRL Include related as it downloaded it :)
Downloading SRL does not make it include related because it does not use the include, it distributes it. Nice sarcasm.
Anyways that's only if you have both side by side to compare, otherwise it's jibberish to anyone who doesn't know python.
From: mixster
Funny stuff - I did exactly what you asked, but instead you completely dismissed that and focused on whatever you could to make it seem like Python sucks. Evidence to the contrary has been given since then, so I shall leave it at this.
Evidence above~ =)
I'll accept your challenge from earlier as well, but I'll probably have some outside help from one of my buddies that is good at python, if that's not against the rules.
From: mixster
Done so in previous post and as also been improved by Wizzup?
And refuted this too about 5 quotation boxes ago.
From: mixster
I think it made perfect sense - people who produce scripts may want to download or store large pieces of data that could benefit from being compressed. Having the script decompress it is just a bonus for making it easier for the end user.
Sorry but that's just absolutely retarded on so many levels.
From: mixster
You can find it at http://python.org
you mean python.com ? ;)
From: mixster
Then why do you still support it as a point? Is having several different functions that do the exact same thing (check if something is in an array) make a language any more readable?
Because the original connotation of that entire discussion between me and Wizzup was "show me python being more readable" and posted the source of InIntArr compared to python doing it with the in word. But seriously… all those are already premade for every type you need… InStrArr, InStrArr… even better because they actually return an index where it was found! Which is about the only useful part of it even!
The entire discussion was over readability and became about which one is better… which was never a point made in the opposite direction.
I like how I was the first one to point out they were called primitives, yet 4 people basically copied and pasted each other shortly afterwords like I had no idea what I was talking about. Seriously made me facepalm. Especially after wasting hours trying to debunk this dam thread.
From: mixster
Anyway, it seems other people may be getting annoyed with the mass debating. Possibly we should tone it down a little, or not - your choice really.
I could honestly give a shit if people are annoyed. Everyday I sign in to SRL with out being able to check daily posts without seing "God is imaginary" or some other crap along those lines. Me debating over Python, compared to seeing threads with titles like "why do people hate pedophiles" "Belief in miracles in contradictory to science" same goes for the IRC. And the atheists signatures aswell.
No one cares that you hate God… get over yourselfs and tell someone who gives a shit.
So really… truly… I'm not complaining about the above neither should people complain about me posting.
Sorry for going offtopic
Back on topic!
A lot of that was not directed at you… if not all of it. :)
From: mixster
To target the broader people, I would be up for changing to just about any interpreted language around, but Python seems like the best choice to me. Perl being another big one is quite a lot more difficult to follow (I commonly refer to it as being obfus'd Python - others may not) and Ruby is a silly language (ask Craig` on IRC). Lisp, while being loved by Yakman, does have a very different syntax compared to Pascal. I'm sure there are countless others you could name, but I don't think any of them would be as user friendly as Python is nor as similar to PascalScript too.
@above
From: c0de
Ruby is an awesome language (and I'm pretty sure Craig` would tell you that as well), it's just that Wizzup doesn't agree with that. Let's face it, you like Python because Wizzup hyped it up for you… Give a Ruby try without any prejudices and you'll see what I mean…
What he said^^
From: mixster
Sure, I would love to ask everyone what one they wanted to use, but I would also think it's important that they make a fair decision. However, is it just enough that they choose their favourite or is it important they choose the one they think is easiest for new people to learn or existing scripter to change to? If you are to propose a community (or just Members) wide poll, then please don't rush into and think about what exactly you want to ask.
From: Wizzup?
If we want to bundle the language with Simba/SRL, then we will need an interpreted language. So compiled C is out of the question. If you want to preserve ANY kind of readability, then I would suggest to stay away from Ruby. I guess the same goes for Perl.
(Random benchmarks)
http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=python&lang2=jruby
http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=python&lang2=perl
From: Dan Cardin
Perl is confusing, Ruby has rails and something akin to C++script i know nothing about. We could program in javascript, but that's basically C, and other such languages, but really, most languages are so much alike that it barely even matters. Which is why this whole thread barely even matters other than to make people look silly and misinformed.
you'd still and always end up with the losers (in this case lets say the 30% = y%) that have to pick between two languages that they don't want, so in any case, if there is actually any competition in these votes, then the votes will fail and if there isn't then the votes are pointless. Either way, its a lose, so one might as well not have a vote. Then after that whoever feels like they are left out and want to go programming in whatever interpreted language they want, they can go implement it themselves. The main focus for the SRL devs should be developing SRL, not completely changing it simply to make changes that will barely matter in the grand scheme of things (as i think it indeed is). The people that chose to go about implementing python and Ruby can do so, and if it garners enough support, it might be in the best interests of SRL as an community, to include them. Until then, its a rather moot point.
@ the above posts.
The polling sounds like the right thing to do.
But the main problem is that you have to make it clear exactly what you are posting.
I don't think anyone is against simba supporting python, it's SRL 5 or ect. being written in python ect..
So if you do poll be sure to be very very specific so there is no confusing (like there is clearly in this thread)
I'd also like to say that any polling problems can be solved by making every round after it is narrowed down giving the "Neither" option and requiring that at least 50% (or you can make it 66.7% like in congress) be reached to say that any decision was fairly made.