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!

How to add NPC with shop

Junior Spellweaver
Joined
Oct 15, 2012
Messages
105
Reaction score
9
I have followed this guide http://forum.ragezone.com/f554/tutorial-starter-npc-268405/ just to make an NPC that sells basic equipment to test for server. I have setup NPC's they load into game and they have their names working. I cannot get any chat to open with them. Only way I can get it to work is to add a different html number to them so it uses a different dialogue.

Here is my .dat file for the chat text. filename is s000900.dat
Code:
(filechk file_ver (country_type ENG) (filename s000900))
(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 "In-Sall : Come here~ Come. We have plenty of equipment for strength and defence. They're needed in the battle. I guarantee the effectiveness.")
	( line "")

	( link ( text "[Enter Shop] Oh! There're some great gear here! Please show me some") ( param load "store" 71))
	( link close ( text "[Talk End] Foods for magic points¡¦ I'm not ready for them yet."))

initnpc has this information
Code:
;Knight Merchant Narootuh
(gennpc (index 3000) (country 2) (kind 0) (shape 9) (html 900) (map 0) (xy 258001 259032 16044) (dir 257391 259501))

What am I doing wrong that will cause this text to not be linked to the npc? I think it looks ok I coppied it from working NPC and just changed shop and htm.

Any help please
 
Banned
Banned
Joined
Jul 14, 2016
Messages
184
Reaction score
77
I have followed this guide http://forum.ragezone.com/f554/tutorial-starter-npc-268405/ just to make an NPC that sells basic equipment to test for server. I have setup NPC's they load into game and they have their names working. I cannot get any chat to open with them. Only way I can get it to work is to add a different html number to them so it uses a different dialogue.

Here is my .dat file for the chat text. filename is s000900.dat
Code:
(filechk file_ver (country_type ENG) (filename s000900))
(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 "In-Sall : Come here~ Come. We have plenty of equipment for strength and defence. They're needed in the battle. I guarantee the effectiveness.")
    ( line "")

    ( link ( text "[Enter Shop] Oh! There're some great gear here! Please show me some") ( param load "store" 71))
    ( link close ( text "[Talk End] Foods for magic points¡¦ I'm not ready for them yet."))

