To Satrt i want tell that it's free and aways ll be free. It's a Open Surce Project (ll put the GNU latter ._.)
I started to play PWI a few weeks ago and wanted to do something nice for help me to play th game :P
I did a littel research and found that a lot of ppls have some problems to implement Memory Readers and Writers so that is a little help for those that want do something like that.
The project is only starting and i want keep it Up to Dated but for now the fatures are almost all about Player Structure and Unfrezze, i think next week i ll implement the Pet Stuffs.
Quote:
Features:
-Support Multi Clienting
-Frindly Interface
-Show HP/MP
-Show Max HP/Max MP
-Show Coins
-Show Name (Need to solve some problems here. But it's wornk)
-Show Current Exp
-Show Exp Nedded To LVL up
-How much Exp to needed to LVL up
-Cultyvation.
i'm realeasing RAD Studio XE2 and Delphi 7 versions. The main project keep going on XE2 i'm realeasing the Delphi 7 cuz i think almost all of u have it but if u get some error or malfunction of Delphi 7 remember the code are not made for Delphi 7.
Quote:
Examples:
Unit1.pas Line 136
and
Cplayer.pas Line 09 - 10 //Forced typecase of a XE2 Original Type.
Code:
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, PsAPI, ExtCtrls, tlhelp32,
Vcl.Buttons, ShellApi, Vcl.Samples.Gauges;
const
WM_TRAYICON = WM_USER + 1;
type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
ScrollBox1: TScrollBox;
Panel3: TPanel;
Abertos: TComboBox;
Panel4: TPanel;
Button2: TButton;
Panel5: TPanel;
Button1: TButton;
Panel6: TPanel;
procedure Button2Click(Sender: TObject);
procedure CNPanel(PID: Integer);
procedure PNDestroy(Sender: TObject);
procedure PNShow(Sender: TObject);
procedure AbertosDropDown(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure WMTrayIcon(var Msg: TMessage); message WM_TRAYICON;
public
{ Public declarations }
function GetHWndByPID(const hPID: THandle): THandle;
function GetPIDByHWnd(const hWnd: THandle): THandle;
end;
var
Form1: TForm1;
mPID: Integer;
Attached: Array of Integer;
CONST
CHAT_BASE_ADR = $00BC14D8;
CHAT_LAST_IND = $00BC14E4;
CHAT_SIZE = 36;
implementation
{$R *.dfm}
uses Unit2;
function InIntArray(V: Integer; A: Array of Integer): Integer;
var
I: Integer;
begin
Result := -1;
for I := 0 to length(A) do begin
if A[I] = V then begin
Result := I;
break;
end;
end;
end;
function TForm1.GetPIDByHWnd(const hWnd: THandle): THandle;
var
PID: DWORD;
begin
if hWnd <> 0 then begin
GetWindowThreadProcessID(hWnd, @PID);
Result := PID;
end
else
Result := 0;
end;
function TForm1.GetHWndByPID(const hPID: THandle): THandle;
type
PEnumInfo = ^TEnumInfo;
TEnumInfo = record
ProcessID: DWORD;
hWnd: THandle;
end;
function EnumWindowsProc(Wnd: DWORD; var EI: TEnumInfo): Bool; stdcall;
var
PID: DWORD;
begin
GetWindowThreadProcessID(Wnd, @PID);
Result := (PID <> EI.ProcessID) or (not IsWindowVisible(Wnd)) or
(not IsWindowEnabled(Wnd));
if not Result then
EI.hWnd := Wnd;
end;
function FindMainWindow(PID: DWORD): DWORD;
var
EI: TEnumInfo;
begin
EI.ProcessID := PID;
EI.hWnd := 0;
EnumWindows(@EnumWindowsProc, Integer(@EI));
Result := EI.hWnd;
end;
begin
if hPID <> 0 then
Result := FindMainWindow(hPID)
else
Result := 0;
end;
function EnumWindowsProc(wHandle: hWnd; Box: TComboBox): Bool; stdcall; export;
var
N: String;
Title, ClassName: array [0 .. 255] of char;
PID: Integer;
begin
Result := true;
GetWindowText(wHandle, Title, 255);
GetClassName(wHandle, ClassName, 255);
PID := Form1.GetPIDByHWnd(wHandle);
if (ClassName = 'ElementClient Window') then begin
if not(InIntArray(PID, Attached) >= 0) then begin
SetWindowText(wHandle, intToStr(PID) + ' - Perfect World International');
Box.Items.Add('[' + intToStr(PID) + ']' + Title + '{' + ClassName + '}');
end;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
var
NotifyIconData: TNotifyIconData;
begin
with NotifyIconData do begin
Wnd := Self.Handle;
uId := 0;
uFlags := 0;
end;
Shell_NotifyIcon(NIM_DELETE, @NotifyIconData);
end;
procedure TForm1.WMTrayIcon(var Msg: TMessage);
begin
if Msg.lParam = WM_RBUTTONDOWN then begin
end
else if Msg.lParam = WM_LBUTTONDBLCLK then begin
Application.MainForm.Visible := true;
end;
end;
procedure TForm1.AbertosDropDown(Sender: TObject);
begin
Abertos.Clear;
EnumWindows(@EnumWindowsProc, Integer(Abertos));
end;
procedure TForm1.CNPanel(PID: Integer);
var
NAtt, L, R, C, PLR, PET: TPanel;
BClose, BShow: TSpeedButton;
T: TForm2;
begin
NAtt := TPanel.Create(Form1);
L := TPanel.Create(NAtt);
with L do begin
Align := alLeft;
Width := 150;
Parent := NAtt;
end;
C := TPanel.Create(NAtt);
with C do begin
Parent := NAtt;
Align := alClient;
Caption := '';
end;
PLR := TPanel.Create(C);
with PLR do begin
BevelInner := bvLowered;
BevelOuter := bvLowered;
Parent := C;
Align := alTop;
Caption := 'PLR';
Height := (C.Height div 2) - 1;
end;
PET := TPanel.Create(C);
with PET do begin
BevelInner := bvLowered;
BevelOuter := bvLowered;
Parent := C;
Align := alTop;
Height := C.Height div 2;
Caption := 'PET';
end;
R := TPanel.Create(NAtt);
with R do begin
R.Align := alRight;
R.Width := 50;
R.Parent := NAtt;
end;
BClose := TSpeedButton.Create(Form1);
with BClose do begin
Parent := R;
OnClick := PNDestroy;
Align := alClient;
Width := 50;
Caption := 'X'
end;
BShow := TSpeedButton.Create(Form1);
with BShow do begin
Parent := L;
OnClick := PNShow;
Align := alClient;
Width := 150;
Caption := 'Open'
end;
with NAtt do begin
Parent := ScrollBox1;
Align := alTop;
Caption := '';
Name := 'PN_' + intToStr(PID);
end;
T := TForm2.Create(Application, PID);
// T.Show;
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := False;
Application.MainForm.Visible := False;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
NotifyIconData: TNotifyIconData;
begin
with NotifyIconData do begin
Wnd := Self.Handle;
uId := 0;
uCallBackMessage := WM_TRAYICON;
uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE;
hIcon := Application.Icon.Handle;
szTip := 'PWI Thing';
end;
Shell_NotifyIcon(NIM_ADD, @NotifyIconData);
begin
End;
end;
procedure TForm1.PNDestroy(Sender: TObject);
var
N: String;
O: TObject;
PID: Integer;
begin
N := TSpeedButton(Sender).Parent.Parent.Name;
O := TSpeedButton(Sender).Parent.Parent;
PID := StrToInt(Copy(N, POS('_', N) + 1, length(N)));
Attached[InIntArray(PID, Attached)] := 0;
Application.FindComponent(N).Destroy;
O.Destroy;
end;
procedure TForm1.PNShow(Sender: TObject);
begin
TForm(Application.FindComponent(TSpeedButton(Sender)
.Parent.Parent.Name)).Show;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Application.Terminate;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
sPID: String;
begin
if Abertos.Text <> '' then begin
sPID := Abertos.Text;
Delete(sPID, 1, 1);
Delete(sPID, POS(' ] ', sPID), length(sPID));
sPID := Copy(sPID, 1, POS(']', sPID) - 1);
mPID := StrToInt(sPID);
SetLength(Attached, length(Attached) + 1);
Attached[length(Attached) - 1] := mPID;
CNPanel(mPID);
Abertos.Clear;
end else begin
Showmessage('Selecet Some PWI Instance');
end;
end;
end.
Code:
unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, CPlayer,
Vcl.Samples.Gauges;
type
TForm2 = class(TForm)
Timer1: TTimer;
GHP: TGauge;
GMP: TGauge;
Label1: TLabel;
Label2: TLabel;
ExpToGo: TLabel;
Money: TLabel;
Culti: TLabel;
CExp: TLabel;
Needed: TLabel;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
var
CorePID: Integer;
MProc: Thandle;
vPlayer: TPlayer;
procedure WrCorePID(const Value: Integer);
function WriteByte(Address: Cardinal; ChangeValues: Byte): boolean;
procedure CreatePLayer(const Proc: Thandle);
procedure UpdateDebug;
property AtHandle: Integer read CorePID write WrCorePID;
property AtProc: Thandle read MProc;
property Player: TPlayer read vPlayer;
public
constructor Create(AOwner: TComponent; Param: Integer); reintroduce;
procedure CreateParams(var Params: TCreateParams); override;
end;
var
Form2: TForm2;
Written: SIZE_T;
FDebug: TForm;
MDebug: TMemo;
Debug: boolean = False;
CONST
FREEZE_BASE = $00BBCE3C;
PET_BASE = $1C6A6FCC;
ArrCULTI: array [0 .. 14] of String = ('Spiritual Adept',
'Aware of Principle', 'Aware of Harmony', 'Heaven'' s Tear ',
'Aware of Discord', 'Aware of Coalescense', 'Aware of Transcendant',
'Enlightened One', 'Aware of Vacuity', 'Aware of the Myriad',
'Aware of the Void', 'Master of Harmony', 'Master of Discord',
'Celestial Sage', 'Celestial Demon');
implementation
{$R *.dfm}
constructor TForm2.Create(AOwner: TComponent; Param: Integer);
begin
inherited Create(AOwner);
AtHandle := Param;
try
CreatePLayer(AtProc);
finally
Self.Name := 'PN_' + InttoStr(Param);
Self.Caption := Player.Name;
end;
end;
procedure TForm2.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do begin
ExStyle := ExStyle or WS_EX_APPWINDOW;
WndParent := GetDesktopwindow;
end;
end;
procedure TForm2.CreatePLayer(const Proc: Thandle);
begin
vPlayer := TPlayer.Create(Proc);
end;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
FreeOnRelease;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Timer1.Enabled := True;
if Debug then begin
FDebug := TForm.Create(nil);
FDebug.Caption := 'Dbug Widow';
FDebug.Show;
MDebug := TMemo.Create(FDebug);
MDebug.Parent := FDebug;
MDebug.Align := alClient;
end;
end;
Function TForm2.WriteByte(Address: Cardinal; ChangeValues: Byte): boolean;
Begin
Result := WriteProcessMemory(AtProc, Pointer(Address), @ChangeValues,
SizeOf(ChangeValues), Written);
End;
procedure TForm2.UpdateDebug;
begin
MDebug.Clear;
MDebug.Lines.Add(InttoStr(AtProc));
MDebug.Lines.Add('$' + IntToHex(Player.STRUC + $498, 8) + ' = ' +
InttoStr(Player.STRUC + $498));
MDebug.Lines.Add('$' + IntToHex(Player.HP, 8) + ' = ' + InttoStr(Player.HP));
MDebug.Lines.Add('$' + IntToHex(Player.MP, 8) + ' = ' + InttoStr(Player.MP));
MDebug.Lines.Add('$' + IntToHex(Player.LVL, 8) + ' = ' +
InttoStr(Player.LVL));
MDebug.Lines.Add(Player.Name);
end;
procedure TForm2.Timer1Timer(Sender: TObject);
begin
WriteByte(FREEZE_BASE, 1);
GHP.MaxValue := Player.MAXHP;
GHP.Progress := Player.HP;
GMP.MaxValue := Player.MAXMP;
GMP.Progress := Player.MP;
Culti.Caption := 'Culty: ' + ArrCULTI[Player.Culti - 1];
ExpToGo.Caption := 'Exp To Go: ' + FormatFloat('#,##0',
Player.ExpToGo - Player.EXP);
CExp.Caption := 'Current Exp: ' + FormatFloat('#,##0', Player.EXP);
Needed.Caption := 'Needed Exp: ' + FormatFloat('#,##0', Player.ExpToGo);
Money.Caption := 'Coins: ' + FormatFloat('$ #,##0', Player.COINS);
if Debug then begin
UpdateDebug;
end;
end;
procedure TForm2.WrCorePID(const Value: Integer);
begin
CorePID := Value;
MProc := OpenProcess(PROCESS_ALL_ACCESS, False, Value);
end;
end.
If u need help with this project please post on this topic. I garantee the credits on the Bot ^_^
The black tamplet is only avaliable on RAD Studio version.
Really nice, i starting to learn delphi this weekend, so i think will be good to me, so i will can learn with your code, tnks.
Some day maybe i will be usefull in your project.
DELPHI - Who make Exploits, Hacks and Tools with DELPHI? 05/15/2013 - CO2 Programming - 13 Replies Hi all.
Iwith DELPHI, but a dont now.
hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code.
ty to all
Someone that knows delphi can help? 05/15/2013 - Conquer Online 2 - 6 Replies Basically i am trying to write a program to change the value of money in co, I know it can be easily done with programs like TSearch, but I want to make my own simple program, specifally for co and easier.
My code so far:
unit Unit1;
interface
[DELPHI&METIN]Wie sind die Delphi Befehle für einen Bot? 03/07/2010 - General Coding - 3 Replies Hallo liebe com,
ich habe mal eine Frage: Ich möchte einen Metin Bot in Delphi schreiben aber ich weiß nicht die Befehle für
eine bestimmte Taste senden etc.
könnt ihr mir die pls sagen oder per pn geben
MfGGGGGG