SRL Archive - SRL Archives

Magic.scar FixSpells;


trojan

2009-01-30 18:10:03

Do you think we should add FixSpells; for the new runescape update that makes sure the spells are sorted by level. Im not a very good scripted so i couldnt get it to work but this was what I had


{*******************************************************************************
procedure FixSpells;
By: ????
Description: Returns the spell order to sort by level.
*******************************************************************************}

procedure FixSpells;
begin
Gametab(7);
if not FindColor(677, 449, 2765882)then
begin
Mouse(683, 450, 5, 5);
repeat
Wait(200)
until(FindColor(677, 449, 2765882))
end;
end

Shuttleu

2009-01-30 18:11:16

is that color constant?

~shut

trojan

2009-01-30 18:16:21

not sure but I was just pretty much saying someone should make one lol but I couldnt get it to work to test it. and i thought stuff in the gametabs had a constant color.

Shuttleu

2009-01-30 18:23:29

procedure FixSpells;
var
Color: Integer;
begin
Color:= GetColor(682, 453);
if (Color <> 4938596) then
Mouse(677, 444, 13, 13, True);
end;
there you go :D

~shut

EDIT:
From: trojan
not sure but I was just pretty much saying someone should make one lol but I couldnt get it to work to test it. and i thought stuff in the gametabs had a constant color.
well when i chose one spot the color kept changing so i had to choose another spot

ian.

2009-01-30 18:26:08

yes it's constant..

I could make this up really quick

>.>

darn you shut.

Shuttleu

2009-01-30 18:29:01

From: 99_
yes it's constant..

I could make this up really quick

>.>

darn you shut.


dw i will have a better one in a sec :p

~shut

ian.

2009-01-30 18:33:20

you can't use colors.. you have have to use MouseBox or DTMs..

because if you have the runes, it will be the same color as a spell.. :)

Shuttleu

2009-01-30 18:38:05

From: 99_
you can't use colors.. you have have to use MouseBox or DTMs..

because if you have the runes, it will be the same color as a spell.. :)


which is why i used GetColor so it only picks the color from a certain spot ;)
{*******************************************************************************
procedure SortSpellsBy(Which: string);
By: Shuttleu
Description: Changes the order of spells depending on what is put for Which
Arguments for Which are:
level
combat
tele
*******************************************************************************}
procedure SortSpellsBy(Which: string);
var
Color: Integer;
begin
case Lowercase(Which) of
'level': begin
Color:= GetColor(682, 453);
if (Color <> 4938596) then
Mouse(677, 444, 13, 13, True);
end;
'combat': begin
Color:= GetColor(699, 449);
if (Color <> 7243153) then
Mouse(695, 444, 13, 13, True);
end;
'tele': begin
Color:= GetColor(716, 446);
if (Color <> 6518915) then
Mouse(714, 444, 13, 13, True);
end;
end;
end;
anyway here you are

~shut

ian.

2009-01-30 18:42:44

narb. :p

and it's not very useful IMO, just use Cast( );

Shuttleu

2009-01-30 18:44:31

crap i made a small mistake
give me a min

~shut

EDIT: here we go
shorter and it works properly
{*******************************************************************************
procedure SortSpellsBy(Which: string);
By: Shuttleu
Description: Changes the order of spells depending on what is put for Which
Arguments for Which are:
level
combat
tele
*******************************************************************************}
procedure SortSpellsBy(Which: string);
begin
case Lowercase(Which) of
'level': if (GetColor(682, 453) <> 4938596) then
Mouse(677, 444, 13, 13, True);
'combat': if (GetColor(699, 449) <> 4871777) then
Mouse(695, 444, 13, 13, True);
'tele': if (GetColor(716, 446) <> 2765882) then
Mouse(714, 444, 13, 13, True);
end;
end;

lordsaturn

2009-01-30 23:03:31

Might wanna switch to GameTab 7 first..

Shuttleu

2009-01-31 05:20:22

From: lordsaturn
Might wanna switch to GameTab 7 first..


oh yea :duh: thanks for pointing that out

{*******************************************************************************
procedure SortSpellsBy(Which: string);
By: Shuttleu
Description: Changes the order of spells depending on what is put for Which
Arguments for Which are:
level
combat
tele
*******************************************************************************}
procedure SortSpellsBy(Which: string);
begin
GameTab(7);
case Lowercase(Which) of
'level': if (GetColor(682, 453) <> 4938596) then
Mouse(677, 444, 13, 13, True);
'combat': if (GetColor(699, 449) <> 4871777) then
Mouse(695, 444, 13, 13, True);
'tele': if (GetColor(716, 446) <> 2765882) then
Mouse(714, 444, 13, 13, True);
end;
end;

trojan

2009-01-31 07:00:18

you wouldnt use sort by anything else would you though as in the magic.scar file the cast spell function only works on sort by level that why i just had fixspells.

ZephyrsFury

2009-01-31 07:59:31

From: trojan
you wouldnt use sort by anything else would you though as in the magic.scar file the cast spell function only works on sort by level that why i just had fixspells.


It actually works on bitmaps so really you wouldn't need anything as it would just find the spell no matter where it is.

trojan

2009-01-31 11:23:07

oh, so this function would just be for scripts that used coordinates for spells.

Shuttleu

2009-02-02 20:48:57

From: ZephyrsFury
It actually works on bitmaps so really you wouldn't need anything as it would just find the spell no matter where it is.


just wondering but arent some of the bitmaps for the spells outdated?
because whenever i want to use a spell i have to remake it before i can use a script (after the first time it is fine)

~shut