[Tutorial] Starter NPC

Status
Not open for further replies.
Newbie Spellweaver
Joined
Oct 25, 2006
Messages
66
Reaction score
2
allot of people ask me on msn how to make a starter npc :eek:
so i thought i just make it here ^^

LETSA GO!:mobile:

[[-- CREATING A NPC --]]

InitNPC.txt <<-- Server Side :
PHP:
;starter npc
(gennpc
     (index A)
     (country 0)
     (kind 0)
     (shape B)
     (html C)
     (map 0)
     (xy D)
     (dir 57258 7717)
)

A : You look at the npc above the one you are going to at and take next number! ( not the same )
B : See the ids bellow!
C : should be an non existing s######.dat inside e.pk
D : Go into ure server and go to the place where you want ure starter npc to be... if you are the ( with ure gm account ) typ in /coordinates

PHP:
1 - Farmer
2 - Miner
3 - Polka-Dot Man
4 - Woman
5 - Prophet
6 - Ascetic
7 - Skill Master
8 - Guard
9 - Chief Guard
10 - Black Crow Statue
11 - /
12 - /
13 - Castoff Baby Ghost
14 - Doggebi
15 - Assassin List
16 - Brown Stone
17 - Doggebi Lord Mirror Stone
18 - Doggebi Lord's Throne
19 - Dice Master
20 - Doggebi Lord's Teleporter
21 - Event Tent
22 - /
23 - /
24 - Bird Event
25 - Green Tent
26 - Green Tent
27 - Orange Tent
28 - D4 Gate
29 - Brown Stone
30 - /
31 - Mixing Stone
32 - /
33 - Stone of Return
34 - /
35 - /
36 - Mix Master
37 - /
38 - /
39 - Old Man
40 - Red Flag
41 - Green Flag
42 - Red Flag
43 - Green Flag
44 - Monster Flag

[[-- GIVING THE NPC A NAME --]]
message-e <<-- Client side (inside config.pk)

PHP:
(npcname A "Starter-NPC")

A : Should be the same as the number you gave the NPC in InitNPC.txt
( Open config.pk extract message-e.dat and make a .txt file off it with DatTool )

[[-- CREATING TEXT FOR THE NPC --]]
E.pk <<-- Client Side :
PHP:
(filechk file_ver (country_type ENG) (filename A))
(background
 (font 12) 
 (wrap 270)
 (link system ( param ( width 270) ( height 255) ( style title edge system vscroll) ( caption "Talk") ( layout script) ))
)
( frame ( font 12)
 ( line "[B] Do you want to start?")
 ( line "")
 ( link ( text "Yes and i'am a Knight") ( param send quest 8703 4 ))
 ( link ( text "Yes and i'am a Archer") ( param send quest 8703 2 ))
 ( link ( text "Yes and i'am a Mage") ( param send quest 8703 3 ))
 ( link close ( text "[Talk End] I dont wanna start!"))
)

Put this into a text file and save it with a non existing name (something like s000502.txt)

A : Should have the same name as the the one you gave the file!
B : Name of the NPC showed wenn you talk to him
C : You need to make a .Dat file of it with DatTool

[[-- CREATING THE QUEST LOAD --]]

