SRL Archive - Reflection Development

Reflection Progress


Drakan

2010-05-11 22:41:09

Ok, I know everyone has been HEARING that we are making progress but we haven't really SHOWN any progress. Well Benland100 has been helping me round the clock for the past three days and he has fixed many things. We have a good solid base coming in and we're still working on more. So here it is, our progress:

http://blanddns.no-ip.org:81/repos/reflection/

It doesn't look like much, but the main functions we need are in there (TileToMS, TileToMM) and all working. We are currently working on Option Menus (R_ChooseOption). We got TileToMM working to be able to click the tiles from any angle too! :) No more need for facing north all the time!

I would NOT recommend trying to make scripts with this quite yet since a lot of this is subject to change. Likewise, for NOW, Ben and I are the only ones who will be allowed to commit to this svn, until we get a good solid base in. So bear with us, we are working and getting things done. Heres your proof :).

Thanks for your patients!
~Drags111

Currently Working On:
  • Banking and the likes.[easy]
Recently Accomplished:
  • TileToMS
  • TileToMM
  • Many other basic functions…
  • Added Characters.simba and Interfaces.simba. [5/12/10]
  • R_ChooseOption
  • Updater
  • Path Maker
  • Inventory Items
  • Interfaces


EDIT [5/17/10]:
Heres the latest lowdown on reflection: It's ready to go! After countless wasted hours working on the updater and getting the reflection include ready to go, reflection is now officially ready. Thanks to Benland100 and his fixes and updater base, our hooks can now be updated in less than a minute from the time one of us notices they need to.

Now, with that being said, until the updater has passed the test on the next runescape update (all the hooks working), I will not be releasing it quite yet. It would cause more hurt then help if something was screwed up. Don't worry though, I plan on releasing it as soon as it is ready to be out in public ;)

So go! Go make those reflection scripts and stuff.

Coh3n

2010-05-11 22:44:57

Very nice! Way to go guys :D

E: Is there a reason you have TTile = TPoint? Why not just use a TPoint like before?

JPHamlett

2010-05-11 23:03:12

i may have fixed r_chooseoption but im to tired to test right now and im ot at the computer ill test it tomm

BenLand100

2010-05-11 23:07:55

From: Coh3n
Very nice! Way to go guys :D

E: Is there a reason you have TTile = TPoint? Why not just use a TPoint like before?

Because it is better this way. You might as well ask why not call the type 'Apple' and the answer would be that its not an Apple, it's a Tile.

Coh3n

2010-05-11 23:09:04

From: BenLand100
Because it is better this way. You might as well ask why not call the type 'Apple' and the answer would be that its not an Apple, it's a Tile.

Fair enough.

Drakan

2010-05-12 06:23:14

From: J_Pizzle
i may have fixed r_chooseoption but im to tired to test right now and im ot at the computer ill test it tomm


You got all the new hooks for it? :P Send me what you got so I can look at it.

Narcle

2010-05-12 07:13:36

TTile > TPoint

It should be based fully on TTile. Objects and npcs, etc positions are not integers they are extended points.

If you see an object perfectly center in a spot its really at x.5, y.5 while x.0, y.0 is actually just the line between two tiles just like a grid.

mastaraymond

2010-05-12 07:54:30

From: Narcle
TTile > TPoint

It should be based fully on TTile. Objects and npcs, etc positions are not integers they are extended points.

If you see an object perfectly center in a spot its really at x.5, y.5 while x.0, y.0 is actually just the line between two tiles just like a grid.

Then it should be a TBox rather than an extended, or am I mistaken here?

Baked0420

2010-05-12 08:03:29

no all you would need to do is change:

(Assuming this is how TTile is made)

type
TTile = record
x, y: Integer;
end;

to


type
TTile = record
x, y: Extended;

right? You wouldn't have to use a TBox if you do what Narcle said.

mastaraymond

2010-05-12 08:12:34

From: Baked0420
no all you would need to do is change:

(Assuming this is how TTile is made)

type
TTile = record
x, y: Integer;
end;

to


type
TTile = record
x, y: Extended;

right? You wouldn't have to use a TBox if you do what Narcle said.

Was aiming at the fact that a TTile still only returns the center point, not the entire surroundings of the Tile

Baked0420

2010-05-12 08:14:09

well wouldn't the entire surrounding of the tile be from (X.0, Y.0) to (X.9, Y.9) (with 9 repeating being the furthest you can get)

Drakan

2010-05-12 08:49:53

Well the way benland has it set up is you don't need to do Tile.0.5 because in TileToMSEx you do the xOff and yOff. Thats how the math is done inside the function anyway. It takes into account the xOff and yOff. Unless you mean the hooks for thinks like getting NPC's position is extended… I'll look into this.

bbri06

2010-05-12 10:07:43

Thank you so much for fixing this. I'm practically orgasming with happiness.

Edit: Now please make it work for scar :P

Drakan

2010-05-12 10:36:35

From: bbri06
Thank you so much for fixing this. I'm practically orgasming with happiness.

Edit: Now please make it work for scar :P


Use simba. SRL 5 is going to be all Simba anyway… So why use scar?

Coh3n

2010-05-12 10:41:13

From: drags111
Use simba. SRL 5 is going to be all Simba anyway… So why use scar?

Not to mention everything seems to work better in Simba. :)

Drakan

2010-05-12 10:43:23

From: Coh3n
Not to mention everything seems to work better in Simba. :)


Exactly :) And its updated regularly, and they do more live updates, so whenever there needs to be a change or a fix they can do it in 10 minutes and update it :)

BenLand100

2010-05-12 12:54:43

From: Narcle
TTile > TPoint

It should be based fully on TTile. Objects and npcs, etc positions are not integers they are extended points.

If you see an object perfectly center in a spot its really at x.5, y.5 while x.0, y.0 is actually just the line between two tiles just like a grid.

Don't use floats, use pixel coordinates (tile coordinates * 128) if you need more accuracy. The client doesn't understand floats.

bbri06

2010-05-12 17:57:30

Oh, I didn't know that SRL 5 was going to be only Simba. I'll check it out, thanks.

Edit: Oh, Simba scripting is nearly the exact same as SCAR. How nice.

Narcle

2010-05-12 18:53:58

From: BenLand100
Don't use floats, use pixel coordinates (tile coordinates * 128) if you need more accuracy. The client doesn't understand floats.


Yes but the best way to make a system that understands a tile is 128pixels across in Pascal script? x.1-128?

i luffs yeww

2010-05-12 22:30:47

"Thanks for your patients!"

patience*

:3

TRiLeZ

2010-05-12 23:21:18

From: drags111
Unless you mean the hooks for thinks like getting NPC's position is extended… I'll look into this.


NPC pos = int, int

Narcle

2010-05-13 06:15:57

From: TRiLeZ
NPC pos = int, int


Not true, look at a 1 tile npc then a 4 tile npc. I pushed for a TTile system so my reflection fighter could fight "4 tile npcs" - the npcs that sit in the center of 4 tiles not 1.

Baked0420

2010-05-13 09:35:01

I don't know, since I never looked into it, but from playing the game, I think the NPC's that take up four tiles, I think the client would probably see it as they are on one tile, because the drop goes always to the same tile (I wanna say the Northwest tile, but can't remember), so I'm guessing the client probably see's the NPC on the tile where the drop goes. This is only my theory from playing though, since the drop always goes to the same tile, I could be wrong since I never read the JAva coding about TTiles and NPC's.

Sir R. M8gic1an

2010-05-13 10:12:54

From: Narcle
Yes but the best way to make a system that understands a tile is 128pixels across in Pascal script? x.1-128?


0-127 I would guess?

~RM

Drakan

2010-05-13 10:16:47

Alright guys, big update comin in. Ben fixed GetMenuText, which allowed me to fix ChooseOption and UpText, and a WHOLE bunch more. Once i finish up Login then ill be ready to release!

Sir R. M8gic1an

2010-05-13 10:18:11

From: drags111
Alright guys, big update comin in. Ben fixed GetMenuText, which allowed me to fix ChooseOption and UpText, and a WHOLE bunch more. Once i finish up Login then ill be ready to release!


Yay for reflection!

~RM

Coh3n

2010-05-13 10:57:05

Awesome job guys! I think SRL's going to get a lot more active again once registration gets reopened. :)

Reflection + Simba + SRL 5 = Win

Home

2010-05-13 15:14:22

Yay guys! :)


~Home

Drakan

2010-05-13 19:51:22

Thanks for all your support! At the moment, Benland and I are BOTH making updaters (of course his will be more reliable :P) So that we can always keep Reflection updated. And for those of you that have wanted this for a long time, Ben is going to make his updater [at least semi] public! Progress is being made and things are getting done. Thanks for your patients and support!
~Drags111

mormonman

