P Server "NPC base code/shops/drop items" for who asked me 2 do it

05/29/2008 22:54 samehvan#1
First thing this source based on "Hadeset" source and I have learned a lot from "Korvacs's" coding so , any credits goes to them be4 me


Added Sell Items , Upgrading item and number of items as a reward,

New Adds:-

10/June/2009

updated to work on patch 5017

i think too many things , cant remember really

plz redownload the Source.rar


and all i ask ppl is reading all posts be4 asking new question that may be answered ,so the thread keeps organize and helpfull

this thread has 5 files attached
-sittingup.rar --->shows how u sit up and run the source
-Rebuilding.rar --->for Vista users and the users who may have the application conflict error
-Compiled.rar ---> the same source but only the needed running files (u can use just that folder to run the server)
-FullSource.rar --> as it says it is the full server (codes files and running files)
-Hamachi.rar --> to learn how to setup and use hamachi so ur friends can connect to ur server

if u are not experience with C# and codding thing then dont use the full Source files just use the compiled one


Now how is that work ,

For home or local network use ------> sittingup.rar shows how u do it
-Just change the game client server.dat to ur main PC_ID (the pc u will run the server from) -->Pics 1-4 of the sitting up tutorial
-then put the same IP at the server start up program  Pics 5-7
I attached a tutorial how to make it

For remote access (if u have not a host server ) u need a bridge program just like hamachi

use this link to learn how u use it
[Only registered and activated users can see links. Click Here To Register...]


Now about adding things by ur self

Everytime I will mention a folder or a file that will be :-
1- if u use the compiled folder that means u will find them at the main folder
2- if u use the FullServer folder u will find them at Source\bin\debug

Adding Mobs :-
-Goto Source\bin\debug or Compiled\debug
-Open the mobs.txt file
-choose the mob name
-r8 down it's ID ,
-Open the Mobspawns.txt file
-Add the next number to the last line ,, means if the file ends with
4 3 430 381 431 382 1002 1
Then ur first number will be 5
Then add the code in that order
Id MobID x1 y1 x2 y2 MapID Number_of_mobs
Whill MobID is the number u wrote down from the Mobs.txt file
-x1,y1 are the first spawning point coordinates
-x2,y2 are the last spawning point coordinates
-MapID is the map where the mobs will spawn (u can find them at the Maps.txt file)
-Number of Mobs how many monsters will spawn in this square

Adding or removing NPCs:-
*Open the NPCs.txt file it sat on that order
Id1 Id2 X Y Type Dir Flags Map
-Id1 is the Npc_spawnID u wont need it coz u wont c it :P
-Id2 is the main NPC_ID and it is the one u will always need
-x,y is the position it will stand at
-type is the NPC type (warehouse/shopkeeper/blacksmith….etc)
-Dir is the Direction it will take for the first look
-Flags u wont use it either
-Map is the map ID (where the NPC spawn)

To remove one u just need to delete it is line (don’t leave spaces between lines)

To Add one u will need to know all the above NPC data, then r8 them down to the NPCs.txt file

Adding a NPC dialog:-
First u need to get the NPC id , u can do it by pressing the NPC u want to talk then check on the console screen (the black screen pops behind the Server Program), u will c a line saye "NPC_ID <Number> that number is the NPC ID
-Go to Debug\NPCsStuf\Dialog.ini
-Open the INI file
-Start a dialog section by putting the NPC_ID between the symbols "[" "]" , just like that [NPC_ID]
-face=<number> ------firt line is the face (the NPC avatar)
-txt0=<txt> ---- the txt will NPC say when it is been clicked
-opt0=<option1-option2-option_N> -- this are the options the player choose from ,must separated by "-" sympol and the last option must be the end dialog option
-req=<requirements>  the requirements for each option separated by "-" and the requirement it self separated by "," ,, u only have 3 requirements to choose from so far (minimum level-gold-CPs) and u choose one for every option means if u teleporting the player that needs 100 Sliver then " req=gold,100" or u wanna make a quest for players above lvl 50 then "req=lvl,50" and so on
-rew=<rewards> - that is the rewards u will give to the player when he clicked an option and u have 5 things to choose from here (gold,Val/CPs,val/lvl,val/teleport,Map_ID,PosX,PosY/item,iteminfo,Number)
For the item as a reward u have to put the info in that order(item_ID,pluss,bless,enchanted,soc1,soc2,Numb er of items <--- "new")

I dunno what else will u need so I will let u ask after all ,
Hope it will work for u all and hope u will have fun

useful commands

