Script for Last Chaos

You may request or share scripts for MicroMacro in this forum.
Post Reply
Message
Author
Split74
Posts: 12
Joined: Fri Mar 28, 2008 11:55 pm

Script for Last Chaos

#1 Post by Split74 » Thu Jun 26, 2008 5:37 pm

anyone know a good script for last chaos?

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Script for Last Chaos

#2 Post by 3cmSailorfuku » Tue Jul 29, 2008 4:49 pm

I'm not sure if it helps, but I tried to make one without GetPixel. Worked till I got to the Part where you have to find mobs in your reach, I really got pissed off so im dropping this. And it looks and works the worst way you could ever imagine. But have a look.

Code: Select all

-- Setup --
LevelGap = 2; -- Level gap between your level and the mobs.
Looting = 1; -- Enables Looting.
w = 1680; -- Width of your Resolution.
h = 1050; -- Height of your Resolution.
-- Memory Adresses
BaseAdress = 0x1058BAE4;
PlayerHPoff = 0xF9498;
PlayerLeveloff = 0x10563A08;
TargetHoveroff = 0xF9260;
TargetNameoff = 0xF91D8;
TargetLeveloff = 0xF9200;
-- Misc --
-- End of Setup--

-- Finding & Attacking Target.
function gettarget()
  updatevars();
  if( keyPressed( key.VK_F5 ) ) then
  rest(60000);
  end
  if( TargetHover <= BestMob and TargetHover >= 1 and PlayerHP >= 150) then
        rest(50);
	    mouseRClick();
	    rest(20);
	    mouseSet(400,300);
  end
  if(TargetLevel ~= 0)then
   InBattle = 1;
	keyboardPress( key.VK_F1 );
    keyboardPress( key.VK_F4 );
    rest(100);
  end
  -- Method to try to get enemies but FAIILLL
  if( TargetLevel == 0 and TargetHover == 0)then
    InBattle = 0;
      mouseSet(400,300);
     i = 0;
    while( InBattle == 0 and i <= 25 and TargetHover == 0)do
     updatevars();
	 i = i+1;
     mouseMove(0,-i);
     rest(100);
       if( TargetHover <= BestMob and TargetHover >= 1 ) then
        rest(500);
	    mouseRClick();
	    rest(20);
	    mouseSet(400,300);
  end
   end
    keyboardHold( key.VK_LEFT );
   rest(100);
        keyboardRelease( key.VK_LEFT );
   end
end

--My 3 Tries of a possible way to get the mobs fast. Failed.
--Method1
  --    rX = math.random(800);
  --    rY = math.random(600);
  --    mouseSet(rX, rY);
  --    loot();
--Method2
  --keyboardHold( key.VK_LEFT );
  --r1 = math.random(-30,30);
  --   r2 = math.random(-30,30);
  --   mouseMove(r1,r2);
  --   xr,yr = mouseGetPos();
  --    if( xr >= 800 or yr >= 600 )then
  --    mouseSet(400,300);
  --    rest(5);
  --  end
  --rest(100);
  --keyboardRelease( key.VK_LEFT );

-- Looting
function loot()
   if( Looting == 1 )then
    keyboardPress( key.VK_F3 );
    rest(2);
    keyboardPress( key.VK_F3 );
   end
end

-- Select monsters who are attacking the bot.
function getattacker()
   x2 = 1680;
   y2 = 1050;
   bx = 790*(w/x2);
   by = 510*(h/y2);
   mouseSet(bx,by);
   rest(30);
   i = 0;
   while( InBattle == 0 and i <= 13)do
    i = i + 1;
    mouseMove(i,0)
    rest(2);
   end
   i = 0;
    while( InBattle == 0 and i <= 13)do
     i = i + 1;
     mouseMove(0,i)
     rest(2);   
   end
   i = 0;
   while( InBattle == 0 and i <= 13)do
     i = i + 1;
     mouseMove(-i,0)
     rest(2);   
   end
   i = 0;
   while( InBattle == 0 and i <= 13)do
     i = i + 1;
     mouseMove(0,-i)
     rest(2);   
   end
   rest(10000);
end

-- Sit if no Monster are in battle with you. Either heal yourself with a Pot or Spell.
function heal()
   updatevars();
	if( PlayerHP <= 100 )then
     keyboardPress( key.VK_F2 );
     rest(1000);
	end
	if( PlayerHP <= 100 and InBattle == 0 and Sitting == 0 )then
     keyboardPress( key.VK_F10 );
     rest(3000);
     Sitting = 1;
	end
	if( PlayerHP >= 200 and Sitting == 1 )then
     keyboardPress( key.VK_F10 );
     rest(3000);
     Sitting = 0;
	end
end

function updatevars()
    PlayerHP = memoryReadShortPtr(proc, BaseAdress, PlayerHPoff);
    PlayerLevel = memoryReadByte(proc, PlayerLeveloff);
    TargetHover = memoryReadBytePtr(proc, BaseAdress, TargetHoveroff);
    TargetLevel = memoryReadBytePtr(proc, BaseAdress, TargetLeveloff);
    BestMob = PlayerLevel+LevelGap;
end
 -- Camera calibration etc.
function calibration()
  printf("-----------------------------------------\n");
  printf("Calibration...\n");
  keyboardHold( key.VK_DOWN );
  rest(2000);
  keyboardRelease( key.VK_DOWN );
  keyboardHold( key.VK_UP );
  rest(800);
  keyboardRelease( key.VK_UP );
  mouseWheelMove("-50000");
  printf("Calibration Done!\n");
  printf("Starting Bot Routine\n");
  printf("--LVL-[%d]--HP-[%d]-#-MGap[%d]------------\n",PlayerLevel,PlayerHP,BestMob);
  InBattle = 0;
  Sitting = 0;
end

function main()
  attach( findWindow("LastChaos - Gamigo*") );
  proc = openProcess( findProcess("LastChaos - Gamigo*") );
  updatevars();
  calibration();
  
  while(true) do
  heal();
  gettarget();
  rest(2);
  end
end

startMacro(main, true);

zer0
Posts: 213
Joined: Sat Feb 16, 2008 11:55 pm

Re: Script for Last Chaos

#3 Post by zer0 » Mon Aug 18, 2008 4:15 am

LC sux balls, y would u want to create a hack for it? :D

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Script for Last Chaos

#4 Post by 3cmSailorfuku » Mon Aug 18, 2008 5:56 pm

zerosignal wrote:LC sux balls, y would u want to create a hack for it? :D
None, there are alot of hacks already.

tcflying
Posts: 29
Joined: Thu Dec 18, 2008 12:07 pm

Re: Script for Last Chaos

#5 Post by tcflying » Fri Jan 09, 2009 9:11 am

thx for the script, everything works fine but function getattacker(), so it means can't find any mob -_-! hope will find a way to improve get monster.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests