SRL Archive - Research & Development Lounge

How does one go about Multithreading SIMBA?


Sir Ducksworthy

2012-03-13 16:08:39

Multi-Threading, Operating 2 Task's at the same time

This is the way I have had in theory


Left Hand script
———-
Find's Random event's constantly
Find's When HP Bar Goes up and Down
writes to a .txt information that can be read by brain

Brain Script
———–
Read's .txt'z Constantly and Comparing each one to eachother before sending out Commands to mouse, keyboard, like a normal script
but Ticked like a motor it only does one movement/click after not two and compares again before making another move

Right Hand Script
————-
Find's NPC Colours
Find's DTM's
Walk's SPS
Count's things etc etc
writes to left .txt

Does anyone else have a better method?

footballjds

2012-03-13 16:12:28

From: leetsxc
Multi-Threading, Operating 2 Task's at the same time

This is the way I have had in theory


Left Hand script
———-
Find's Random event's constantly
Find's When HP Bar Goes up and Down
writes to a .txt information that can be read by brain

Brain Script
———–
Read's .txt'z Constantly and Comparing each one to eachother before sending out Commands to mouse, keyboard, like a normal script
but Ticked like a motor it only does one movement/click after not two and compares again before making another move

Right Hand Script
————-
Find's NPC Colours
Find's DTM's
Walk's SPS
Count's things etc etc
writes to left .txt

Does anyone else have a better method?


your hp and randoms don't need checked every millisecond. a proper main loop will not last longer then a second. i believe multi-threading is kinda over-kill…
besides two simbas = tons of memory…

Sir Ducksworthy

2012-03-13 17:30:57

Its only an example of course of how it would work

jakeyboy29

2012-03-13 17:49:24

this can all happen in one open simba programme?

the flea

2012-03-14 04:25:44

From: jakeyboy29
this can all happen in one open simba programme?


in a way yes http://villavu.com/forum/showthread.php?t=51578 but this still isn't true multi threading… still more than enough though.

Daniel

2012-03-14 05:07:17

From: the flea
in a way yes http://villavu.com/forum/showthread.php?t=51578 but this still isn't true multi threading… still more than enough though.


Won't work. See this bug.

Sir Ducksworthy

2012-03-14 13:36:46

From: jakeyboy29
this can all happen in one open simba programme?

Yeh, you can run 3 thread's of scripts at once in one program

Flight

2012-03-14 21:20:10

It would sure be nice…

bg5

2012-03-15 00:03:49

From: leetsxc
Yeh, you can run 3 thread's of scripts at once in one program


Can 2 Simba's scripts use the same smart window at once?

Sir Ducksworthy

2012-03-15 03:27:53

Not currently, but I'm sure it could be added?

Daniel

2012-03-15 03:57:32

From: leetsxc
Not currently, but I'm sure it could be added?


Not with the way how SMART is currently loaded, and BenLand100 is unwilling to change this method.

m34tcode

2012-03-22 00:27:47

You dont need 2 scripts to access smart. You need one script to act as an intermediary bbetween smart and multiple other scripts.

The scripts can communicate between each other as far as I know. This was done in Scar using interscar messages

Im sure simba has the same capability. If not, it should be added

Sir Ducksworthy

2012-03-30 12:21:09

The problem is only 1 can read colors and stuff.. that's what would be needed in the, you literally need 3 scripts running to multi thread, it can of course be done on a normal rs client or inside a virtual machine but cannot be done with S.M.A.RT at the moment the way it is loaded etc