initnpc has this information
Code:
;Knight Merchant Narootuh
(gennpc (index 3000) (country 2) (kind 0) (shape 9) ([COLOR=#ff0000]html 000900[/COLOR]) (map 0) (xy 258001 259032 16044) (dir 257391 259501))

What am I doing wrong that will cause this text to not be linked to the npc? I think it looks ok I coppied it from working NPC and just changed shop and htm.

Any help please

(html 900)

should be

(html 000900)
 
Upvote 0

Yui

Initiate Mage
Joined
Jul 21, 2015
Messages
69
Reaction score
62
I don't know if you just missed copying it but the closing bracket for '( frame' is missing. :)
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
Oct 15, 2012
Messages
105
Reaction score
9
I tired both options, I changed the charter to html 000900 and it still changed nothing.

Also I checked the frame bracket and it is not in any other html script on default kal. I added it on my scripts and it still doesn't operate

Changed code to this
Code:
;Knight Merchant Narootuh
(gennpc (index 3000) (country 2) (kind 0) (shape 9) (html 000900) (map 0) (xy 258001 259032 16044) (dir 257391 259501))

Also tried this
Code:
(filechk file_ver (country_type ENG) (filename s000900))
(background
    (font 12) 
    (wrap 270)
    (link system ( param ( width 270) ( height 255) ( style title edge system vscroll) ( caption "Talk") ( layout script) ))
)

( frame) ( font 12) also tried ( frame ( font 12)) none work

    ( line "In-Sall : Come here~ Come. We have plenty of equipment for strength and defence. They're needed in the battle. I guarantee the effectiveness.")
    ( line "")

    ( link ( text "[Enter Shop] Oh! There're some great gear here! Please show me some") ( param load "store" 71))
    ( link close ( text "[Talk End] Foods for magic points¡¦ I'm not ready for them yet."))
 
Last edited:
Upvote 0
Joined
Oct 10, 2012
Messages
798
Reaction score
292
serverside initnpc should be html 900 merchants kind 1, you probably want to use macro merchant right?
if ure not sure of something or something does not work as it should do , look for example at other files , like other merchant e.pk file , the same about all other things ,
there can be so many things that cause such things , can be doubled index , wrong kind , country , even spawn on wrong map ,
 
Last edited:
Upvote 0

Yui

Initiate Mage
Joined
Jul 21, 2015
Messages
69
Reaction score
62
Also tried this
Code:
(filechk file_ver (country_type ENG) (filename s000900))
(background
    (font 12) 
    (wrap 270)
    (link system ( param ( width 270) ( height 255) ( style title edge system vscroll) ( caption "Talk") ( layout script) ))
)

( frame) ( font 12) also tried ( frame ( font 12)) none work

    ( line "In-Sall : Come here~ Come. We have plenty of equipment for strength and defence. They're needed in the battle. I guarantee the effectiveness.")
    ( line "")

    ( link ( text "[Enter Shop] Oh! There're some great gear here! Please show me some") ( param load "store" 71))
    ( link close ( text "[Talk End] Foods for magic points¡¦ I'm not ready for them yet."))

Sorry I didnt explain that thorough. ^^
the bracket is one that should be around the other things that follow.

Code:
(filechk file_ver (country_type ENG) (filename s000900))
(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 "In-Sall : Come here~ Come. We have plenty of equipment for strength and defence. They're needed in the battle. I guarantee the effectiveness.")
    ( line "")

    ( link ( text "[Enter Shop] Oh! There're some great gear here! Please show me some") ( param load "store" 71))
    ( link close ( text "[Talk End] Foods for magic points¡¦ I'm not ready for them yet."))
)

like this, thats why I said im not sure if you just forgot to copy it. :)
 
Upvote 0
Junior Spellweaver
Joined
Oct 15, 2012
Messages
105
Reaction score
9
Sorry I didnt explain that thorough. ^^
the bracket is one that should be around the other things that follow.

Code:
(filechk file_ver (country_type ENG) (filename s000900))
(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 "In-Sall : Come here~ Come. We have plenty of equipment for strength and defence. They're needed in the battle. I guarantee the effectiveness.")
    ( line "")

    ( link ( text "[Enter Shop] Oh! There're some great gear here! Please show me some") ( param load "store" 71))
    ( link close ( text "[Talk End] Foods for magic points¡¦ I'm not ready for them yet."))
)

like this, thats why I said im not sure if you just forgot to copy it. :)

I was literally just going through and redoing all my npc's and found this. Came back here to say I understand you now but thanks for clarifying anyway. Wish I had come back earlier. Thank you very much
 
  • Like
Reactions: Yui
Upvote 0
Banned
Banned
Joined
Jul 14, 2016
Messages
184
Reaction score
77
i do not know if you figured it our or not i was rebuilding one from my old server files for you. Like Chelios said it can be a number of things.

Try this if you havent fixed yours yet and see if it works.

;Knight Merchant Narootuh

Code:
(gennpc (index 3000) (country 2) (kind 1) (shape 9) (html 900) (map 0) (xy 267781 242663 19630) (dir 257391 259501))


Code:
(filechk file_ver (country_type ENG) (filename s000900))
(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 "Come here. We have plenty of equipment for strength and defence. They are needed in battle. I guarantee the effectiveness")
    ( line "")
    ( link ( text "[Enter Shop] We have some great gear here ! Please show me some.") ( param load "store" 71))
    ( line "")
    ( link close ( text "[Talk End] I'm not ready for them yet."))
)
 
Upvote 0
Banned
Banned
Joined
Jul 14, 2016
Messages
184
Reaction score
77
i was just like "wtf" after i seen all that answers..
btw it even can be html "fuckoff" and it will be loaded... dont have to be 0009000
thats what i thought too at first but then i just figured ... might as well try everything LOL

you just never know what kind of dumb poop it could be making something not work since there are so many reasons it could be.

Honestly ... i was just happy to see this section come alive again even if it was to help someone
 
Upvote 0
Back
Top