Simple "How to" question

02/25/2008 18:09 wolfstorm11#1
I'm new but thought id ask

I have always wanted to learn to hack some game i create very good bots but wanted to delve deeper, anyone have suggestions or a basic concept idea of how to actually HACK Guildwars
I know C++ and plenty of other languages so i don't think thats an issue if anyone minds helping it would be greatly appreciated :D
also i would try and write in (German?) i think but i don't think the online translator would work to well
02/25/2008 18:13 Azunai#2
so its nice, but if you want to really HACK Guild Wars... u need to (get? be?) into arenanets system! all things are (server side?)
so sry if my language skill is not so good but i hope you'll understand what i wanted to say ^^
02/25/2008 18:19 wolfstorm11#3
yea i did write in german if you like ill use my awesome online translator :D

I figured that all stuff in guildwars was server side but i have seen a lot of "hacks" around wasn't sure if they were for real and if they were was hoping that i could get an idea...

so basically everything in here are just bots? made in autoit or moveit or any of that?
02/25/2008 18:49 Azunai#4
no all :P
some things you kan change client side ^^ like my 100% visible map "hack"

but all in all there are just bots!

oh and the hacks you've seen around @other sides are mostly maleware ^^ i wouldn't try anything!
but maybe you kan write memory based bots in c++ :P these bots are so rare in guild wars ^^
not only 1 memory based bot exists at the moment :P
or publish some bots you've written before! so everyone could lern something! or release a new bot! someone who is able to write a bot or tool in c++ is really really (liked? xD ).
02/25/2008 19:02 wolfstorm11#5
yea i usually don't trust anything from any suspicious site... i do my research
do you have a link to that one memory based bot? and is it possible to view the code?
I pick up quickly to new concepts so if i just have even a snip it of code i can probably start my own.

the only thing i need to figure out how to do is read the GW memory
02/25/2008 19:30 Ganf#6
OllyDbg is your friend! And also, happy Memory searching xD!


MFG
Ganf
02/25/2008 20:23 Azunai#7
yes usually ollydbug is used to get these informations!

but the one memory based bot, ( there was never another) was called "Requia"
so here @epvp you should ask "Harko".
he'd wirtten it...

EDIT:
ok i found some maybe helpful code ^^

Code:
-- Elone Mission Script v1.2

require("Lua\ReqGw.lua");
local slowcpu = 0;

function main()
  if(Lib_Version < 1.2) then
    Console("Wrong library version. Please update.");
    Exit();
  end

  while (true) do
    -- ------------------------------
    -- back to zone, sell and enter mission
    FinishRoute();
    -- ------------------------------
    -- cast aura
    UseAbility(7, 0);
    Sleep(2500);
    UseAbility(6, 0);
    Sleep(2500);
    -- ------------------------------
    -- accept quest
    Lib_TargetNpc(14064, -463);
    DropItem(); -- drop quest item
    -- ------------------------------
    Lib_MoveTo(13100, 1100);
    Lib_MoveTo(12645, 2868);

    WaitForMinos();

    Lib_MoveTo(11273, 2910);
    Lib_MoveTo(10954, 1994);
    Lib_MoveTo(10733, 1568);

    WaitForMinos();
  end
end
--####################################################--
function WaitForMinos()
  local BlockCnt = 0;
  while(true) do
    local result = Fight(150);
    BlockCnt = BlockCnt + 1;
    if(result == -1 or BlockCnt > 20) then
      break;
    end
  end

  if(PlayerHp > 0) then
    Lib_LootWithDistance(1000);
  end
end
--####################################################--
function CheckItem()
  if(ItemIndex == 0) then
    return 0;
  elseif(ItemType == 123486) then -- mino horn
    return 0;
  elseif(ItemType == 9383) then  -- dyes
    return 0;
  elseif(ItemRarity >= 2) then    -- gold/green sell item
    return 0;
  else
    return 1;
  end
end

function Sell()

  Lib_TargetNpc(14534, 6561);

  -- sell everything in the first backpack
  local Tool = Lib_FindItem(130582);
  if(Tool == 0) then
    Tool = Lib_FindItem(153970);
  end

  for i=0, 19 do
    GetItem(0, i);

    if(ItemIndex == 0) then
      return;
    end

    if(CheckItem() == 1) then
      if(ItemIdentified == 0 and Tool ~= 0) then
        UseItem(Tool, ItemIndex);
        Sleep(200);
        GetItem(0, i);
        Sleep(200);
      end

      SellItem();
    end
  end