Quest.txt <<-- Server Side :
PHP:
;Starter NPC
;Knight starter
(quest (index 8703 4)
(case (if (class 0) (item (1 1)))
(then  (contribute 70) (supoint 77)(item (out 1 1)(in 102 1 1)(in 117 0 1)(in 118 0 1)(in 119 0 1)(in 120 0 1)(in 121 0 1)(in 30 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 337 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html A)))
)
;Archer starter
(quest (index 8703 2)
(case (if (class 2) (item (22 1)))
(then  (contribute 70) (supoint 77)(item (out 22 1)(in 108 41 1)(in 122 0 1)(in 123 0 1)(in 124 0 1)(in 125 0 1)(in 126 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 339 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html A)))
)
;Mage starter
(quest (index 8703 3)
(case (if (class 1) (item (90 1)))
(then (contribute 70) (supoint 77) (item (out 90 1)(in 114 21 1)(in 127 0 1)(in 128 0 1)(in 129 0 1)(in 130 0 1)(in 131 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 338 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html A)))
)

A : Should be the number you gave the file in e.pk if you used s000502.dat then you should name it in here 502

(case (if (class 1) (item (90 1)))

Means if its a class 1 character ( a mage ) and got item 90 1 time

(then (contribute 70) (supoint 77) (item (out 90 1)(in 114 21 1).....so on so on

Means if the case was in ure inventory then give 70 CP / 77SP take item 90 out 1 time put in item 114 1 times


HOPE I DIDNT FORGET ANNY THING PLEASE TELL ME IT CANT BE RIGHT IN 1 TIME :eek:

[[ DAT TOOL]]
 
Re: [Guide] Starter NPC

By me it do not work: I create a NPC and make a name for it,but when I click on NPC nothing come
My Char do not talk with him
Help me please and make my Wrongs to correct way=)
InitNPC
;starter npc
(gennpc (index 920) (country 0) (kind 0) (shape 39) (html 671) (map 0) (xy 257414 259100 16080) (dir 57258 7717))

Quest.txt:
;Starter NPC
;Knight starter
(quest (index 8703 4)
(case (if (class 0) (item (1 1)))
(then (contribute 70) (supoint 77)(item (out 1 1)(in 102 1 1)(in 117 0 1)(in 118 0 1)(in 119 0 1)(in 120 0 1)(in 121 0 1)(in 30 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 337 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html 671)))
)
;Archer starter
(quest (index 8703 2)
(case (if (class 2) (item (22 1)))
(then (contribute 70) (supoint 77)(item (out 22 1)(in 108 41 1)(in 122 0 1)(in 123 0 1)(in 124 0 1)(in 125 0 1)(in 126 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 339 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html 671)))
)
;Mage starter
(quest (index 8703 3)
(case (if (class 1) (item (90 1)))
(then (contribute 70) (supoint 77) (item (out 90 1)(in 114 21 1)(in 127 0 1)(in 128 0 1)(in 129 0 1)(in 130 0 1)(in 131 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 338 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html 671)))
)

And now the File on e.pk
(filechk file_ver (country_type ENG) (filename s900671))
(background
(font 12)
(wrap 270)
(link system ( param ( width 270) ( height 255) ( style title edge system vscroll) ( caption "Talk") ( layout script) ))
)
( frame ( font 12)
( line "[Narutaru] Do you want to start?")
( line "")
( link ( text "Yes and i'am a Knight") ( param send quest 8703 4 ))
( link ( text "Yes and i'am a Archer") ( param send quest 8703 2 ))
( link ( text "Yes and i'am a Mage") ( param send quest 8703 3 ))
( link close ( text "[Talk End] I dont wanna start!"))
)
 
Last edited:
Re: [Guide] Starter NPC

Euuhm, i just wanna point something out here, if your users are stupid (or smart) and kill vulgars and **** till they drop a g1 weapon they can use your npc multiple times...
I haven't checked what items they get but they would get a shitload of contribution (who cares) and su points ...

Better use a clear in your quest.txt or even better, remove g1 drops from your server

Otherwise ppl will abuse your npc (it still isn't totally abuse-proof but it's a start)
 
Re: [Guide] Starter NPC

By me it do not work: I create a NPC and make a name for it,but when I click on NPC nothing come
My Char do not talk with him
Help me please and make my Wrongs to correct way=)
InitNPC
;starter npc
(gennpc (index 920) (country 0) (kind 0) (shape 39) (html 671) (map 0) (xy 257414 259100 16080) (dir 57258 7717))

Quest.txt:
;Starter NPC
;Knight starter
(quest (index 8703 4)
(case (if (class 0) (item (1 1)))
(then (contribute 70) (supoint 77)(item (out 1 1)(in 102 1 1)(in 117 0 1)(in 118 0 1)(in 119 0 1)(in 120 0 1)(in 121 0 1)(in 30 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 337 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html 671)))
)
;Archer starter
(quest (index 8703 2)
(case (if (class 2) (item (22 1)))
(then (contribute 70) (supoint 77)(item (out 22 1)(in 108 41 1)(in 122 0 1)(in 123 0 1)(in 124 0 1)(in 125 0 1)(in 126 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 339 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html 671)))
)
;Mage starter
(quest (index 8703 3)
(case (if (class 1) (item (90 1)))
(then (contribute 70) (supoint 77) (item (out 90 1)(in 114 21 1)(in 127 0 1)(in 128 0 1)(in 129 0 1)(in 130 0 1)(in 131 0 1)(in 48 0 5000)(in 473 0 1)(in 2319 0 10)(in 338 0 1)(in 192 0 100)(in 193 0 100)(in 194 0 100)(in 195 0 100)(in 196 0 100)(in 447 0 200)(in 485 0 100)) ))
(case (then (html 671)))
)

And now the File on e.pk
(filechk file_ver (country_type ENG) (filename s900671))
(background
(font 12)
(wrap 270)
(link system ( param ( width 270) ( height 255) ( style title edge system vscroll) ( caption "Talk") ( layout script) ))
)
( frame ( font 12)
( line "[Narutaru] Do you want to start?")
( line "")
( link ( text "Yes and i'am a Knight") ( param send quest 8703 4 ))
( link ( text "Yes and i'am a Archer") ( param send quest 8703 2 ))
( link ( text "Yes and i'am a Mage") ( param send quest 8703 3 ))
( link close ( text "[Talk End] I dont wanna start!"))
)


the S######.dat file of you got this in it (filename s900671)) and the npc has HTML 671 so... that not gonna work make the file name of the S######.dat file S000671.dat
 
Re: [Guide] Starter NPC

Euuhm, i just wanna point something out here, if your users are stupid (or smart) and kill vulgars and **** till they drop a g1 weapon they can use your npc multiple times...
I haven't checked what items they get but they would get a shitload of contribution (who cares) and su points ...

Better use a clear in your quest.txt or even better, remove g1 drops from your server

Otherwise ppl will abuse your npc (it still isn't totally abuse-proof but it's a start)

well... you can delete the su points... and the it is class so.. if you are an archer then you need a bow if you are an archer and you have a g1 stick you cant get anny thing... and on most servers you will be in 5 kills around lvl 15 then they dont even dropp weapons anny more...
 
Re: [Guide] Starter NPC

or they just keep making chars and delete them till they get g1 drops and stuff ...

believe me, ppl WILL always try to abuse any system u make, no mather how good or bad it is!

You can delete the su points yes, but eehm, let's say u run a small server with +-50 ppl on it, that's 50 potential abusers, are u going to check all the accounts?
The whole idea behind a starter npc is to automate things so that gm's have less work.

And as i said, just use a clear in your quest.txt and the problem is (partially) fixed.
Don't know how to do it? ... U got a whole Quest.txt full of examples, look at em!
 
Re: [Guide] Starter NPC

# Max. allowed Attack Points per Player (Default 1500 / 0 = Disable)
AllowedMaxAttackPoints = 300

i got that in KOSP and well i get notice wenn they have more points
 
umm, could you reupload the link, it doesnt work anymore, and i dont know how to use the dattool, so i really need a good description in the readme file, because if i download it from the internet they are for specific games

edit: i got something from another guy, but now how do i insert the .dat file back into the e.pk

perhaps you should be more clear about this in your tutorial
 
Last edited:
Status
Not open for further replies.
Back