-
[Release] Source code of Reset NPC
Yesterday the user Charles_Ps requested me to code something similar to a NPC for make resets, so i coded it and i left here the code.
Code:
.386
.Model flat , StdCall
Option CaseMap:none
Include \masm32\include\windows.inc
Include \masm32\include\user32.inc
Include \masm32\include\kernel32.inc
Include \masm32\include\masm32.inc
IncludeLib \masm32\lib\user32.lib
IncludeLib \masm32\lib\kernel32.lib
IncludeLib \masm32\lib\masm32.lib
.Const
.Data
MessageOutPut DD 00500EE0H
NoMoneyMSG DB "You need at least 100.000 Zen for make Reset.", 0
NoLevelMSG DB "You need to be at least lvl 350 for make Reset.", 0
RelogMSG DB "Reset finished, Relog and you will be Reseted.", 0
.Data?
.Code
DllEntry Proc hInstDLL:HINSTANCE, reason:DWord, reserved1:DWord
Mov Eax, TRUE
Ret
DllEntry EndP
ResetNPC Proc
Local PlayerID:DWord
Local lpObj:DWord
Mov Eax, DWord Ptr Ss:[Ebp + 8]
Mov lpObj, Eax
Mov Edx, DWord Ptr Ds:[Eax]
Mov PlayerID, Edx
Mov Eax, lpObj
Mov Edx, DWord Ptr Ds:[Eax + 0A0H]
Cmp Edx, 15EH
Jle NoLevel
Jmp CheckMoney
NoLevel:
Lea Edx, NoLevelMSG
Push Edx
Mov Ecx, PlayerID
Push Ecx
Call MessageOutPut
Jmp Finish
CheckMoney:
Mov Eax, lpObj
Mov Ecx, DWord Ptr Ds:[Eax + 0B4H]
Cmp Ecx, 186A0H
Jle NoMoney
Jmp ReduceMoney
NoMoney:
Lea Eax, NoMoneyMSG
Push Eax
Mov Ecx, PlayerID
Push Ecx
Call MessageOutPut
Jmp Finish
ReduceMoney:
Mov Eax, lpObj
Mov Ecx, DWord Ptr Ds:[Eax + 0B4H]
Sub Ecx, 186A0H
Mov DWord Ptr Ds:[Eax + 0B4H], Ecx
Lea Edx, RelogMSG
Push Edx
Mov Ecx, PlayerID
Push Ecx
Call MessageOutPut
Finish:
Ret
ResetNPC EndP
End DllEntry
This code is a bit more long as you seen, than the other code that i released yesterday. This NPC asks you to be lvl 350 and to have at least 100.000 Zen, and then if you complete the requisites you will be reseted, but you need to relog.
You must hook there if you want, same as the other NPC.
Code:
00405AF6 $ /E9 75541400 JMP gameserv.NPCDeviasGuard
But if you want to put the code on another NPC search for NPCs and make the hooks correctly :D.
Coded by H
-
Re: [Release] Source code of Reset NPC
Wow very nice man :D :poster_ss u r great :flag_schw
-
Re: [Release] Source code of Reset NPC
Wow nice, can U add me at msn.
andres_aguinaga@hotmail.com
Thanks.
-
Re: [Release] Source code of Reset NPC
ownage. auto reset from mssql goes byebye. no more loading ur cpu for nothing. u rock dude
-
Re: [Release] Source code of Reset NPC
Som1 Can make a guild how to use that code?
i know assmble but i never try to convent my projects to dlls
so som1 can make a simple guild how to convent OBJ to DLL?
and what u meaning when u write
"00405AF6 $ /E9 75541400 JMP gameserv.NPCDeviasGuard"?
-
1 Attachment(s)
Re: [Release] Source code of Reset NPC
Quote:
Originally Posted by
sagie212
Som1 Can make a guild how to use that code?
i know assmble but i never try to convent my projects to dlls
so som1 can make a simple guild how to convent OBJ to DLL?
Well, first here is the compiled DLL. Attachment 47014
If u want compile it with ur modifications: Do the changes in Lvl, Required Zen,.... after that
*.- First u need have installed MASM32
*.- then open command ( Start->Run->cmd ) then...
Assembling the DLL code is identical to a normal EXE file and it is done as normal with the following line:
\masm32\bin\ml /c /coff GReset.asm
This line will create a file named: GReset.obj
Linking the DLL:
\masm32\bin\Link /SUBSYSTEM:WINDOWS /DLL GReset.obj
This line will create the final file: GReset.dll
To HOOK the DLL in the GS:Hooking a DLL
[SIZE=2]
Quote:
Originally Posted by
sagie212
and what u meaning when u write
"00405AF6 $ /E9 75541400 JMP gameserv.NPCDeviasGuard"?
this is the offset where u need to put a jump to the DLL hook, remeber , make a jump to the orignal address at the end
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
and whats from that? it just reduce money, nothing else coded ; ], but thanks
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
ok ^^ i got some critics on this code:
1. ->
Code:
Mov Edx, DWord Ptr Ds:[Eax + 0A0H]
Cmp Edx, 15EH
ok you are checking the lvl but where is the
Code:
Mov DWord Ptr Ds:[Eax + 0A0H],1
?
2. -> where is the reward of the reset ? =)
3. -> if you will make the reward then how you can see how many resets player alredy got ^^ ?
4. -> want it or not but you will need to work with mssql if you want to replace the web reset
-
Re: [Release] Source code of Reset NPC
There is no reward, but you are true this code doesn
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
Good .. But the big problem is that some of the files used luciano aibar which of course has protected the gameserver.Dll or things are mine ..
The good idea is that we are just some of this new compilation and assamblar
The problem is that the guide is wrong fenix not seen either one of the images and this in English by my fate: S bueh Maverick if it is not too much to ask if we can pass aver a guide by you? For a well learn a little ... And what programs are needed for example I have visual c + + 2005 and Masm
I seems a good project! So we have no problems that users complain that they can not enter wing web reset or something so ...
Sorry for my bad English
-
Re: [Release] Source code of Reset NPC
Nice one .. but it better remain unfinished .. if you are not informed or don't know .. when making a reset ( in DB) without disconecting from the server it generates a bug ... in DB the stats are changed in game remains the same ... the changes take affect after reloging .. well if you dont you can reset 100000000 times for 1 count .. and i dont think you can pass this bug .. since mu was made like this from the start .. youl have to code both Server and Main from the start ... and still the only thing yoou will get is big lags .. and make new holes .. IM NOT TRYING TO FLAME.. im just being resonable .. you should better try your skils in useful development ( like fixing this damn visual bug ) .. and leave this reset thing to web coders .. to me it seems the only way .....
Sry for bad English
-
Re: [Release] Source code of Reset NPC
Thanks a lot Holy,
But would you mind sharing us C++ code if possible? I don't have any idea about asm.
Thanks again!
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
And work in old version's ... ? Or only in new version's ... ?
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
Quote:
Originally Posted by
hellboy5684
Thanks a lot Holy,
But would you mind sharing us C++ code if possible? I don't have any idea about asm.
Thanks again!
He is ASM Coder, and thx for sharing :D
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
VERY NICE man!, 10/10, ur posts are very helpful and educational ;)
-
Re: [Release] Source code of Reset NPC
-
Re: [Release] Source code of Reset NPC
Images Hook Dll Please!!
Points By Reset?
How To Modify The Points By Reset?
Sorry My Bad Eng!!!
-
Re: [Release] Source code of Reset NPC
Anyone could hook it to my gs? I would be gratefull. Please PM!
-
re: [Release] Source code of Reset NPC
Holy Can u make some modifications here?
Make that Reset NPC ask some items for reset,for example 10 bless :)
-
re: [Release] Source code of Reset NPC
Como lo agrega al gs? al gun tutorial en espaol? por favor?