I'm working on a script and it walks by the dungeon symbol and it keeps thinking that the flag is still there because it sees the dungeon symbol or the arrow that is right next to it. Any solutions you guys can come up with for this?
I'm working on a script and it walks by the dungeon symbol and it keeps thinking that the flag is still there because it sees the dungeon symbol or the arrow that is right next to it. Any solutions you guys can come up with for this?
I thought about this the other day actually, that it could happen with how the current function is written.
Perhaps a length check would fix it?
I may have some time to look at it later.
for a rare occurrence like that why not use isMoving or something?
“Ignorance, the root and the stem of every evil.”
I was thinking about doing that Blumblebee, but then the script would wait for the character to stop moving entirely before continuing along the path. I always thought that was rather bottish, I suppose it will do for now though.
So I worked off of that idea and I came up with this. Seems to work pretty well. It also checks to see if the flag went off the map and acts accordingly—that was another problem I was having.
SCAR Code:{Credits to the creaters/updaters of FlagEx
(Wizzup? / WT-Fakawi / ZephyrsFury modified by N1ke!)
Used some of FlagEx}
Procedure BBFlag(Dist: integer);
var
TimeFS1, TimeFS2, Distance1, a, b: integer;
begin
Wait(500 + random(250));
MarkTime(TimeFS1);
While IsMoving do
begin
if(FindColor(a, b, 3026478, mmx1, mmy1, mmx2, mmy2))then
begin
Wait(50);
Distance1 := Distance(a, b + 14, MMCX, MMCY);
if(Distance1 <= Dist)then
Exit;
end else
if(not(IsMoving))then
Exit
else
if(not(OffMapFlag))then
Exit;
Wait(200);
MarkTime(TimeFS2);
if((TimeFS2 - TimeFS1) > 6000)then
if(Distance1 = Distance(a, b + 14, MMCX, MMCY))then
Exit;
if (Random(20) = 0)then
IdleTime(500, 1000, 0.01);
end;
end;
Last edited by bbri06; 05-11-2010 at 11:56 PM.
looks goodnice work
“Ignorance, the root and the stem of every evil.”
There are currently 1 users browsing this thread. (0 members and 1 guests)