2010-05-13 20:11:07

Wow, I missed out on all of this…blasted final exams. Sorry I couldn't help you guys out.

MylesMadness

2010-05-13 20:12:44

From: drags111
Thanks for all your support! At the moment, Benland and I are BOTH making updaters (of course his will be more reliable :P) So that we can always keep Reflection updated. And for those of you that have wanted this for a long time, Ben is going to make his updater [at least semi] public! Progress is being made and things are getting done. Thanks for your patients and support!
~Drags111
So three people have(or will have I guess) updaters now at SRL?

Camaro'

2010-05-13 20:43:05

From: MylesMadness
So three people have(or will have I guess) updaters now at SRL?


4, I have one too. Only around 20 hooks at the moment.

Method

2010-05-13 23:15:53

From: drags111
Thanks for all your support! At the moment, Benland and I are BOTH making updaters (of course his will be more reliable :P) So that we can always keep Reflection updated. And for those of you that have wanted this for a long time, Ben is going to make his updater [at least semi] public! Progress is being made and things are getting done. Thanks for your patients and support!
~Drags111


I'm fairly surprised that Ben is actually working on this with you guys, but things should definitely move a lot faster with him helping out.

kingarabian

2010-05-14 01:44:14

Can your guys up-loaders get hooks when we need them?

mastaraymond

2010-05-14 05:16:28

While we're at it, could someone explain why they keep their updaters private? Is there any good reason, or is just so they can be the cool guys cuz they got zhem updaters?

Gu3st...

2010-05-14 05:46:18

From: mastaraymond
While we're at it, could someone explain why they keep their updaters private? Is there any good reason, or is just so they can be the cool guys cuz they got zhem updaters?
Not that I am an active reflection dev/user but I agree with raymond here… wouldn't it be better if all of you had the updaters?

Drakan

2010-05-14 06:38:14

Thats why i said we're going to release them lol. Ben has already uploaded his to the SMART svn :P And people keep them private because they are a lot of hard work, and they don't want people either a) leeching straight off their hard work, b) copying their updater and taking credit, or c) because they are greedy. :P

Camaro'

2010-05-14 07:02:34

From: mastaraymond
While we're at it, could someone explain why they keep their updaters private? Is there any good reason, or is just so they can be the cool guys cuz they got zhem updaters?


I'll release it when i get home. ;)

Does around 10 hooks. But doesn't download the latest jar for you. You must put it in the src folder. good for learning purposes I suppose, maybe some one could expand mine and make it load the runescape jar when its out of date, then some one could add a few more hooks. Interesting, should of released it earlier.

I'll put it on a svn ;)

Maybe make a development thread, there's only one problem, I'm sure my code is not as efficient as it should be. We will see ! If all the devs could have a beast updater, we would barely have to wait for reflection hooks ever again ( enough people to add the hooks to hooks.scar ) :p

Drakan

2010-05-17 06:51:10

K guys, the time is here! Go play with reflection :D Use the new SVN though! ;)

MylesMadness

2010-05-17 07:05:33

From: drags111
K guys, the time is here! Go play with reflection :D Use the new SVN though! ;)
Are objects working? What about NPCs?

Drakan

2010-05-17 07:09:55

No, but we (ben and I) are debating about putting those in. But whatever happens can be easily added without affecting the functionality of other things.

JPHamlett

2010-05-17 07:24:09

From: MylesMadness
Are objects working? What about NPCs?


NPcs work with the correct hooks

and objects and grounditems i amw orking on when i hvae time im VERY busy lately

Naike

2010-05-17 09:44:28

Perfect timing boii's ;D

marpis

2010-05-17 10:58:53

But we still need to figure TileHeight our selves when using TileToMS?
Anyways good job! Now I can get started with new scripts :)

JPHamlett

2010-05-17 15:45:14

From: marpis
But we still need to figure TileHeight our selves when using TileToMS?
Anyways good job! Now I can get started with new scripts :)


no you dont put it as 0 it works for me

Drakan

2010-05-17 16:27:03

From: marpis
But we still need to figure TileHeight our selves when using TileToMS?
Anyways good job! Now I can get started with new scripts :)


Tile height is just the number of pixels off the ground ;) Say, for example a tree. A tree is tall, so probably like 100 px of the ground. If your camera angle was high, then sure, it will probably click it. But if your camera angle was at its lowest then TileToMS would click the ground (if tileheight was 0).

Drakan

2010-05-17 23:30:49

Ok, i hooked all the NPC hooks today, so tomorrow I will build the NPC finding crap. Goodnight.

marpis

2010-05-18 01:39:21

From: J_Pizzle
no you dont put it as 0 it works for me


From: drags111
Tile height is just the number of pixels off the ground ;) Say, for example a tree. A tree is tall, so probably like 100 px of the ground. If your camera angle was high, then sure, it will probably click it. But if your camera angle was at its lowest then TileToMS would click the ground (if tileheight was 0).


:duh:

Ofcourse… Stupid me. This is how it has always been.

Tickyy

2010-05-18 06:44:52

So its finally fixed and ready to go? Well, once i've got my network on home again i'll start scripting again :).

JPHamlett

2010-05-18 07:28:21

From: Tickyy
So its finally fixed and ready to go? Well, once i've got my network on home again i'll start scripting again :).


Its almost ready to go we need to do objects and grounditems still


ive just been so busy latly with school since theirs only 18 days left

Seroko

2010-05-18 13:48:46

I just got done with my finals and renewed my Runescape and hopefully getting back into the scene for a few months myself if I may be of any assistance.

Drakan

2010-05-19 17:13:07

Updates: GetNPC's is going well. Things are moving along, but I have Behind The Wheel now (so i can get my license.) http://pastebin.com/TJsP8BiH

mormonman

2010-05-19 18:17:03

I may be wrong, but can't we somehow hook the models of objects and npcs with reflection? I know that Kosaki did it…maybe someone could talk to him about it.

TRiLeZ

2010-05-19 18:58:18

From: mormonman
I may be wrong, but can't we somehow hook the models of objects and npcs with reflection? I know that Kosaki did it…maybe someone could talk to him about it.


We could. Although, last time I tried it, it didn't work (for npcs).

mormonman

2010-05-19 22:30:52

I personally like to be as accurate as possible…and models would help with that.

Drakan

2010-05-19 22:34:28

What I'm having trouble with is getting the InFight boolean to work for NPCs. I have the hooks for LoopCycle, and it used to be that if the LoopCycleStatus was > LoopCycle, you were in a fight. Now it doesn't seem that way..

Baked0420

2010-05-19 23:32:31

http://dev.rsbot.org/filedetails.php?repname=rsbot&path=%2Ftrunk%2Fsrc%2Forg%2Frsbot%2Fscript%2Fwrappers%2FRSCharacter.java

I think RSBot is outdated (big thread of spam says it's outdated), but that's what they have also, the LoopCycleStatus > LoopCycle.

EDIT: I clicked their tab SVN, I don't know if that's their latest, but I didn't know the link to use for Tortoise, I tried the url to the SVN online but it didn't work, so I used the online SVN for what I posted above, it said Rev 27 I think.

Drakan

2010-05-20 07:13:17

Yah, well when i debug it seems that the LCS is always less than the LC, even when in combat..

LoopCycle: 17064
LoopCycleStatus: 17049
And its always that close… (idk about EXACT number, but relatively.) And even when interacting with an NPC like talking, its like that. So I don't get it.

Sir R. M8gic1an

2010-05-20 07:16:35

From: drags111
Yah, well when i debug it seems that the LCS is always less than the LC, even when in combat..

LoopCycle: 17064
LoopCycleStatus: 17049
And its always that close… (idk about EXACT number, but relatively.) And even when interacting with an NPC like talking, its like that. So I don't get it.


if LoopCycle - LoopCycleStatus < 30 then
Fight := True;

… ?

~RM

Narcle

2010-05-20 08:08:31

Could you share the LoopCycle hooks? I was going to mess around with it a bit, see if there is a pattern.

Drakan

2010-05-20 16:26:57

From: Rasta Magician
if LoopCycle - LoopCycleStatus < 30 then
Fight := True;

… ?

~RM


But it would always return true because even if its not in a fight, the LoopCycleStatus is like that. (Just regular interacting).

And narcle, I added them to the hooks.scar in the SVN. http://blanddns.no-ip.org:81/repos/reflection/

Drakan

2010-05-20 17:02:54

K, So RSBot had a different hook for it than KBot. So i tried it. It worked once, randomly, the rest of the time it spit out -1000.

Shady?

2010-05-20 18:11:54

Any news on how is J_ doing with objects/grounditems?

Coh3n

2010-05-20 18:14:34

From: Shady?
Any news on how is J_ doing with objects/grounditems?

Objects/ground items are one of the easiest part in color scripting IMO. To be quite honest, all that's really needed is walking and TileToMS, and any runescape script can be made near flawless.

Shady?

2010-05-20 18:27:08

From: Coh3n
Objects/ground items are one of the easiest part in color scripting IMO. To be quite honest, all that's really needed is walking and TileToMS, and any runescape script can be made near flawless.


I fully agree :) i just wanted to know:P

