djborec
2011-12-28 04:48:26
As lot of you can notice ,everytime somebody use in script Bank ,it is looking ofr pixels ,which eats twice more CPU then usually.
So my idea is to remake banking functions ..
Banking fuction would have array of known color points with their positions on screen (this array would be filled just once by modifed old banking method)
Then array of integers (-1,0,1) . Inicialized by default to 0.
If somebody use banking function in script ,then first time it will detect all this points by modifed old function, then save them into array. New banking method will pick random points from this array and open the bank ,if bank screen comes up, it will save into same positions as positions of points in array of known color points positions in array of integers 1. If bank screen wont comes up it will save into same position array of integers -1 and take another position and do the same thing. If banking function will be called second time, it will just load array of intgers . Look up for 0 or 1 (it will decided by random switch whatever it is looking for) . And do the same thing again . If it will get position of 0 ,then it will load same position in array of known color position ,try if banking from this position works and if yes then change 0 into 1, if no then into -1 and pick random again. If it will get position of 1, then it will just easily open bank.
This would save up some CPU ,because it does not have to look up for bank colors everytime its called ,just for the first time.
Second thing is to remove looking up for text "e quick" etc . Just basicly everyone knows that from place where mouse clicked right to open bank and position of this box is everytime same distance ,then just make mouse move random and click onto new mousebox.
This would again save up some CPU, because the script does not have to recognise text .
So my idea is to remake banking functions ..
Banking fuction would have array of known color points with their positions on screen (this array would be filled just once by modifed old banking method)
Then array of integers (-1,0,1) . Inicialized by default to 0.
If somebody use banking function in script ,then first time it will detect all this points by modifed old function, then save them into array. New banking method will pick random points from this array and open the bank ,if bank screen comes up, it will save into same positions as positions of points in array of known color points positions in array of integers 1. If bank screen wont comes up it will save into same position array of integers -1 and take another position and do the same thing. If banking function will be called second time, it will just load array of intgers . Look up for 0 or 1 (it will decided by random switch whatever it is looking for) . And do the same thing again . If it will get position of 0 ,then it will load same position in array of known color position ,try if banking from this position works and if yes then change 0 into 1, if no then into -1 and pick random again. If it will get position of 1, then it will just easily open bank.
This would save up some CPU ,because it does not have to look up for bank colors everytime its called ,just for the first time.
Second thing is to remove looking up for text "e quick" etc . Just basicly everyone knows that from place where mouse clicked right to open bank and position of this box is everytime same distance ,then just make mouse move random and click onto new mousebox.
This would again save up some CPU, because the script does not have to recognise text .