• Log in or sign up for an account here: https://www.sythe.org/login

Icy Tower Scripting

  • Thread starter Thread starter LifeIsGood069
  • Start date Start date
L

LifeIsGood069

Guest
Hi, (ugh my post just got deleted when I went to preview it.) Well apparently I can't preview stuff. Oh well, lets hope it turns out ok.

I need help creating a script for the game Icy Tower 1.3. If you do not have the game you can get it at one of these links. Click the "Free Download," don't pay for the "Premium" stuff.

http://icy-tower.en.softonic.com/download

I basicly need help sending keys to the actual game. The beginning of the script works and the end of the script works as far as getting mouse coordinates and clicking the mouse, but the keyboard commands mostly do not work. (Yes the game works when i actually press my keyboard buttons and i can play the game using that. But I need to be able to do it through Scar.) For some reason scar is not sending most commands to the Icy Tower game. I have tried: SendKeys, SendKeysVB, KeyDown, KeyUp, SendArrowSilent.

The only command that works is KeyDown(VK_Down);.

Even if you do not have the game or have not played it, I have tried to make the code explain what I am trying to do so you can help. Anyways here is the code I've written:


program IcyTowerHacks;
var
a: Cardinal;
b,x,y: Integer;

//Open Icy Tower Program On DeskTop
procedure Open;
begin
if(FindColorTolerance(x,y,13264196,1,1,742,499,1)) and
(FindColorTolerance(x,y,5864902,1,1,742,516,1)) then
begin
MoveMouseSmooth(x,y);
Wait(80);
ClickMouse(x,y,True);
Wait(80);
ClickMouse(x,y,True);
//Waiting For Loading Time (4.5 Seconds)
Wait(4500);
end else
begin
Writeln('--Color Failed');
//A = GetSystemTime (at program start) + 1hour & 1/1000 Seconds
a:= a - 3600001
Wait(1500);
end;
end;

//Should Be Majority of Game Loop
procedure Game;
begin
if(GetSystemTime-a < 3600001) then
begin
Writeln('>>>Running The Game<<<');
//Presses "Start Game" (Main Menu - Icy Tower 1.3)
// there was send keys here, but i couldn't post
end else
begin
Writeln('>>>NOT Running The Game<<<');
end
end;

//Detects HighScores + Fills Them Out (NEEDS IMPROVEMENT)
procedure HighScores;
begin
// need to find colors at specific coordinates or ranges
if(FindColorTolerance(x,y,16711740,1,1,525,351,1)) or
(FindColorTolerance(x,y,65450,1,1,298,370,1)) or
(FindColorTolerance(x,y,16711935,1,1,325,325,1)) or
(FindColorTolerance(x,y,65365,1,1,271,446,1)) then
begin
//Type "GYM" + Press Enter
Wait(200);
// there was send keys here, but i couldn't post
end else
begin
Writeln('--Not a HighScore');
end;
end;

//Tells How Much Time Elapsed From Start->Finish
procedure Timing;
begin
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/1000)+' Seconds');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/60000)+' Minutes');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/3600000)+' Hours');
end;

procedure Exiting;
begin
//Exit Icy Tower Program 3600000ms = 1hour
if(GetSystemTime-a > 3600000) then
begin
Writeln('--Exiting Icy Tower');
repeat
// Press Escape
// there was send keys here, but i couldn't post
Wait(750+random(200));
Writeln(inttostr(b+1)+' ESC');
b:=1+b
//Pressed 6 Times + Wait 4.5<->5.7 Seconds
until(b=6);
//Tells How Much Time Elapsed From Start->Finish
Writeln('***Ending Time***');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/1000)+' Seconds');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/60000)+' Minutes');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/3600000)+' Hours');
end else
begin
Writeln('--Not Exiting');
end
end;