Coh3n

2010-05-20 18:28:25

From: Shady?
I fully agree :) i just wanted to know:P

:p

It does make things even easier thought, but all of reflection is like that.

JPHamlett

2010-05-20 18:53:05

From: Shady?
I fully agree :) i just wanted to know:P


i ahvnt had anytime to really do it ill pull an all nighter for you guys tomm and try to get it working again

Seroko

2010-05-20 19:31:01

TTile = TPoint;

I saw this and nearly cried… What in tha…just wha..

TTile is an extended not an integer.

Drakan

2010-05-20 19:38:55

It's an integer.?

Seroko

2010-05-20 19:39:44

From: drags111
It's an integer.?


Thats what you all did to it, but it was originally used as an extended that way you can have more precision for clicking multi-square monsters and such.

Drakan

2010-05-20 19:40:21

You still can. TileToMSEx has the xOff and yOff..

Seroko

2010-05-20 19:47:01

From: drags111
You still can. TileToMSEx has the xOff and yOff..


ugh, but using extended positions wasn't just for clicking the mainscreen to me at least. Maybe I've just been out of it too long but it seems like reflection has went way backwards since I last was around, and not just in the outdated/changes breaking stuff way

Drakan

2010-05-20 21:48:13

From: Seroko
ugh, but using extended positions wasn't just for clicking the mainscreen to me at least. Maybe I've just been out of it too long but it seems like reflection has went way backwards since I last was around, and not just in the outdated/changes breaking stuff way


Look, I've been gone for over a year and reflection has been broken over a year. I'm working in all my spare time (along with other people) to fix this crap up, get a working updater, make reflection usable again, and all I get is people complaining about it not being good enough! If you want to contribute, contribute. If you have suggestions, post some code. But don't stand there and insult our work.

Seroko

2010-05-21 05:25:42

From: drags111
Look, I've been gone for over a year and reflection has been broken over a year. I'm working in all my spare time (along with other people) to fix this crap up, get a working updater, make reflection usable again, and all I get is people complaining about it not being good enough! If you want to contribute, contribute. If you have suggestions, post some code. But don't stand there and insult our work.


Sorry if you felt I was insulting your work, I was looking at what needed to be done and saw that and :(

Don't worry I'm not going to stand here and insult your work, I'm hard at work myself trying to sort out whats changed with reflection and assist in fixing it.

Narcle

2010-05-21 06:07:20

From: Seroko
Sorry if you felt I was insulting your work, I was looking at what needed to be done and saw that and :(

Don't worry I'm not going to stand here and insult your work, I'm hard at work myself trying to sort out whats changed with reflection and assist in fixing it.


Well soon as NPCs are set (which I still haven't messed around with yet) I'm going to test the offset. I talk to Ben a little and it makes sense. Technically the objects aren't in a extended position but rather its by pixels. In any case I could make one that uses extended instead if needed for myself.

Drakan

2010-05-21 06:50:14

From: Narcle
Well soon as NPCs are set (which I still haven't messed around with yet) I'm going to test the offset. I talk to Ben a little and it makes sense. Technically the objects aren't in a extended position but rather its by pixels. In any case I could make one that uses extended instead if needed for myself.


exactly :P And its ok sereko, I just kinda blew up.. Stressful day.

Bad Boy JH

2010-05-21 08:39:32

Can I give a wholehearted, Well Done and Thanks, to the guys who have fixed reflection! I know its not done yet, but It will make my scripts squillions of times better, cause now i can use reflection walking…cause i FAILED at colour walking…

Narcle

2010-05-21 14:15:26

Btw drags u did something kinda odd. Noticed yesterday while scripting had to add a function…

You have PointToTile as PointToTile(x, y): TTile; instead of as PointToTile(T: TPoint): TTile; and Tile(x, y): TTile; is completely removed. I thought it was odd that Tile() wasn't in there anymore when you even use it in your Pather Maker tool?

Drakan

2010-05-21 16:14:34

Yes, I removed it last night because of some conflicts of naming. It was irritating me, so i need to change it in my pathmaker. And the reason I have xy is because you would have to then do PointToTile(Point(12, 34)); which seems very redundant/overkill.

EDIT: Ok, I finished up most of the Player hooks today, so when I get back tonight I will finish up characters.simba.

Narcle

2010-05-21 17:30:17

From: drags111
Yes, I removed it last night because of some conflicts of naming. It was irritating me, so i need to change it in my pathmaker. And the reason I have xy is because you would have to then do PointToTile(Point(12, 34)); which seems very redundant/overkill.

EDIT: Ok, I finished up most of the Player hooks today, so when I get back tonight I will finish up characters.simba.


PointToTile is useful because you can use it for a TPA array its easier to work with - ie InvertTPA. Also the name doesn't even make sense; 'Point' as in "TPoint" I would assume its a TPoint To TTile conversion not a x, y to TTile conversion… Horrible standards if you ask me. :P

Edit:
Also I think there is a memory leak somewhere. Simba was using 512mb of ram O.o

Gu3st...

2010-05-21 17:44:23

From: Narcle
PointToTile is useful because you can use it for a TPA array its easier to work with - ie InvertTPA. Also the name doesn't even make sense; 'Point' as in "TPoint" I would assume its a TPoint To TTile conversion not a x, y to TTile conversion… Horrible standards if you ask me. :P

Edit:
Also I think there is a memory leak somewhere. Simba was using 512mb of ram O.o
It loads runescape.jar and all the script files while using smart :)
I also thought the same, but Wizzup explained it for me

Drakan

2010-05-22 08:54:43

K, So i've been lookin into ground objects and stuff. Havn't really made that much progress because they are done a lot differently than before. I'm going to look at RSBot's source.

Drakan

2010-05-22 11:54:14

Just refreshing this to the top since a LOT of things were moved to the dev section. It's gonna be a busy day for me. Work, Drivers License test, Prom.

mastaraymond

2010-05-26 04:37:17

GetMe.Infight seems to work allright :o.

JPHamlett

2010-05-26 07:34:41

if i remember right all that we need to do is grounditems and then everything should be fixed


not sure on that though

Narcle

2010-05-26 12:53:45

From: J_Pizzle
if i remember right all that we need to do is grounditems and then everything should be fixed


not sure on that though


They did a big change yesterday. Tiles are now 512 pixels instead of 128 pixels. I've gotten map walking and GetMyPos working, but the math for TileToMS has changed - I can't quite figure out the new equation.

marpis

2010-05-26 15:31:21

From: Narcle
They did a big change yesterday. Tiles are now 512 pixels instead of 128 pixels. I've gotten map walking and GetMyPos working, but the math for TileToMS has changed - I can't quite figure out the new equation.


Omg ffs! First people fight months to get TileToMS working, then it works for a week and is outdated again… Damn jagex!

JPHamlett

2010-05-26 15:47:09

ill work on it later maybe can get it working^^

masterBB

2010-05-26 16:08:04

[PHP] pixelX:= (tile.x - SmartGetFieldInt(0,hook_static_BaseX) + offX) * 512.0;
pixelY:= GetTileHeight(tile) - height;
pixelZ:= (tile.y - SmartGetFieldInt(0,hook_static_BaseY) + offY) * 512.0;
z:= rd.zOff + ((rd.zX * pixelX + rd.zY * pixelY + rd.zZ * pixelZ) / 262144.0);
if ((z < r.zMin) or (z > r.zMax)) then
exit;
x:= r.xScale * (rd.xOff + ((rd.xX * pixelX + rd.xY * pixelY + rd.xZ * pixelZ) / 262144.0)) / z;
y:= r.yScale * (rd.yOff + ((rd.yX * pixelX + rd.yY * pixelY + rd.yZ * pixelZ) / 262144.0)) / z; [/PHP]

Simply replacing these numbers won't work. Is the render data also outdated?

E: Cohen says the viewport hooks are outdated as well. Maybe that is the problem..

TRiLeZ

2010-05-26 17:56:08

New TileToMS method (from the RS client):

final void IA(int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt)
{
int i = this.G.f + (this.G.j * paramInt1 + this.G.o * paramInt2 + this.G.d * paramInt3 >> 14);
if ((i < this.Q) || (i > this.O))
{
paramArrayOfInt[0] = (paramArrayOfInt[1] = paramArrayOfInt[2] = -1);
return;
}
int j = this.L * (this.G.e + (this.G.l * paramInt1 + this.G.k * paramInt2 + this.G.g * paramInt3 >> 14)) / i;
int k = this.kb * (this.G.n + (this.G.i * paramInt1 + this.G.h * paramInt2 + this.G.m * paramInt3 >> 14)) / i;
if ((j >= this.K) && (j <= this.U) && (k >= this.eb) && (k <= this.F))
{
paramArrayOfInt[0] = (j - this.K);
paramArrayOfInt[1] = (k - this.eb);
paramArrayOfInt[2] = i;
return;
}
paramArrayOfInt[0] = (paramArrayOfInt[1] = paramArrayOfInt[2] = -1);
}

Old:

final void IA(int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt)
{
int i = this.w.k + (this.w.j * paramInt1 + this.w.i * paramInt2 + this.w.r * paramInt3 >> 15);
if ((i < this.W) || (i > this.S))
{
paramArrayOfInt[0] = (paramArrayOfInt[1] = paramArrayOfInt[2] = -1);
return;
}
int j = this.U * (this.w.l + (this.w.o * paramInt1 + this.w.t * paramInt2 + this.w.n * paramInt3 >> 15)) / i;
int k = this.C * (this.w.s + (this.w.q * paramInt1 + this.w.m * paramInt2 + this.w.p * paramInt3 >> 15)) / i;
if ((j >= this.T) && (j <= this.ib) && (k >= this.gb) && (k <= this.R))
{
paramArrayOfInt[0] = (j - this.T);
paramArrayOfInt[1] = (k - this.gb);
paramArrayOfInt[2] = i;
return;
}
paramArrayOfInt[0] = (paramArrayOfInt[1] = paramArrayOfInt[2] = -1);
}

Not much has changed, we just need BenLand for the shift lefts and rights.

Drakan

2010-05-26 21:32:19

Ben has done it again: Made me feel dumb… Ok so it wasn't a big deal, the hooks are fine, everything is now working. I will update the svn soon, but heres a quick lowdown. So all dimensions were increased by 4 times what they were before. These means the average tileheight is about -1200 instead of -300, character heights can be as high as 800, etc. All the *128's now have to be changed to *512. The >> only had to go from 15 to 14 which ben explained to me was the same thing as div 2^15 to 2^14. Easy stuff. Ill be doing the code fixes and uploading. Thanks ben.

Drakan

2010-05-26 23:11:21

Also, Objects seem to have wrong hooks atm. Idk what's up, but it will be fixed.

mormonman

2010-05-27 00:00:26

I still think you should work on the modeling stuff…I would help but I'm just worthless.

bbri06

2010-05-27 00:10:49

What do you mean by modeling stuff, Mormonman? Isn't that already what finding NPCs with reflection is, hooking the models?

TRiLeZ

2010-05-27 00:23:21

From: mormonman
I still think you should work on the modeling stuff…I would help but I'm just worthless.


I'm working on it in my bot… once I get it to work, I'll convert it.

mormonman

2010-05-27 02:34:02

From: bbri06
What do you mean by modeling stuff, Mormonman? Isn't that already what finding NPCs with reflection is, hooking the models?


No, we hook the NPC data(i guess you could call it the cache). The NPC model is in a different part of the client…along with the objects and ground objects.

It is the 3d render information…so clicking would be 100 percent accurate.

cohen

2010-05-27 04:03:45

The models for npcs and players are in the Character class, Objects & groundobjects are in the groundtile class.

Method

2010-05-27 09:01:58

From: cohen
The models for npcs and players are in the Character class


Last time I checked you had to grab the models from the model caches (the player one is static and the npc one is in the npcinfoloader class) to properly use them, has this changed?

Drakan

2010-05-27 09:04:51

I found out what was wrong with objects. I had two of the hooks flipped. The getAnimable and getNext need to be switched. I'm not at home so I can't commit, but thats the fix.

mormonman

2010-05-27 19:01:26

From: Method
Last time I checked you had to grab the models from the model caches (the player one is static and the npc one is in the npcinfoloader class) to properly use them, has this changed?


same here…but i only talked to kosaki about it for like 10 minutes before realizing that it was way above my skill level :/

Drakan

2010-05-27 20:31:33

Everything is working so far! I'm currently working on Inventory/Interfaces.

Drakan

2010-05-27 23:18:23

Just to show you guys the progress I've made:

Slot: 1
Staff of fire
ID:1387
Stack Size:1387
Actions:['Wield', 'Drop', 'Examine']
Slot: 2
Iron ore
ID:440
Stack Size:440
Actions:['Drop', 'Examine']
Slot: 3
Iron ore
ID:440
Stack Size:440
Actions:['Drop', 'Examine']
Slot: 4
Iron ore
ID:440
Stack Size:440
Actions:['Drop', 'Examine']
Slot: 5
Iron ore
ID:440
Stack Size:440
Actions:['Drop', 'Examine']
Slot: 6
Coal
ID:453
Stack Size:453
Actions:['Drop', 'Examine']
Slot: 7
Air rune
ID:556
Stack Size:556
Actions:['Drop', 'Examine']

Thanks to ben for dealing with all the problems I keep finding with interfaces and such and fixing them in the plugin :)

bbri06

2010-05-27 23:28:39

Nice job on the objects. I was just implementing reflection NPC finding into my script today and it's working fantastically. Nice job.

Shady?

2010-05-27 23:35:12

Nice there :) im getting back to Reflection Scripting!

Method

2010-05-28 00:03:16

From: drags111
Thanks to ben for dealing with all the problems I keep finding with interfaces and such and fixing them in the plugin :)


What problems are these??

Drakan

2010-05-28 06:43:29

From: Method
What problems are these??


GetArraySize and stuff like that was buggy so I kept making him fix it :P

Narcle

2010-05-29 05:58:22

I just have to say this:
[Hint] D:\Simba\Includes\srl\srl\Reflection\Core.simba(262:3): Variable 'B' never used at line 261
[Hint] D:\Simba\Includes\srl\srl\Reflection\Core.simba(279:3): Variable 'B' never used at line 278
[Hint] D:\Simba\Includes\srl\srl\Reflection\Characters.simba(131:3): Variable 'TESTSTRING' never used at line 130
[Hint] D:\Simba\Includes\srl\srl\Reflection\Characters.simba(167:3): Variable 'TESTSTRING' never used at line 166
[Hint] D:\Simba\Includes\srl\srl\Reflection\Characters.simba(211:3): Variable 'I' never used at line 210
[Hint] D:\Simba\Includes\srl\srl\Reflection\Objects.simba(69:4): Variable 'THETYPE' never used at line 68
[Hint] D:\Simba\Includes\srl\srl\Reflection\Objects.simba(133:3): Variable 'IDX' never used at line 132
[Hint] D:\Simba\Includes\srl\srl\Reflection\Objects.simba(133:3): Variable 'I' never used at line 132
[Hint] D:\Simba\Includes\srl\srl\Reflection\Objects.simba(196:4): Variable 'NL' never used at line 195
[Hint] D:\Simba\Includes\srl\srl\Reflection\Objects.simba(244:4): Variable 'NL' never used at line 243


