[Release] Source code of Reset NPC

Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    Account Upgraded | Title Enabled! Holy is offline
    MemberRank
    Jul 2007 Join Date
    Mov eax, 1Location
    551Posts

    [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
    Last edited by Holy; 17-11-07 at 04:23 PM.


  2. #2
    Account Upgraded | Title Enabled! GMNLPV is offline
    MemberRank
    May 2007 Join Date
    PerLocation
    240Posts

    Re: [Release] Source code of Reset NPC

    Wow very nice man :D :poster_ss u r great :flag_schw

  3. #3
    Enthusiast Charles_Ps is offline
    MemberRank
    Oct 2006 Join Date
    46Posts

    Re: [Release] Source code of Reset NPC

    Wow nice, can U add me at msn.

    andres_aguinaga@hotmail.com

    Thanks.

  4. #4
    Member Kirka is offline
    MemberRank
    Oct 2007 Join Date
    CanadaLocation
    94Posts

    Re: [Release] Source code of Reset NPC

    ownage. auto reset from mssql goes byebye. no more loading ur cpu for nothing. u rock dude

  5. #5
    Member sagie212 is offline
    MemberRank
    Jul 2004 Join Date
    ILLocation
    73Posts

    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"?

  6. #6
    Enthusiast M@V3R!CK is offline
    MemberRank
    Jun 2007 Join Date
    MEXICOLocation
    38Posts

    Re: [Release] Source code of Reset NPC

    Quote Originally Posted by sagie212 View Post
    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.
    GReset.zip

    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 View Post
    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
    Last edited by M@V3R!CK; 18-11-07 at 07:48 AM.

  7. #7
    Valued Member k3ops is offline
    MemberRank
    Sep 2006 Join Date
    ARGENTINA!Location
    148Posts

    Re: [Release] Source code of Reset NPC

    Thx man..:poster_ss

  8. #8
    Enthusiast YEvil is offline
    MemberRank
    Mar 2007 Join Date
    irc.ktu.lt:6667 #ZORline hotic3Location
    28Posts

    Re: [Release] Source code of Reset NPC

    and whats from that? it just reduce money, nothing else coded ; ], but thanks

  9. #9
    Account Upgraded | Title Enabled! -Rob3r- is offline
    MemberRank
    Oct 2006 Join Date
    RomaniaLocation
    525Posts

    Re: [Release] Source code of Reset NPC

    wow thx man

  10. #10
    Proficient Member RoRRe is offline
    MemberRank
    Jun 2006 Join Date
    GuesWhereLocation
    180Posts

    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

  11. #11
    Account Upgraded | Title Enabled! Holy is offline
    MemberRank
    Jul 2007 Join Date
    Mov eax, 1Location
    551Posts

    Re: [Release] Source code of Reset NPC

    There is no reward, but you are true this code doesn

  12. #12
    Account Upgraded | Title Enabled! Di3Go_SM is offline
    MemberRank
    Oct 2006 Join Date
    577Posts

    Re: [Release] Source code of Reset NPC

    add me on msn..

    diegoperfectsim1@msn.com

    thx xD

  13. #13
    iNewLegend , Leo123 zolamu is offline
    MemberRank
    Apr 2006 Join Date
    Холон, IsrLocation
    737Posts

    Re: [Release] Source code of Reset NPC

    good job holy. ;)

  14. #14
    Member Soultrain is offline
    MemberRank
    Dec 2004 Join Date
    VenezuelaLocation
    62Posts

    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

  15. #15

    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

  16. #16
    Member hellboy5684 is offline
    MemberRank
    Oct 2006 Join Date
    98Posts

    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!

  17. #17
    Account Upgraded | Title Enabled! Lisko is offline
    MemberRank
    Dec 2007 Join Date
    BulgariaLocation
    440Posts

    Re: [Release] Source code of Reset NPC

    gj and 10x for source :)

  18. #18
    Apprentice cuNET is offline
    MemberRank
    Jan 2008 Join Date
    Latvia, ElejaLocation
    13Posts

    Re: [Release] Source code of Reset NPC

    And work in old version's ... ? Or only in new version's ... ?

  19. #19
    Account Upgraded | Title Enabled! JeaN is offline
    MemberRank
    Oct 2007 Join Date
    CyprusLocation
    516Posts

    Re: [Release] Source code of Reset NPC

    o nice holy

  20. #20
    Proficient Member Artie is offline
    MemberRank
    Aug 2007 Join Date
    PolandLocation
    187Posts

    Re: [Release] Source code of Reset NPC

    Quote Originally Posted by hellboy5684 View Post
    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

  21. #21
    [Czt] Coder Team Member noobies is offline
    MemberRank
    Aug 2005 Join Date
    Behind you !!Location
    747Posts

    Re: [Release] Source code of Reset NPC

    Nice work man..:D

  22. #22
    Member soylomass is offline
    MemberRank
    May 2005 Join Date
    Buenos AiresLocation
    64Posts

    Re: [Release] Source code of Reset NPC

    VERY NICE man!, 10/10, ur posts are very helpful and educational ;)

  23. #23
    Account Upgraded | Title Enabled! Colbert is offline
    MemberRank
    Sep 2007 Join Date
    ArgentinaLocation
    232Posts

    Re: [Release] Source code of Reset NPC

    thanks holy
    10/10!

  24. #24
    OMEGA favgames is offline
    MemberRank
    Oct 2006 Join Date
    LorenciaLocation
    309Posts

    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!!!

  25. #25
    Apprentice Gryps1987 is offline
    MemberRank
    Sep 2005 Join Date
    PL - White100KLocation
    20Posts

    Re: [Release] Source code of Reset NPC

    Anyone could hook it to my gs? I would be gratefull. Please PM!



Page 1 of 2 12 LastLast

Advertisement