end
--####################################################--
function Fight(maxdistance)
  while(true) do
    SearchByFaction(3);
    Sleep(200);

    -- wenn kein mob mehr gefunden wurde
    if(SearchIndex == 0) then
      return -1;
    end

    -- wenn mob zu weit weg ist
    if(SearchDistance  > maxdistance) then
      return;
    end

    TargetByIndex(0, SearchIndex);

    -- fight
    -- schleife die solange durchlaufen wird
    -- solange der npc noch lebt
    while (TargetHpMax == 0 or TargetHp > 0) do

      -- falles es doch mal passiert das man stirbt
      if (PlayerHp == 0) then
        return -1;
      end

      -- wenn target tot dann abbrechen
      if (TargetIndex == 0) then
        do break end
      end

      if (PlayerEnergy < 10 and IsAbilityUsable(3) and
          IsEffectActive(372) == 0) then
        UseAbility(1, 0);
        -- 6s warten oder abbrechen wenn energie voll ist
        local time = GetTickCount();
        local curtime = time;

        while(curtime < time + 6000 and IsEffectActive(380) == 1) do
          if(PlayerEnergy == PlayerEnergyMax) then
            break;
          end
          Sleep(100);
          curtime = GetTickCount();
        end
      end

      -- Zyklon Axt
      if (IsAbilityUsable(0) and PlayerEnergy > 5 and
          IsEffectActive(254) == 1) then
        UseAbility(0, 0);
      end

      -- letzte rettung zum teil
      if (IsAbilityUsable(2) and PlayerEnergy > 15) then
        UseAbility(2, 0);
      end

      -- ...**** BUFFS ****...
      -- Energischer Geist oben halten! wichtig
          if (IsEffectActive(254) == 0 and IsAbilityUsable(4)
              and PlayerEnergy > 5) then
        UseAbility(4, 0);
        Sleep(800);
      -- Heilender Hauch oben halten! wichtig
      elseif (IsEffectActive(288) == 0 and IsAbilityUsable(3)
              and PlayerEnergy > 10) then
        UseAbility(3, 0);
        Sleep(800);
      -- Energischer Geist oben halten! wichtig
      elseif (IsEffectActive(267) == 0 and IsAbilityUsable(5)
              and PlayerEnergy > 5) then
        UseAbility(5, 0);
        Sleep(1800);
      -- Gladiatoren-Verteidigung
      end

      Sleep(150);
    end
  end
end
--####################################################--
function FinishRoute()
  Lib_TravelToZone(118);

  -- put gold into vault
  if(Gold > 50000) then
    Lib_DepositGold(Gold, 16080, 5750);
  end

  Sell();
  Lib_EnterMission();
end
--####################################################--
02/25/2008 20:38 Ganf#8
Nein, auf T_A_U_L_T gibts auch einen! Allerdings nur health und Mana!

MFG
Ganf
02/27/2008 19:03 Term!nX#9
bitchbi, this is just the scritping code. Shouldn't be useful.
You will need some WinAPI functions.

ReadProcessMemory
[Only registered and activated users can see links. Click Here To Register...]

I've wrote a useless trainer for an offlinegame (anno 1602). Anyway here is this losy code (anno.money is interesting), if (questions) just ask :D. Language: C++

Code:
#include <iostream>
#include <stdlib.h>
#include <windows.h>

using namespace std;

class Trainer {
    public:
        Trainer();
        ~Trainer();
        int Pressed(int vkey);
        void SetMoneyValue();
        void GetHandles();
        void SetMoney();
        
    private:
        int ValueAddToMoney;
        HWND hWnd;
        HANDLE hProcess;
        DWORD dwProcessId;
        unsigned lpBaseAdress
        int buffer;
        DWORD rw; 
};

Trainer::Trainer()
{
    lpBaseAdress = 0x560264; 
    rw = 0;
}

Trainer::~Trainer()
{
    CloseHandle(hProcess);
}

void Trainer::SetMoneyValue()
{
    cout << "Wieviel Gold hinzufügen?n";
    cin >> ValueAddToMoney;
}

void Trainer::GetHandles()
{
  hWnd = FindWindowA(NULL, "Anno 1602");
  
  if (hWnd == 0) {
    cerr << "Fenster nicht gefunden. Prozess offen? Exit in 3 Sekunden.";
    Sleep(3000);
    exit(1);
  }
  
  GetWindowThreadProcessId(hWnd, &dwProcessId);

  hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcessId);
  
  if (hProcess == 0)
  {
  DWORD error = GetLastError();

  cout << "n Errorcode: " << error << "n";
  cout << "Handle konnte nicht initialisiert werden. Exit in 3 Sekunden.n";
  Sleep(3000);
  exit(1);
  }
}  

void Trainer::SetMoney()
{ 
  ReadProcessMemory(hProcess, (LPCVOID)lpBaseAdress, &buffer, sizeof(int), &rw);
  
  WriteProcessMemory(hProcess, (LPVOID)lpBaseAdress, &(buffer = buffer + ValueAddToMoney), sizeof(int), &rw);
}    
                  
int Trainer::Pressed(int vkey)
{
    return GetAsyncKeyState(vkey);
}

int main(int argc, char *argv[])
{
  Trainer Anno;
  
  Anno.SetMoneyValue();
  Anno.GetHandles();
  
  while (true)
  {
      Sleep(50);
      if (Anno.Pressed(0x79)!= 0) 
      {
          Anno.SetMoney();
      }    
  }  
  
  system("PAUSE");	
  return 0;
}
02/27/2008 19:28 Azunai#10
oh i though you he needs code of a requia script xD not any memory reed/write one
02/28/2008 10:01 Ganf#11
Quote:
Originally Posted by Term!nX View Post
I've wrote a useless trainer for an offlinegame (anno 1602). Anyway here is this losy code (anno.money is interesting), if (questions) just ask :D. Language: C++
Why losy? Most offlinegame trainers are like this. They just add a GUI and Input function, but when you write this once, you can use it again and again!

MFG
Ganf