SRL Archive - Help and Support

amount.scar not working?


gerauchert

2007-09-24 15:55:53

Hey I was just testing amount.scar functions so I could start up my merchanter script testing and I am encountering a problem. The script does not recognize the new zeros because of the slash through them (i think atleast). So I tested it by putting 1000 gp into my first inv slot and then used Amount('inv',1) and had it Writeln the result. It sayed that there was only 1 gp in my inv slot.

Does anyone know a fix for this? Is there a way to update the AlphaNumericalChars for the new zero?

Or am I just retarded and am missing something big? :redface:

Thanks in advance :D

Gerauchert

IronTeapot

2007-09-24 16:10:30

If you download SCAR 3.12 and set up the reposotiory service, and update to the current version, 4 i think. The 0 problem should be fixed. if not there is a post somewhere with how to just fix the 0 in your srl folder.

Smartzkid

2007-09-24 16:37:50

Somebody posted a fix; the svn should be updated soon, if it's not already.

WT-Fakawi

2007-09-24 16:39:07

Yes, Amount.scar no longer works properly. I dont know who is working on it.

IronTeapot

2007-09-24 16:56:02

The fix is here

http://www.villavu.com/forum/showthread.php?t=17659

Pyro

2007-09-24 18:17:26

From: WT-Fakawi
Yes, Amount.scar no longer works properly. I dont know who is working on it.


Should in theory still work… Ill take a look at it later since masq is no longer on it. But i think it was just the new zeros and that is all/.

gerauchert

2007-09-24 19:01:55

thanks for the help guys :p

BUT it seems the problem is bigger than just the zero…

1st it isnt recognizing the new zero after i switched the bmps…
2nd it isnt recognizing all the numbers like for example it reads 1111 gp as 111gp
and it read 405k as 5k…

so i hope this helps and i really hope it can get up and running soon cuz im gettin itchy from not workin on my merchanter lol :D

Ransom

2007-09-25 00:55:47

That zero is for stats. I'm not sure it works for the money. That would solve 2 of those problems. I'm working on the rest as i too have a merchant script in progress :)

IronTeapot

2007-09-25 09:25:30

Just looked at the zeros in the other char folders. they dont have the / through them, as they do in RS. Only thing is for some of the chars, not the whole character is saved in the bmp. just need to go into it and edit from the new zero(from stat chars) what is shown in the old 'otherchar' folders. Hope someone knows what i mean. Or how hard would it be just to make a whole new character set from the game? Like how were the fonts created the first time?

gerauchert

2007-09-25 14:22:23

hmm so there are different chars for money?

well maybe the coords are off since the interface update and no1 fixed it ill check it out and see if thats it.

or any1 wanna give me a quick tut on the GetTextAtEx or any other number/text finder so i can just make my own? That would be very helpful if you could :D

thanks

Ransom

2007-09-25 20:34:08

Yeah i'm not sure whats going on yet. i'm going to do a deep investigation as to why this still is not working. I'll post my findings if no one has posted a fix.

Well here's where i am at 9:53 PM EST

I've updated a trade char bmp to reflect the zero changes. I began my testing and DTM amount finding and keep getting this error

[Runtime Error] : Exception: Access violation at address 0072408B in module 'scar.exe'. Read of address 00000000 in line 373 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/Amount.scar

Line 373 is this:

if (FindDTM(dtm, itemx, itemy, x1, y1, x2, y2)) then

I'm using this command from amount.scar

result := AmountDtm('Inv', UseDTM)

This was after i tested with the trade screen but that is also a broken function. I will try to get a fix for this.

gerauchert

2007-09-26 08:43:16

sweet thanks

well i think the tradescreen function was just like a 1 pixel switch on the y coord, i had it working but then i forgot to check what it was before i updated with subversion…. i think i have it in one of my threads ill check i out

Ransom

2007-09-26 20:56:40

Yeah it seems this is taking more work than expected. I'll try to find fixes as I find them but i have limited time due to college. Hopefully we can get a few devs working on this as well.

Ransom

2007-10-04 22:39:56

I've tried but i simply don't have the time to fix the entire amount.scar. I would love to have some devs working on this. There's just so much that is broken now.

The Claw

2007-10-04 23:52:47

I'll take a look at it, once i get my svn user and pass :) what are the things that are broken?

gerauchert

2007-10-05 15:11:13

i only tested the amount for the inventory and it doesnt work…so i am assuming it is just a matter of fixing the original GetAmount and the rest should fall into place, but i havent looked too closely

it doesnt seem to recognize the numbers (see my above posts)

rogeruk

2007-10-08 16:18:08

Problem is the AreaInfo is incorrect.

CoinAmount works now i have changed it.

procedure AreaInfo(area: string; var startx, starty, rowsize, colsize,
colnumber, rownumber: Integer);
begin
case LowerCase(area) of
'inv', 'inventory':
begin
startx := 563;
starty := 212;

rowsize := 38;
colsize := 42;

colnumber := 4;
rownumber := 7;
end
'shop':
begin
startx := 79;
starty := 68;

rowsize := 47;
colsize := 47;

colnumber := 8;
rownumber := 5; //?
end;
'bank':
begin
startx := 78;
starty := 61;

rowsize := 38;
colsize := 47;

colnumber := 8;
rownumber := 6;
end;
'trade':
begin
startx := 324;
starty := 72;

rowsize := 33;
colsize := 42;

colnumber := 4;
rownumber := 7;
end;
'your trade':
begin
startx := 35;
starty := 74;

rowsize := 33;
colsize := 42;

colnumber := 4;
rownumber := 7;
end;
else InvalidOption(area);
end;
end;

Changed the
startx := 563;