SRL Archive - SRL Archives

*Magic.scar CastOnCustom


trojan

2009-01-17 11:00:32

In the srl/srl/skill/Magic.scar file shouldnt

function CastOn(Spell, Monster: string; MonsterColor: Integer; Tolerance:
Integer): Boolean;

be

function CastOn(Spell, Monster: TStringArray; MonsterColor: TIntegerArray; Tolerance:
Integer): Boolean;

and

  if (FindObj(x, y, Monster, MonsterColor, Tolerance)) then

become

  if (FindObjCustom(x, y, Monsters, MonsterColors, Tolerance)) then

because then you would be able to cast a spell on multiple monsters in the area or if certain monsters are different colors it would attack all of them. This could be made as a new function called CastOnCustom or something.
If there is another way of doing then please may someone tell me.

Cazax

2009-01-17 13:11:34

I agree in the first one, although you could just change CastOn to find ObjCustom and do the same. And FindObj doesn't need any change, since it uses color and tolerance it would find the object anyways.

trojan

2009-01-17 14:08:46

No i mean if there are some of the same monsters in the area just completely diferent colors then you could put both of them or if there are a few monsters that you want to attack. with FindObj you can only find one color and one name

Sandstorm

2009-01-17 15:31:17

FindObjCustom has arrays.

~Sandstorm

trojan

2009-01-26 12:40:18

so… isnt this a good idea then?

ZephyrsFury

2009-01-26 19:54:13

I'll add CastOnCustom. No need to change FindObj as a FindObjCustom already exists.

Thanks.

trojan

2009-01-29 12:30:52

ok thanks for the help :)