Is getting annoying…

Drakan

2010-05-29 07:49:53

From: Narcle
I just have to say this:

Is getting annoying…


I just have to say this:
Update your folder much? :P I fixed all that yesterday.

sirlaughsalot

2010-05-29 17:07:17

All the work y'all (Mostly Drags111) are doing is awesome! I will most likely get back into scripting because of it.

I was wondering if it possible to get the tile that flags are on? Basically to get your walking destination.

Edit :
Literally 2 seconds after I posted this I saw the answer to my question in the Reflection files.

Dynamite

2010-05-29 17:37:39

From: sirlaughsalot
All the work y'all (Mostly Drags111) are doing is awesome! I will most likely get back into scripting because of it.

I was wondering if it possible to get the tile that flags are on? Basically to get your walking destination.

Edit :
Literally 2 seconds after I posted this I saw the answer to my question in the Reflection files.


Answer?
I am guessing yes?
If so, that will be pretty important :)

And yeah, I agree, I might just get back into scripting.

sirlaughsalot

2010-05-29 17:47:48

From: The Man
Answer?
I am guessing yes?
If so, that will be pretty important :)

And yeah, I agree, I might just get back into scripting.


It is, it is GetDest;

JPHamlett

2010-05-30 20:27:58

From: sirlaughsalot
All the work y'all (Mostly Drags111)


hey im working on a scar walking web as we speak and Drags111 is doing most of the work cause he has time to


ive been very busy with the end of scool stff latley lol

sirlaughsalot

2010-05-30 23:13:40

From: J_Pizzle
hey im working on a scar walking web as we speak and Drags111 is doing most of the work cause he has time to


ive been very busy with the end of scool stff latley lol


I didnt say he was the only one doing work, but he is by far the one who is most active. I appreciate all of the work everyone who is working on reflection is doing.