Log in

View Full Version : New to Simba. Have some questions



Crash Override
06-07-2012, 11:32 AM
Hi im new to SIMBA.

I need some help if possible. I am working on my first script: YakHideCollector

I am having a few issues as being new to SIMBA most people do.

ISSUE 1:
I use AVA2 for picking the color and i am still having trouble. It right-clicks fine. But instead of picking up yak-hides it picks up yak-hair....

heres the part of the script
Procedure PickUpHides;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'ake', 1780016, 35) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('ake');
end;
repeat
wait(400+random(250));
AntiBan;
Until not IsUpText('air,') or (InvFull);
until(InvFull);
end;


ISSUE 2:
How do you actually make a walking script work? I have made my own walking script it works but how do i actually activate it? I would like to walk after my inventory is full. How do you do that? Do you need to add an IF statement or something? I tried this
Procedure WalkToBank;
var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['2_3']);
myPath := [Point(338, 247), Point(344, 227), Point(351, 214), Point(366, 216), Point(384, 218), Point(390, 222), Point(397, 230), Point(388, 239), Point(385, 238)];
SPS_WalkPath(myPath);
end;


ISSUE 3:
When walking if their is an obstacle such as a shut gate or door, How do you tell the script to open them? I assume its an IF statement of some sort.

I know that these are really easy to a lot of you. And after i am told how to do it it will be easy for me too... I also know that this is a very bad script but after i get it working and do a heap of tweaking it will be flawless XD

Thanks guys.

-Crash Ovveride!:sasmokin:

cycrosism
06-07-2012, 11:41 AM
I can help you with the first question. I don't use SPS so I can't help you with that.

Change your code to this


Procedure PickUpHides;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'hide', 1780016, 35) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('take');
end;
repeat
wait(400+random(250));
AntiBan;
Until not IsUpText('air,') or (InvFull);
until(InvFull);
end;


This way when it sees the uptext of "hide" it will chose the open "take", meaning you will take the hide and not the hair. If that doesn't work, try this


Procedure PickUpHides;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'ake', 1780016, 35) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('hide');
end;
repeat
wait(400+random(250));
AntiBan;
Until not IsUpText('air,') or (InvFull);
until(InvFull);
end;


You might need to change the name at the end of your loop, or else it will continue to loop until the hair is gone, seeing as you made the uptext "air"

John
06-07-2012, 11:41 AM
First issue, is because your only using 'ake' which is all of the Pickupable :p items.
Change it to 'ide' and it should take the hide :)

Walking:

Begin
SetupScriptstuff;
repeat
Stuff;
MoreStuff;
Until(InvFull) or Not Logged in.
WalkToBank;
end.

Issue 3:
You'l have to make a quick procedure to open it then call sps again and start walking again.

Edit: Ninja'd

Crash Override
06-07-2012, 01:08 PM
Wow thanks.

It now picks up yak-hides. Sorry failed their.

I got a bit lost with your post John. I am only new to to this (last 7 hours)... How would you define what the gate is?

kitchenrange
06-07-2012, 06:21 PM
Your question about detecting when doors are open and closed is a hard one to solve.

I would suggest looking into dtms and from there, you will probably see how to use those to accomplish what you need.

Crash Override
06-07-2012, 09:03 PM
Alrighty thanks.