// Actual Program Starting
begin
a:= GetSystemTime;
b:=0;
Writeln('/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\');
Writeln('&--------->| PROGRAM STARTED |<---------&');
Writeln('\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/');
//DisguiseScar('Icy Tower Hack'); //not working...

Open;
Writeln('***Opening Time***');
Timing;

repeat
Game;
HighScores;
Exiting;
until(GetSystemTime-a > 3600000);

end.

// Thank you for helping.
 
Can someone please help me? Scripting for this game should be sooo easy, but I don't know why the arrow keys are not working. Ideas??

Does anyone know how to push the arrow keys down in a script?

Can someone tell me all the different ways to 'Sendkeys' to the computer...
For Example, "SendKeys('hi');" or "SendKeysVB('Hi'+{Enter});" I need to know how to send keys different ways to the computer and the syntax/examples of each.

If someone could please help me answer those questions I could probably finish this script on my own. I just started scripting and i was looking to expand my skills by developing a small program that beat a simple game, but it seems to be very hard. Please post some replys with your scripting knowlege. Thanks.
 
Edited. Scar is not really made to detect alot of colors around it? For instance if this is a block:

&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&

Pretend that is a solid block that is light green or some solid color. If I use: FindColorTolerance(x,y,....) the program only detects a small sliver of the light green on that block. How do i get scar to detect the whole solid block?

And to answer your question Icy Tower is a pretty stupid game, where you just press "Left Arrow," "Right Arrow," and "Space Bar" to jump on blocks. The screen automaticly moves up faster and faster and if your guy falls off the screen he dies. So you have to keep jumping. To jump higher you run all the way across a bar then jump (to build up momentum). I just wanted to create a program to beat this game because i thought it would be easy.

Maybe there is another game that you could help me with, instead of icy tower. http://www.helicoptergame.net/ For example, in this game you only have to click the mouse or release the mouse. Would seem Pretty easy eh?

P.S. If you know none of the above, with detecting blocks, helping with Icy Tower, or Helping with the Helicopter game. Please tell me how to change Scar's Console name when it is minimized. It is something like DisguiseScar('Microsoft Word');. Thanks again.
 
// http://www.helicoptergame.net/
// Computer Record: 152
// My Record: 1178
program HelicopterHacks;
var
a: Cardinal;
b,x,y: Integer;

//Starts The Game
procedure Starting;
begin
if(FindColorTolerance(x,y,15918565,1,1,197,206,1)) and
(FindColorTolerance(x,y,16763955,1,1,273,195,1)) then
begin
Writeln('--Color Success');
//Click Mouse to Start Program
ClickMouse(x,y,True);
end else
begin
Writeln('--Color Failed');
b:=1
Wait(700);
end;
end;

//Should Be Majority of Game Loop
procedure Game;
begin
if(b=0) then
begin
//Conserve Processor To Not Writeln
//Writeln('>>>Running The Game<<<');
//Hold Mouse to Move Up

if(FindColorTolerance(x,y,6750054,1,1,240,115,1)) then
begin
//Hold Mouse to Move Up
HoldMouse(x,y,True);
Wait(random(295));
//Release Mouse to Move Down
ReleaseMouse(x,y,True);
Wait(random(41));
end;

end else
begin
//Writeln('>>>NOT Running The Game<<<');
end;
end;

//Detects HighScores + Saves Them + Stops Program (NEEDS IMPROVEMENT)
procedure HighScoresExit;
begin
// Finding Colors Of Crash
if(FindColorTolerance(x,y,10040319,1,1,191,273,1)) or
(FindColorTolerance(x,y,10040319,1,1,120,197,1)) or
(FindColorTolerance(x,y,366326,1,1,525,351,1)) or
(FindColorTolerance(x,y,366326,1,1,261,100,1)) or
(FindColorTolerance(x,y,119538,1,1,271,446,1)) or
(FindColorTolerance(x,y,119538,1,1,618,164,1)) then
begin
//Figure out how to get score "Best"
Writeln('--Aquiring HighScore');
Writeln('--Exiting Helicopter Game');
// Alt+Tab (not working)
//Was a send keys 165 here, but it wouldn't let me post.
b:=1
end else
begin
Writeln('--No HighScore Colors');
Writeln('--Not Exiting');
end;
end;

//Tells How Much Time Elapsed From Start->Now
procedure Timing;
begin
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/1000)+' Seconds');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/60000)+' Minutes');
Writeln('Time Elapsed: '+FloatToStr((GetSystemTime-a)/480000)+' Hours');
end;

// Actual Program Starting
begin
a:= GetSystemTime;
b:=0;
Writeln('/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\');
Writeln('&--------->| PROGRAM STARTED |<---------&');
Writeln('\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/');
//DisguiseScar('Microsoft Word'); //not working...

Starting;
Writeln('***Starting Time***');
Timing;

//If Colors Fail; Game Never Executes
if(b=0) then
repeat
Game;
HighScoresExit;
until(b>0);

//Tells How Much Time Elapsed From Start->Finish
Writeln('***Ending Time***');
Timing;
end.
 
I don't think anyone cares about this. This thread has been up a while. All people care about is their rune pickaxes and runescape... eh.
 
Runescape Gamblingrunescape gambling
Back
Top