Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 10:08

  • Please register to post and access all features, it's quick, easy and FREE!

 

[HowTo] Custom NPCs

Reply
 
Old   #1


 
elite*gold: 30
Join Date: May 2011
Posts: 4,795
Received Thanks: 3,179
[HowTo] Custom NPCs

Hello,

After I saw this question alot, I thaught about thinkin' to write some BEGINNING, this will be NOT a Copy'n'Paste Tutorial, you have to do those things ON YOUR OWN!

But now to my tut:

What we need:
  • A program to edit .lua's
  • Databaseaccess
  • Brain.exe (Note: If you can't find it: Give up.)

Part 1: Database
- If you don't want to use disabled NPC's, then skip this step.

Well, I know, it's the wrong beginning, but I said it before: This is not a Copy'n'Paste-Tut.

First of all search for a disabled NPC (select * from npcresource where local_flag IS NOT '0')
Here you have to edit x, y, contact_script and local_flag.
X & Y should be clear, local_flag, too. If you don't know, what you have to replace here, give up. :3
Now contact_script:
Think about some good name, for our example we'll take "NPC_DarknessFight".
Here you have to insert "NPC_DarknessFight()" - "(" & ")" are important!

Part 2: Lua-Files
Now you have the choise:
Use a existing .lua, or create a new one.

If you want to create a new one, you have to put this at the beginning:
Code:
function get_module_name()
             return "DESCRIPTION"
             -- Example:
             -- return "DarknessFight"
end
Now we gonna create the Display for the NPC.

First of all, you must remember the Databasename, in this case "NPC_DarknessFight".

This will be our beginning

Code:
-- Initalize Script
function get_module_name()
return "DarknessFight"
end

-- Start NPC
function NPC_DarknessFight() -- ( & ), again important, else it wont work!
-- ToDo: Function
end
Now we have the base, this part is the function of when you double-click on your NPC.
But we want that awesome window, how can we get this?

Code:
dlg_title( "Xijezu" )
dlg_text( "Hello, nice to meet you. And now GTFO." )
dlg_menu( "Menu 1", 'open_market("lalalalala")' )
dlg_menu( "Uhuh, close this shit! :D", '' )
Selfexplaining?

So the full code would be this:

Code:
-- Initalize Script
function get_module_name()
return "DarknessFight"
end

-- Start NPC
function NPC_DarknessFight() -- ( & ), again important, else it wont work!
dlg_title( "Xijezu" )
dlg_text( "Hello, nice to meet you. And now GTFO." )
dlg_menu( "Menu", 'open_market("lalalalala")' )
dlg_menu( "Uhuh, close this shit! :D", '' )
end
Now you got a new NPC.
If you want a custom function, like add state or insert item, then you have to write a new function

Code:
function test_function()
warp(99999, 99999) -- This will warp you into CV
end
You can use this with this little change:
Code:
dlg_menu( "Menu", 'test_function()' )
Understood?
Good.

Questions?
Yes? Then use search.

Greets,

Xijezu



Xijezu is offline  
Thanks
30 Users
Old   #2
 
elite*gold: 0
Join Date: Nov 2011
Posts: 980
Received Thanks: 1,007
Wasted Time, i bet 1.000.000$ in the Next 2 week´s, some noob`s will ask, "How add NPC???!!".


But for the People who really want to learn, it`s good.


TheOnlyOneRaskim is offline  
Thanks
2 Users
Old   #3
 
elite*gold: 0
Join Date: Dec 2011
Posts: 6
Received Thanks: 0
Xijezu can you send me your skype in pm?
ILoveShyla<3 is offline  
Old   #4


 
elite*gold: 30
Join Date: May 2011
Posts: 4,795
Received Thanks: 3,179
Quote:
Originally Posted by TheOnlyOneRaskim View Post
Wasted Time, i bet 1.000.000$ in the Next 2 week´s, some noob`s will ask, "How add NPC???!!".
I know -.-

Quote:
Originally Posted by TheOnlyOneRaskim View Post
But for the People who really want to learn, it`s good.
Thats the reason why I wrote this tut. ^_^


Xijezu is offline  
Thanks
1 User
Old   #5
 
elite*gold: 0
Join Date: Sep 2011
Posts: 62
Received Thanks: 9
Xijezu ok thats good but )=== ineed how add sql in Data Base Screenshost*
mahmoudnasser is offline  
Old   #6


 
elite*gold: 30
Join Date: May 2011
Posts: 4,795
Received Thanks: 3,179
Quote:
After I saw this question alot, I thaught about thinkin' to write some BEGINNING, this will be NOT a Copy'n'Paste Tutorial, you have to do those things ON YOUR OWN!
Quote:
First of all search for a disabled NPC (select * from npcresource where local_flag IS NOT '0')
Here you have to edit x, y, contact_script and local_flag.
X & Y should be clear, local_flag, too. If you don't know, what you have to replace here, give up. :3
Selfexplaining.^_^
Xijezu is offline  
Old   #7


 
elite*gold: 30
Join Date: May 2011
Posts: 4,795
Received Thanks: 3,179
Quote:
Originally Posted by speedy-nl View Post
Brain.exe (Note: If you can't find it: Give up.)

where can i find this ?
speedy, I lol'd.
But then I saw your username... Bad joke

Just like raskim said:
This is just for people who won't copy'n'paste, also for people which wanna learn a bit. :3
Xijezu is offline  
Thanks
1 User
Old   #8
 
elite*gold: 0
Join Date: Jun 2011
Posts: 82
Received Thanks: 11
You are the best man !
qaaah is offline  
Old   #9


 
elite*gold: 30
Join Date: May 2011
Posts: 4,795
Received Thanks: 3,179
Who was successful to create a custom NPC after this little tut?
Xijezu is offline  
Thanks
2 Users
Old   #10
 
elite*gold: 0
Join Date: Sep 2011
Posts: 98
Received Thanks: 31
I have enable the npc, set X, Y, but when i double-click on, nothing happen :0 x) got an idea ?
Saelt is offline  
Old   #11


 
elite*gold: 30
Join Date: May 2011
Posts: 4,795
Received Thanks: 3,179
Quote:
Now contact_script:
Think about some good name, for our example we'll take "NPC_DarknessFight".
Here you have to insert "NPC_DarknessFight()" - "(" & ")" are important!
You forgot this.
Xijezu is offline  
Old   #12
 
elite*gold: 0
Join Date: Apr 2010
Posts: 389
Received Thanks: 289
how add npc plez tell me i want add npc my server

(another noob asking )

Thanks for the tut but as raskim said there will be noobs asking
Strange2010 is offline  
Old   #13
 
elite*gold: 0
Join Date: Sep 2011
Posts: 98
Received Thanks: 31
Quote:
Originally Posted by Xijezu View Post
You forgot this.
No thats the problem. I've got an idea, i'm testing it .
Thx for this.
Saelt is offline  
Old   #14
 
elite*gold: 0
Join Date: Sep 2011
Posts: 98
Received Thanks: 31
Thx it is working
Saelt is offline  
Old   #15
 
elite*gold: 0
Join Date: Jun 2010
Posts: 573
Received Thanks: 161
you have to put in the correct script in the db. Furthermore the script itself needs to be correct


haxti is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
5165 Custom NPCS
How do you make a npc talk in 5165 source? I know how to edit the face type, mech type etc. But where do you go to make them talk. :) Thanks in...
3 Replies - CO2 PServer - Discussions / Questions
Custom Items,Maps,Npcs?
Hallo wollt mehrere sachen auf einmal fragen ;) 1. wie setz ich ein warp npc auf ... der in allen dungens/towers warp 2.wie fuege ich Custom...
17 Replies - Ragnarok Online PServer Hosting
[Question] Custom NPCs
Hey sorry I can't really read german and I couldnt translate with babelfish what Alasami wrote because it's an image. But could someone guide me on...
0 Replies - Flyff PServer - Discussions / Questions
WoW, Mangos: custom NPCs?
Mangos, Rev 5966, WoW 2.4.2 Creating a custom NPC using the WoW Model Viewer My idea in short: 1.) create a NPC after my fancy 2.) save and...
0 Replies - WoW PServer Hosting
How can i put Custom NPCs GM shops in my server?
Hello, i have made my server work fine now. How can i put custom GM shops and Npc's buffers files? can anyone show me and tell me correctly how can...
4 Replies - Lin2 Private Server



All times are GMT +2. The time now is 10:08.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.