SRL Archive - MSI Archives

Teleporting before Path


YoHoJo

2011-05-07 15:08:21

Hey I haven't really thought about it much at all yet, but let's say I was doing X activity somewhere, and after I got a full load I needed to teleport first, and then walk the path to the bank, how would I do this?

Also, when walking back from the bank to where I was doing my activity I need to click an obstacle (ex door) to get back, how would I make script do that after walking the path.

Thanks :duh:

Rich

2011-05-07 15:17:52

Ignore this.

IPwnz

2011-05-07 15:20:31

From: YoHoJo
Hey I haven't really thought about it much at all yet, but let's say I was doing X activity somewhere, and after I got a full load I needed to teleport first, and then walk the path to the bank, how would I do this?

Also, when walking back from the bank to where I was doing my activity I need to click an obstacle (ex door) to get back, how would I make script do that after walking the path.

Thanks :duh:


I've thought about this before, and one idea I've had for it is to treat the teleport as an obstacle, so that MSI has to complete it before moving on (but that might just be crazy talk, let someone else chime in on this). As for how to handle obstacles (not just the teleporting but in general), you just have to split up the TPointArray in the script setup like so and MSI will look for the obstacles between the arrays :
Reflection := [
TPointArray([Point(2945, 3368), Point(2938, 3355)]),
//^^ inside Falador
TPointArray([Point(2920, 3355), Point(2909, 3357)])
];

Obstacles := [ OBS_FALADOR_WEST_CRUMBLING_WALL ];

Brandon

2011-05-07 15:43:25

Do Activity..

Click Teletab.

MeInBox.. if You are in the right area, then walk path to bank.. if not then wait 3 seconds for the character to appear and then walk path if in the area.. if still not in the area after time has passed, the teletab wasnt clicked.. so click and and repeat until in the specified area then walk to the bank..

When returning, walk path then FindObjectSimple().. TileToMSEx to click the object.. and continue walking.. Put it all in a loop and your fine. Obviously do some failsafes for object clicking.


Using Bitmaps or DTM's or TPA's.. I'd probably have four bitmaps.. or co-ordinates or Points or whatever you want.. maybe find four obstacles/objects..
Example: Top left corner, top right, bottom left, bottom right.. and check if your character is between those bitmaps/points/obstacles/objects.
If there, then walk path etc..

Bitmap the object or door or DTM the door to click it in order to walk back..

Echo_

2011-05-07 16:14:41

From: ggzz
Click Teletab.


Not everyone will be able to use teletabs.

mormonman

2011-05-07 16:29:03

From: IPwnz
I've thought about this before, and one idea I've had for it is to treat the teleport as an obstacle, so that MSI has to complete it before moving on (but that might just be crazy talk, let someone else chime in on this).


That was my first idea, and I honestly think its the best solution.

Nava2

2011-05-07 17:08:29

Probably your best bet is to treat it as an obstacle. The system was implemented for a reason.

I'm not sure if the obstacle system uses functional pointers though (so you can do custom procedures). TIAS!

Rich

2011-05-08 04:59:37

Sorry the sort of hijack the thread, but after setting the records of an obstacle in Obstacle.simba, and declaring them in Scripts.simba, is there anything that needs to be done, or does MSI figure the rest out?

Coh3n

2011-05-08 11:16:55

From: Rich
Sorry the sort of hijack the thread, but after setting the records of an obstacle in Obstacle.simba, and declaring them in Scripts.simba, is there anything that needs to be done, or does MSI figure the rest out?

You need to set which obstacle to solve in the TScript record, like IPwnz posted above.

@YoHoJo, like other people said, treating it as an obstacle would be your best bet I think.

NCDS

2011-05-08 11:22:49

From: Coh3n

@YoHoJo, like other people said, treating it as an obstacle would be your best bet I think.


That's what I would suggest as well.