SRL Archive - OSR Help

Should I use TPAs,Dtms, or ????


Shanked

2012-06-22 16:27:47

I'm making a script for a minigame and also does combat, but I have a few design choice questions.

1. For talking to an NPC to start the minigame, how should I go about it?
Currently I have it to use ACA and FindObjTPA to locate the NPC and talk to him, but it doesn't always find him on the first try due to issues being able to paint him well with ACA (His armor blends in with the surroundings unfortunately well), but I can make this work with decent consistency its just that at certain angles it doesn't always work, which irks me.

Would it be more viable to use a DTM since he doesn't move? And does simba automatically say, Take into account your camera angle when searching for a dtm or how would I account for that.

2. For Attacking an npc. Should I use the above ACA,FindObjTPA method or something else? This is probably the most viable solution for attacking I'd imagine or have seen so far.

BTW I apologize in advance if something in here is easily answered by another thread, I have looked through several tutorials as well as scripts, but this is just one of those "Fine tuning" answers I could not find elsewhere.


Another question: What is the absolute best way to interact with NPCs/monsters that is foolproof. (I noticed in one script that had to do with runespan there seemed to be some pretty advanced stuff going on, but i'm not experienced enough yet to completely decipher it)

Thanks in advance for your time!

Sirenia

2012-06-22 16:36:17

Learn TPA's for object finding on the mainscreen, they are awesome!
A dtm wont be reliable for moving objects

Shanked

2012-06-22 16:38:14

Ahh thats how I have it going now. Perhaps I can just fiddle with the colors more, and make it take a larger bound with a higher pixel match to really make it faster and more accurate.


Also, how about my question in regards to using a DTM for different camera angles on a stationary object

x[Warrior]x3500

2012-06-22 17:23:04

From: Shanked
Ahh thats how I have it going now. Perhaps I can just fiddle with the colors more, and make it take a larger bound with a higher pixel match to really make it faster and more accurate.


Also, how about my question in regards to using a DTM for different camera angles on a stationary object


1. i would stop using premade functions that have "obj" in them. example: findObj(). learn TPA/ATPAs yourself and you can accomplish much more with them.

2. dtms will never automatically take in to account your camera angle. most scripters will never use a dtm on the main screen (few exceptions, like detecting open doors) simply because it is less reliable than other methods. but dtms are great when it comes to items in the inv/bank. or when it comes to walking on the MM. i would recommend staying with TPA/ATPAs for any npc/object clicking.

Main

2012-06-22 17:36:26

wat minigame is it?

Shanked

2012-06-22 17:38:22

From: x[Warrior]x3500
1. i would stop using premade functions that have "obj" in them. example: findObj(). learn TPA/ATPAs yourself and you can accomplish much more with them.


Hmm i'll have to look into it. I was basically starting off by using the example from Yohojos color detection with the ACA involved. Is there any recommended tutorials for that or basically anything in the advanced scripting section? I was just assuming that the way he showed it was pretty efficient, but I would definitely want to streamline it


From: Main
wat minigame is it?


I'm doing troll invasion, I noticed powerbot had it, but we didn't and i said well this is probably one of the most useful mini games, might as well. and its finally coming out pretty decent. At least i didn't see one for us. I'm trying to stray away from powerbot, but that script is soooooo useful as well as great safe exp, I've actually figured out a few ways to improve over that one also in regards to using specials and the tables more efficiently… actually I'm gonna make it handle things better overall.

Main

2012-06-22 18:56:48

i tried to make it before, but the trolls has a lot of similar color to the background.

It can defintily be done, and when its done it'll be tons of xp.

Shanked

2012-06-23 05:27:49

Yeah definitely. I started an account using this method at level 1. I was able to get around 40 attack 20 str and 20 def on the first day without even constantly doing it. I couldn't even abuse the tables/spec as well as you can at higher levels. With the no risk leveling + no player interaction im shocked that we dont have one already. Thus i am excited to have that be my first contribution to the community