View Full Version : Coding Example
punisher19
12-26-2011, 10:07 PM
could someone give me an example of:
function FightNPC(Colors: TIntegerArray; Tol, TimeOut: Integer): Boolean;
thanks!
Nebula
12-26-2011, 10:16 PM
I'm not sure if this is right, but it's what is looks like to me.
FightNPC([123456,654321], 25, 7000);
123456 and 654321 are the colors of the monster you want to fight, 25 is the tolerance of the colors, and 7000 is the maximum amount of time it should take to kill the monster.
punisher19
12-26-2011, 10:21 PM
does this mean it is a color from 123456 till 654321?
because I can't find a color like this...
Nebula
12-26-2011, 10:23 PM
does this mean it is a color from 123456 till 654321?
because I can't find a color like this...
No, you put whatever colors the monster is where 123456 and 654321 are. I just used those number as an example.
Basically FightNPC will find colors matching the colors you specify, then fight the monster until it is dead or the time you specify is over.
punisher19
12-26-2011, 10:24 PM
if my color is this: 2895440
How do I write it with the ","?
Jhangir
12-26-2011, 10:28 PM
He picked two numbers you should pick another color from the monster. Your thing should be like. FightNPC([2895440, Pick another color], 25, 7000);
Yanhua
12-26-2011, 10:28 PM
if my color is this: 2895440
How do I write it with the ","?
If it is an Array, use [] around it even if there is only one colour.
If it is an integer just put the colour in there by itself and it will work.
Nebula
12-26-2011, 10:29 PM
FightNPC(2895440, 20, 14000);
That will Find the color 2895440 with a tolerance of 20, fight that monster until it is dead or 14 seconds is over.
punisher19
12-26-2011, 10:32 PM
Ok now I get it
Thanks!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.