I've tried the models but it didn't show me any model id's.
Printable View
I've tried the models but it didn't show me any model id's.
I do. When I used the models debugmode, it didn't show me the fishing spots. It showed me players and when I wanted to let it kill some chickens, it showed me the chicken id's aswell. Fishing spots = the bubbling water that you can click on.
I'm happy to announce that code hints and the function list are fully supported now in the latest ogLib update. This should be make starting out with the include a lot easier and lead to faster, more fun scripting!
Enjoy :)
I'll be right back with the guide update now.
http://i.gyazo.com/45fab2d80ed32970df095dc8cdd60688.png
Nvm i'll just send over skype
Updated tutorial to work with latest ogLib. Thanks @Bly for saving me some time! :)
What's up with the access violation?
And here's the picture:
http://puu.sh/i8vMG/4290aebc1c.png
Ok, I found the right modelid.
For people that wonder what the fishingspot modelid is:
fishSpot := ogl.getModels(3122259503);
But still, I don't know why I keep getting this access violation :S
In computing, a segmentation fault (often shortened to segfault) or access violation is a fault raised by hardware with memory protection, notifying an operating system (OS) about a memory access violation; on x86 computers this is a form of general protection fault.
An operating system, as defined by Google, is the software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.
If you're still confused, I saved you a further Google, and will define a peripheral device. A peripheral device is generally defined as any auxiliary device such as a computer mouse or keyboard, that connects to and works with the computer in some way. Other examples of peripherals are image scanners, tape drives, microphones, loudspeakers, webcams, and digital cameras.
Ahha.. ok. And now in English? Why does it give me the access violation error?
Make sure your ogLib is updated to the latest version. An access violation is failure to access.
An access violation is a broad error that can happen in many situations, you'll need to post the code that led to the error in order for us to best help you :)
For instance, you may be trying to work with an empty array of models due to lack of length checking.
Yush dragon are you still having problems?
edit : removed something i originally posted, forgot something :P
@Bly
countDown.setTime(0) will reset a countDown.
It's alternative to color, yes? Is it like Reflection in Simba style? How is it different from reflection, because I sure as hell I'm interested :D So hard for me to pick colors no matter CTS0/2, this is such a tempting perspective.
I found out sometimes I have to restart the Simba client after running the ogLib script once, as I get Access Violation otherwise.
Also, since it finds a model/texture, and clicks based on it, does similar TPA-randomized clicking occur? I saw randomizePointEllipse in Clarity's example script, does it function well enough, anti-ban-measure speaking?
Also curious. If RS's NXT client get's developed, and perhaps OpenGL support get's dropped (will it?), this method could no longer be viable then?
Other than that, looking forward to try it out. My color-finding is horrible.
Would be nice if somebody could answer a few of my questions.
Cheers and thanks a lot for good work!
EDIT:
I found out you can't have setDebugMode and ogl.getModels going on at the same time. Well, you can, but it's buggy, as in sometimes the setDebugMode blocks the getModels, and vice versa. Managed to workaround this by setDebugMode, wait(X), getmodels, wait(Y), until false.
If you get AV, hold F9.
Anti-ban is up to the script writers to add. This includes randomizePoint*() which works great.
NXT will drop DX and run on Open/webGL.
setDebumode() should only be called once, soon after setup(). Even still, it shouldn't affect getModels().
Thanks for replying!
setDebugMode certainly affected getModels. Couldn't get both of them to run, unless I did the mainloop with wait(X) periods between them, for some reason. I could've made a mistake, however.
Will drop DX? I have a pretty old computer, DX works more smoothly, hitches less, and also the game looks quite better. How come it's the one that could get dropped? It's because of the cross-platform and progressively improving driver support?
OpenGL is cross-platform. DirectX is for Windows. One of the focuses of NXT is to make it cross platform.
Thanks for answering, Obscurity.
Now, can somebody tell me what is wrong?
That's the current script. It worked once already, and now for some reason I can't get it to work:
Because I'm not getting any compilling errors, however i do get this:Code:program ogLib;
{$i ogLib\lib\core\core.simba}
var
clientCenter: TPoint;
procedure mainLoop;
var
willowTrees: glModelArray;
clickPoint:tPoint;
begin
willowTrees := ogl.getModels(892814592);
clickPoint:= clientCenter.closest(willowTrees)[0].randomizePointEllipse(15);
clearDebug;
if willowTrees.isEmpty() then
writeln('No trees were found.')
else
clickMouse(clickPoint.x, clickPoint.y, 1);
wait(random(5000, 10000));
end;
begin
ogl.setup();
clientCenter := ogl.getClientMidPoint();
//ogl.setDebugMode('models');
repeat
// clearDebug();
mainLoop;
// writeLn(ogl.getModels(897174394));
// wait(100000)
until false;
end.
When I replaced randomizePointEllipse(15); with randomizePoint(36, 32)Code:Error: Access violation at line 1369
>>method.simba gets opened<<
line 1369: result:=[self.x+round((funcRadius:=funcDiameter div 2)*(funcRandom:=random())*cos(funcAngle:=random()*(pi*2))),self.y+round((funcRadius*funcRandom)*sin(funcAngle))];
core.simba gets opened instead, and the error line is 779 because of
Code:Error: "0.26179938779915" is an invalid float at line 779
line 779: oglAngleTolerance:=strToFloat(replaceRegExpr('^$',readINI('Default','oglAngleTolerance','includes/ogLib/lib/core/core.ini'),'0.26179938779914943653855361527335',false));
You should always do a length check (or .isEmpty()) before trying to access an index in a gl*Array, In case none are visible.
In other words:
if length(willowTrees) then
ClickPoint:=...
We also have mouse.click(tPoint). :-P.
Yeah, you're likely trying to work with arrays that have no contents, hence the access violation error. You will need to make sure you actually find things with the length check in order to proceed, else continue and skip.