/scroll (place) ----> to teleport to another map (tc/pc/dc/mc/ma/am/arena/jail/bi)
/lvl value --> to level up
/hp --->to fill ur HP
/vit number --> to changae ur vitality
/skill skillname to learn new skill
/item itemname quality plus bless enchanted socket1 socket2
/job value to change ur class Trojan 10-15/warrior 20-25/archer 40-45
/prof value to improve ur weapon proficiency[Only registered and activated users can see links. Click Here To Register...]
05/31/2008 21:21 kenchiz14#2
:)nice guilde
05/31/2008 21:29 randomnoob#3
wich spell comands are there?
and how do you make npcs give items? can you make an example?
with item ids, right?
if so can you give me an itemtype.dat decrypter?
05/31/2008 21:41 kenchiz14#4
oh can u make a file so i can use the skills book
06/01/2008 00:17 samehvan#5
Quote:
Originally Posted by randomnoob View Post
wich spell comands are there?
and how do you make npcs give items? can you make an example?
with item ids, right?
if so can you give me an itemtype.dat decrypter?
no spells coded at the moment ,
about the NPC

at the NPC_ID section there will be a reward like that


rew=item,<put here the Item u will reward the player> in that order

Item_ID,Plus,Bless,Enchanted,Soc1,soc2

for example if u want the NPC to give the player a super boot lvl 60 +2 no bless ,no enchanted,one soc (free gems) it would be like that
1-first u should know the boot lvl 60 name (easy to know i think)
2-goto the source folder , u will find a file named "CoItems.txt" open it
3-Edit-Find or CTRL+F search for the item name without spaces , means the lvl 60 boot name is "Crocodile Boots" so u search for "CrocodileBoots" ,for each item u will find at least 8 numbers (fixed--->Super) if there are more than 8 they are the same but with different colors , that boot have numbers from 160110 to 160119 , the first fixed the last Super , choose what u want then follow
4-now u should put the reward line like that
rew=item,160119,2,0,0,255,0

that is it
06/01/2008 13:11 YukiXian#6
Quote:
Adding or removing NPCs:-
*Open the NPCs.txt file it sat on that order
Id1 Id2 X Y Type Dir Flags Map
-Id1 is the Npc_spawnID u wont need it coz u wont c it :P
-Id2 is the main NPC_ID and it is the one u will always need
-x,y is the position it will stand at
-type is the NPC type (warehouse/shopkeeper/blacksmith….etc)
-Dir is the Direction it will take for the first look
-Flags u wont use it either
-Map is the map ID (where the NPC spawn)

To remove one u just need to delete it is line (don’t leave spaces between lines)

To Add one u will need to know all the above NPC data, then r8 them down to the Mobs.txt file
Well, kinda nice but.. How do u know what type the number is?
06/01/2008 14:21 Imongnawong#7
good works :)
06/01/2008 15:26 ~LightRuler~#8
good work ^^
06/01/2008 15:32 samehvan#9
Quote:
Originally Posted by YukiXian View Post
Well, kinda nice but.. How do u know what type the number is?
just open ur co Client folder\ini\npc.ini , u will find them all ,
06/01/2008 17:21 YukiXian#10
Quote:
Originally Posted by samehvan View Post
just open ur co Client folderininpc.ini , u will find them all ,
Well, Thanks!

May you also know how to find the Portal ID's? And someone also know how to change the place were you teleport ?? ( Example : /scroll tc , than i will spaw in the middle but i dont want it, how to change it? )

Thx, Yuki:cool:
06/01/2008 17:56 Deadly|Tro#11
Nice, I'll try it, when my P-Server works so I can edit it.
06/01/2008 21:45 Deadly|Tro#12
i dont understand anything :P you got hotmail ? so i can add ya and speak about this :P ?
06/02/2008 01:15 kenchiz14#13
samehvan r u going to make private server
06/02/2008 04:25 samehvan#14
Quote:
Originally Posted by YukiXian View Post
Well, Thanks!

May you also know how to find the Portal ID's? And someone also know how to change the place were you teleport ?? ( Example : /scroll tc , than i will spaw in the middle but i dont want it, how to change it? )

Thx, Yuki:cool:
the commands and where u spawn when u use the scroll command u can find them at Source\clientrequests\chat.cs

go to the command /scroll section and u will c the line
teleport (MapID,Posx,Posy)
change the X,Y as u wish

the portals at character.cs (at the very bottom ) change them also if u like

Quote:
Originally Posted by Deadly|Tro View Post
i dont understand anything :P you got hotmail ? so i can add ya and speak about this :P ?
what u dont understand ?? i have a hotmail yes but i dont use the msngr a lot this days , it's [Only registered and activated users can see links. Click Here To Register...] anyway,, yet u can ask here for what u want

Quote:
Originally Posted by kenchiz14 View Post
samehvan r u going to make private server
not as a business one , i already running this one on my Private network
06/02/2008 05:15 mafia03#15
hi all.. i need know what the code in Mobs.txt (RedColour)??

1 HawKing 15432 1 2 0 205 92 0
IDMonster: 1
MonsterName: HawKing
HPMonster: 15432
???: 1
???: 2
???: 0
Mech: 205
LVL Monster: 92
???: 0

coz..if u need ADD monster... we need know first the CODE in Mobs.txt :(

Thanks for help