astoria1112000
2011-12-03 22:42:20
I want to know how much exp my script gained
2011-12-03 22:42:20
2011-12-03 22:58:27
2011-12-03 23:10:02
2011-12-04 11:05:42
From: astoria1112000
Ok i am training combat, How to know I have killed a NPC
Function PixelCheck: Integer;
var
Player: TBox;
begin
Player.X1 := MSCX-10;//this sets the coordinates for the box around the player
Player.X2 := MSCX+10;//
Player.Y1 := MSCY-10;//
Player.Y2 := MSCY+10;//
Result := PixelShift(Player , RandomRange(100, 200)); //This waits a random amount of time and results the amount of pixels that have changed in that time
end;
Function IsFighting: Boolean;
begin
if (PixelCheck > 150) then //this checks if the amount of pixels changed were higher than 150
MarkTime(FightTime) //this resets the fighting watch, FightTime. If pixelcheck is lower than 150, it is never refreshed
else
begin
if (Check = 0) then //Check is a global variable
begin
IncEx(Wait1, 150); //this increases Wait1 by 150
IncEx(Wait2, 200); //this increased Wait 2 by 200
end; //both waits are global variables. they are reset after each fight. these variables are used as double checks.
Inc(Check); //this increases Chance, so it doesn't make a mistake with its detection
end;
Result := (TimeFromMark(FightTime) < RandomRange(Wait1, Wait2)); //this is basically saying "If the amount of time FightTime has been watching is higher than the amount of time we are waiting (wait1 and Wait2), then we are NOT fighting
end; while (InFight) do
Antiban; Hope that helps a bit. If you need any help understanding, just ask.
2011-12-04 11:15:48
2011-12-04 11:33:13
From: Flight
Your pixelshift is gonna rely heavily on what equipment & weapon you're using as well as what attack animation you're using.
2011-12-05 15:29:39