- Joined
- Oct 31, 2008
- Messages
- 341
- Reaction score
- 294
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
why when i download it i get a php file not a winrar file ?
what about picking pet in the same dll ye?
#Updated again now working with Bounded item's and gm Created ,too
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
#include "stdafx.h"
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <io.h>
#include <fcntl.h>
namespace GameServer
{
namespace IOCriticalSection
{
static void(__thiscall *Enter)(void *Section) = (void(__thiscall*)(void*))0x00423640;
static void(__thiscall *Leave)(void *Section) = (void(__thiscall*)(void*))0x004236d0;
}
namespace Link
{
static void(__thiscall* MoveTo)(void *Object, int x) = (void(__thiscall*)(void*, int))0x00438C40;
}
namespace Player
{
static void* (__thiscall *FindItem)(void* Player, int Index,int Num) = (void* (__thiscall*)(void*,int, int a6))0x0045D190;
static char* (__cdecl *UpdateProperty)(void* Player, int Type, int IncDec, signed __int64 Amount) = (char* (__cdecl*)(void* Player, int Type, int IncDec, signed __int64 Amount))0x00458800;
}
namespace MainServer
{
static BOOL(__cdecl *ConsoleWriteBlue)(const char* text, ...) = (BOOL(__cdecl*)(const char* text, ...))0x00432860;
}
namespace Item
{
static int (__thiscall *IsState)(int thispointer, int a2) = (int (__thiscall*)(int thispointer, int a2))0x00427130;
}
}
struct SPets
{
int Index;
int Amount;
int Cooldown;
int Counter;
};
std::vector<SPets> HealPetsVec;
unsigned long __stdcall MainThread(void* _k)
{
UNREFERENCED_PARAMETER(_k);
Sleep(3000);
GameServer::MainServer::ConsoleWriteBlue("--->>>>> Healing Pet's - Done! <<<<-----");
/*int hCrtIn, hCrtOut;
FILE *conIn, *conOut;
AllocConsole();
hCrtIn = _open_osfhandle ((intptr_t) GetStdHandle(STD_INPUT_HANDLE), _O_TEXT);
hCrtOut = _open_osfhandle ((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
conIn = _fdopen( hCrtIn, "r" );
conOut = _fdopen( hCrtOut, "w" );
*stdin = *conIn;
*stdout = *conOut;
*/
std::ifstream spawnitem;
spawnitem.open("HealPets.txt");
std::string strTemp;
std::string line;
if(spawnitem.is_open())
{
while (std::getline(spawnitem,line,'(').good())
{
SPets pet;
spawnitem >> strTemp >> pet.Index >> strTemp >> pet.Amount >> strTemp >> pet.Cooldown;
HealPetsVec.push_back(pet);
}
}
spawnitem.close();
Sleep(10000);
do
{
Sleep(1000);
for(std::vector<SPets>::iterator it = HealPetsVec.begin(); it != HealPetsVec.end(); ++it)
{
it->Counter+=1;
if(it->Counter >= it->Cooldown)
{
GameServer::IOCriticalSection::Enter((void*)0x4e2078);
GameServer::IOCriticalSection::Enter((void*)0x4e2098);
GameServer::Link::MoveTo((void*)0x4e200c, (int)0x4e2004);
GameServer::IOCriticalSection::Leave((void*)0x4e2098);
int* Playerp = 0;
for (unsigned long i = *(unsigned long*)0x4e2004; i != 0x4e2004; i = *(unsigned long*)i)
{
Playerp = (int*)(i - 428);
if (Playerp)
{
int* pItem = (int*)GameServer::Player::FindItem(Playerp,it->Index,1);
if(pItem)
{
//int isOn = GameServer::Item::IsState((int)pItem,1);
int state = pItem[12];
if(state == 1 || state == 9 || state == 129)
{
GameServer::Player::UpdateProperty(Playerp,7,1,it->Amount);
}
}
}
}
GameServer::IOCriticalSection::Leave((void*)0x4e2078);
it->Counter == 0;
}
}
}while(true);
return TRUE;
}
void init()
{
CreateThread(0,0,MainThread,nullptr,0,nullptr);
}
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
{
DisableThreadLibraryCalls(hModule);
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
init();
break;
}
return TRUE;
}