Only attacking an npc in one side of the screen?
Checking if an npc is dead?
Running back to the same ranging spot?
Could someone explain briefly how i would go about doing those things?
Only attacking an npc in one side of the screen?
Checking if an npc is dead?
Running back to the same ranging spot?
Could someone explain briefly how i would go about doing those things?
1: Dunno what you mean by that.
2: See if you're character is animating, or use InFight(Not Reccomended), or make your own health bar checking function.
3: DDTMs. Or something else with mini-map capabilities. (Bitmaps, DTMs, TPAs)
Just scan one side of the screen.Only attacking an npc in one side of the screen?
The NPC is dead if either the health bar is not found anymore, or if you stopped attacking, you can write a function for either ;]Checking if an npc is dead?
I'd suggest to find that point on the minimap and click there, but it would really depend on the place where you want to train.Running back to the same ranging spot?
doneCould someone explain briefly how i would go about doing those things?
~caused
For the first one,
(From: http://villavu.com/forum/showthread.php?t=32490 (VERY useful))
When searching for colors, you specify where to search for. Usually people look for the whole Main Screen (MS), but if you only wanted to search for the right half of the screen, you'd do something like..
SCAR Code:FindColor(x, y, 123456, MSCX, MSCY, MSX2, MSY2);
//Actually, I think it'd be MSCX, 0, MSX2, MSY2..
That'd start from the top middle, and go down to the bottom right of the screen, effectively searching the whole right half.
To check if it's dead, that's a bit harder. If you're in an aggressive area, then it's even more difficult. If not, then you can just see if your in a fight or not. (There's a function in SRL called InFight I think. And you could just do a check every few seconds to see if you're in a fight or not.)
TPAs should suffice. Search for tutorials.Very useful. And if it's only a single tile that you can stand on for it to be a safe spot, then you'd probably want to have a main screen click, as well. It's probably near some skeletons or a wall or something, so it should be pretty simple with some basic math to find it effectively. And make sure you have plenty of fail safes for this. (HP check, eating, teleporting if necessary..)
Last edited by i luffs yeww; 02-25-2010 at 01:35 AM.
thanks whilst your here I might ask one more questionif I make a login procedure, how in my script can I then check if the accounts logged in and if not point it back to the start of the script where the login procedure is ? Could you show me with an example please, I've been trying to get my head around this today :s
You could use srl functions for thatthanks whilst your here I might ask one more question if I make a login procedure, how in my script can I then check if the accounts logged in and if not point it back to the start of the script where the login procedure is ? Could you show me with an example please, I've been trying to get my head around this today :s
SCAR Code:if not loggedin then
loginplayer;
You can use SRLs. Just do LoginPlayer.And there's a function called LoggedIn to check if you're logged in.
@lewis_, try not to double post.No worries now, but if it persists, there may be consequences.
@caused, doesn't LoginPlayer already use LoggedIn? You can just do LoginPlayer, and if you're logged in it'll exit, I think.
There are currently 1 users browsing this thread. (0 members and 1 guests)