Also I see Ashaman88 is using it in his Ivy script atleast.
There used to be something meaningful here.
Not sure what's wrong, but it doesn't seem to work for some shorter links on github. Maybe I'm missing something, but if you just delete the proxy it works fine.
http://static.frement.net/proxy.php?...lude%20Rev.txt
“The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius
So, I been making my own scripts again and I screwed up something... Found out that one of the methods I made actually was included in it... You made me post again =P I am so glad that it got used, though honestly MastaRaymond was the one who gave me the real bones of the function. A question, is there a tutorial for SEWalker? I have been using it, but it uses global maps instead of custom ones, and I haven't done mapwalking since SPS first came out, so.. YesThank you for making me post again, Flight! And a badass include you have prepared.
I remember your function very well, I was, and still am impressed with it. I hope it's not an issue it was included in AeroLib; I made sure to fully credit you.
No I've not yet made any tutorials for using the include and especially none yet for SEWalker as that wasn't made by me. I don't know if I would qualify for making tutorials. But I can tell you how to do a custom map. Also it's important to remember SEWalker is designed object-oriented. Here's a short example:
Simba Code:program TestWalking;
{$DEFINE SEWalker}
{$i AeroLib/AeroLib.Simba}
Var
TargetTile : TPoint;
Walker : SEWalker;
begin
initAL();
TargetTile := point(245, 330);
// Loads a custom map named 'AbyssEdge' which as a length and width of 554/429
Walker.InitCustom('AbyssEdge', [554,429]);
Writeln('My current position is '+toStr(Walker.GetMyPos()));
if Walker.pointOnMM(TargetTile) then
begin
Writeln('Our destination is already nearby');
Walker.WalkToPos(TargetTile);
end else
begin
Writeln('We'#39're far from our destination, blind-walking...');
Walker.blindWalk(TargetTile);
end;
// Always free the SEWalker upon script termination
Walker.Free();
end.
That should give you a basic idea of how to use it.
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
Very nice. I suppose I mislead you earlier - I have been using the maps provided with SEWalker, and here's the relevant code to show you what I've been doin..
Simba Code:function WTTan: boolean;
begin
Result := True;
WalkMe.Walk([IntToPoint(4943, 3986), IntToPoint(4928, 3926)]);
while(IsPlayerWalking) do AntiBan;
end;
function WTBan: boolean;
begin
Result := True;
WalkMe.Walk([IntToPoint(4942, 3982), IntToPoint(4907, 4017)]);
while(IsPlayerWalking) do AntiBan;
Wait(randomrange(450, 750));
end;
In the main loop, I call:
Simba Code:WalkMe.init(['15_19', '16_19']);
Which, when I call GetMyPos, gives me the coords on the global map, instead of the areas I have defined. I was wondering why init didn't work like I thought it would. It seems I should invest my time in making my own maps =P
I've actually never used the normal map files, I've always created and walked via my own custom maps so I'm not sure what good I'll do here. I believe Olly or Slacky would be the absolute best people to talk to for the SEWalker.
Edit:
This is for everyone: I just pushed some small updates to GitHub and I've changed the revision number to an actual number which will basically be a count of how many times I make updates to GitHub. Since 0.4 was released I've pushed 2 updates therefore the main version of AeroLib is still 1.0 but the revision number is 2. This should make things a lot more clear every time I make adjustments and updates via GitHub.
Last edited by Flight; 11-30-2014 at 04:04 AM.
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
@ProphesyOfWolf
Only way with custom maps (atm) is to use a single map-image, you can't use multiple images. So you take the two pieces you want and combine em in to one piece then you use SEWalker.InitCustom with that custom map.
SEWalker.Init will always give you the global position.
Edit:
Also, you should just pass [250,250] to the last param in SEWalker.InitCustom that parameter has been added (by flight) for no reason, it doesn't do anything good.
@Flight why did you add that parameter? It's not used anywhere in SEWalker for custom maps. The constant (which you changed to a var) `SEW_Map_Size: TSize2D = [250,250];` is only used when assembling map-pieces which is only for "Init", and not for custom maps.
Be warned: If you do not pass 250,250 to InitCustom, you will break SEWalker if you have multiple walkers, where one of the walkers use Init(..). Flight, you should revert those changes you made to modify SEW_Map_Size (asap) that's a bad idea, and it does nothing good.
"We" can add a GetLocalPos() which does not compute the global position, that way they can use SEWalker.Init the way he wants to, can call GetLocalPos to get the local position based on the loaded maps.
Last edited by slacky; 11-30-2014 at 04:49 AM.
!No priv. messages please
There should be a tutorial for thisI have seen talk of people wanting to combine SRL-OSR with Aerolib, which to me makes sense. It only requires testing and revamping, because all of the old functions are still there are only very slightly off of what they should be. They should be combined, and a scripting reference created so people understand what's going on (we could write a script similar to JavaDocs and post it like the SIMBA scripting reference is). A lot of shoulds and coulds, yes, but OSR is a goldmine waiting to be tapped, and as a community we should focus on working with it.
If anything, a new include that combines SRL-OSR and SRL-6 should be created so that we can script for both versions of the game with the exact same include... the problem is that no one is willing to commit the time to do it (or they're like me and do, but lack the knowledge).
New to scripting? Procedures & Functions for Beginners
Do you use your computer at night? Just get f.lux
Last edited by slacky; 11-30-2014 at 04:51 AM.
!No priv. messages please
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
Nifty nifty! Things are rolling along nowI am not sure if this is just my computer or what, but sometimes Simba doesn't pair with SMART and it tries to open a new jar, which only works half of the time. So, one third of the time it works as expected, a second third it will bring up a java console and load a new smart, and the strangest third is when it tries to bring up a new window and then excepts. Maybe my computer is cursed =P
What could have failed can be explained like this:
Ans so the positionioning of the map pieces would go to hell, and the TopLeft coordinate stored would be very off.pascal Code:WalkerA.InitCustom('somemap',[10,10])
--> SEW_Map_Size := [10,10];
WalkerB.Init([map_pieces...])
--> call AssembleMaps([map_pieces...])
//AssembleMaps:
----> ...
----> Result := Point(LX * SEW_Map_Size.W, LY * SEW_Map_Size.H); //ref link 1
//instead of Result := Point(LX*250, LY*250); it will yield Result := Point(LX*10, LY*10);
//it also uses the SEW_Map_Size to position each piece properly on the output image:
----> ...
----> Pos := Point((SX-LX) * SEW_Map_Size.W, (SY-LY) * SEW_Map_Size.H); //ref link 2
//that would also fail since SEW_Map_Size was now equal [10,10]
[1]: https://github.com/J-Flight/AeroLib/...ker.simba#L219
[2]: https://github.com/J-Flight/AeroLib/...ker.simba#L227
Hmm.. "function AssambleMaps", see the mistake? :P
Edit:
@ProphesyOfWolf: Come to think about it, you can probably just do:
That should work like you want it to: GetMyPos should now return the local position based on the maps given, and not the global pos.Code:WalkMe.Init(['15_19', '16_19']); WalkMe.TopLeft := [0,0];
Last edited by slacky; 11-30-2014 at 05:25 PM.
!No priv. messages please
Last edited by slacky; 11-30-2014 at 06:27 PM.
!No priv. messages please
@Flight;
Could you please remove from SimbaEx:Simba Code:Procedure Pointer.Inc(Size: Int64);
It causes really weird errors when using Setlength within a function type. It can be removed with no errors and reflection won't run with it there. Thanks!
“The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
Already did, that's why I said to remove it@slacky;
“The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
There are currently 4 users browsing this thread. (0 members and 4 guests)