Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Source Code of a Little New NPC

Junior Spellweaver
Joined
Jul 24, 2007
Messages
139
Reaction score
30
Hi guys i am a bit worried here at 0:24 AM so i want to release this simply code xD.

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
gObjTeleport DD 004F6230H

.Data?

.Code

DllEntry Proc hInstDLL:HINSTANCE, reason:DWord, reserved1:DWord
 Mov Eax, TRUE
 Ret
DllEntry EndP

NewNPC Proc
 Local PlayerID:DWord
 Local Map:DWord
 Local X:DWord
 Local Y:DWord
 Mov Eax, DWord Ptr Ss:[Ebp + 8]
 Mov Edx, DWord Ptr Ds:[Eax]
 Mov PlayerID, Edx
 Mov Map, 0
 Mov X, 98H
 Mov Y, 34H
 Mov Eax, Y
 Push Eax
 Mov Ecx, X
 Push Ecx
 Mov Edx, Map
 Push Edx
 Mov Eax, PlayerID
 Push Eax
 Call gObjTeleport
 Ret
NewNPC EndP
End DllEntry
And you need to hook there:

Code:
00405AF6   $ /E9 75541400    JMP gameserv.NPCDeviasGuard
If you compile the DLL and hook in the correct place when you click on the NPCGuard you will get Teleported to Lorencia(152,52). Simply and cool :D.

You need to be sure to put the NPC in your MonsterSetBase:

Code:
247    1    "Xbow Guard"
Well guys Good Luck to all and Happy Coding. :technolog

PS: Good Night to all too xD.

//EDIT

This works 100% Perfect for any of the 1.00.16 Version Like Endi
 
is lovin' it
Loyal Member
Joined
Nov 26, 2005
Messages
1,154
Reaction score
2
Re: [Release] Source Code of a Little New NPC

Aha this is great! So much that can be done here, thanks!
 
Newbie Spellweaver
Joined
Oct 5, 2006
Messages
25
Reaction score
0
Re: [Release] Source Code of a Little New NPC

Very interesting.

Well can U make some code for clck into a NPC and reset any char?

or something like that?
 
Junior Spellweaver
Joined
Dec 11, 2006
Messages
127
Reaction score
0
Re: [Release] Source Code of a Little New NPC

Screen? ^o):poster_ss
 
Experienced Elementalist
Joined
Apr 29, 2007
Messages
260
Reaction score
4
Re: [Release] Source Code of a Little New NPC

good work 10/10
 
Newbie Spellweaver
Joined
Jul 3, 2004
Messages
39
Reaction score
6
Re: [Release] Source Code of a Little New NPC

Great work can use this code for teleport a silent as peni'x server files
 
Newbie Spellweaver
Joined
Sep 16, 2007
Messages
24
Reaction score
0
Re: [Release] Source Code of a Little New NPC

Yes, you can make it move anymap if you simply change coords and map number.
 
Junior Spellweaver
Joined
Dec 13, 2004
Messages
164
Reaction score
12
Re: [Release] Source Code of a Little New NPC

Nice code man !
Any way you can port this for flat assembler ? ( )
I have some problems with the commands.
I am not familiar with masm32 :/
 
Newbie Spellweaver
Joined
Sep 16, 2007
Messages
24
Reaction score
0
Re: [Release] Source Code of a Little New NPC

best if using masm32, icz tuts help you learn it.
 
Junior Spellweaver
Joined
Dec 13, 2004
Messages
164
Reaction score
12
Re: [Release] Source Code of a Little New NPC

i build the damn obj file in masm32, now what :p
Can someone make a simple guide how to make the obj to dll in masm32 ? I couldnt find any info in their site or forum. I think it will help people here also...not just me :p
 
Newbie Spellweaver
Joined
Sep 25, 2006
Messages
54
Reaction score
0
Re: [Release] Source Code of a Little New NPC

Very nice job, i need Learn masm32 ^^. Is a god Opportunity.

Thx
 
Member
Joined
Jan 10, 2007
Messages
530
Reaction score
12
Re: [Release] Source Code of a Little New NPC

thx
 
Newbie Spellweaver
Joined
Oct 19, 2007
Messages
20
Reaction score
0
Re: [Release] Source Code of a Little New NPC

gj Holy!
nice one :p

and tip, change X, Y, Map value in the gObj offsets too :)...

btw...

here is short edition of it :p

Code:
NewNPC Proc
 Push 034H
 Push 098H
 Push 0
 Mov Eax, DWord Ptr Ss:[Ebp + 8]
 Mov Eax, DWord Ptr Ds:[Eax]
 Push Eax
 Call gObjTeleport
 Ret
NewNPC EndP
 
Last edited:
Newbie Spellweaver
Joined
Mar 24, 2007
Messages
88
Reaction score
0
Re: [Release] Source Code of a Little New NPC

i'll test it
 
Newbie Spellweaver
Joined
Oct 31, 2006
Messages
24
Reaction score
0
Re: [Release] Source Code of a Little New NPC

you can code asm in visual c( # and ++ ) you just need to know how :))
 
Back
Top