Begin
Startscript;
if(not(findbitmap(Logincheck,x,y)))then
begin
LoginToGame;
end.
just doesent work.. started typing my password into chat
or is there a SRL commands to check this? im a bit new to srl :O
Printable View
Begin
Startscript;
if(not(findbitmap(Logincheck,x,y)))then
begin
LoginToGame;
end.
just doesent work.. started typing my password into chat
or is there a SRL commands to check this? im a bit new to srl :O
I'm not sure what you are trying to do, please explain again.
There are SRL commands for checking whether you are logged in, for logging in, for logging out, for switching players etc in SRL>SRL>core>login.scar.
:DCode:If not(Loggedin)then
LoginPlayer
since you're new to SRL, i think this extra information could be useful
call a procedure called NumberOfPlayers(
this is to get the array length, without it, you would get RunTime errorsSCAR Code:NumberOfPlayers(1)
next you have to set the username and password
SCAR Code:players[0].name:='usernamehere';
players[0].pass:='passwordhere';
so the end script would be something like this
Code:{.include SRL\SRL.scar}
begin
NumberOfPlayers(1);
Players[0].name := 'UsernameHere';
Players[0].pass := 'PasswordHere';
if(not loggedin)then
loginplayer
Yak I have a quick question about a runtime error I keep getting. Im asking you this because you said something about a runtime error in your previous post. Im using Mouse procedures, but instead of numbers like this:
Mouse(x,y,0,0,true)
Im doing this:
Mouse(MA[random(3)],MB[random(3)],5,5,true)
If you dont know what that is, instead of using numbers Im using arrays. The thing is that sometimes I will get a runtime error right before a procedure like that, but sometimes I dont get a error at all.
What do you think the problem is?
the problem is that your arrays dont include an index for every number from 0 to 2, those are the numbers that random(3) will return. make sure the randomness will always be withing the bounds of your array.
I fixed it. I made up variables like a,b,c,d etc...
and made them integers.
And then my mouse procedure changed from this:
To this:SCAR Code:Mouse(A1[random(3)],B1[random(2)],0,0,true)
SCAR Code:a:= random(3)+1
b:= random(2)+1
Mouse(A[a],B1[b],0,0,true)
I read your post and I looked at my "[random(3)]" and thought of a way to change it.
And it worked, no more runtime error :D
Thanks.
~jR
-Lol now when im looking at my first post i must have been drunk or something :D
-i'we looked through srl/srl/core/inventory.scar. but i dunno which one i should use for checking if inventory is full heres the code:
-not sure if its like that fix me pls if im wrong :OCode:Procedure Cutyew;
begin
repeat
until(inv = InventoryFull: Boolean;)
end;
It would be like this
Procedure Cutyew;
begin
repeat
until(InvFull);
end;
Yes InvFull is a boolean function that will check if the inventory is full. Function meaning that it returns a value, boolean meaning that value is true or false. So when you use InvFull in the until, it represents true or false, so you don't have to do InvFull=true or anything like that.
thank you all helped me alot :D if ur wondering im making a auto yew cutter... hopefully i get it finished.. lol
- typing this from school.. im way ahead of everyone IT lol...