How to add NPC with shop

Results 1 to 11 of 11
  1. #1
    Member SirJechtX is online now
    MemberRank
    Oct 2012 Join Date
    AustraliaLocation
    45Posts

    How to add NPC with shop


    RaGEZONE Recommends

    RaGEZONE Recommends

    I have followed this guide [Tutorial] Starter NPC 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


  2. #2
    Hardcore Member FlyingBurrito is online now
    MemberRank
    Jul 2016 Join Date
    114Posts

    Re: How to add NPC with shop

    Quote Originally Posted by SirJechtX View Post
    I have followed this guide [Tutorial] Starter NPC 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 000900) (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)

  3. #3
    Member Yui is offline
    MemberRank
    Jul 2015 Join Date
    GermanyLocation
    44Posts

    Re: How to add NPC with shop

    I don't know if you just missed copying it but the closing bracket for '( frame' is missing. :)
    Last edited by Yui; 22-04-17 at 10:09 PM.

  4. #4
    Member SirJechtX is online now
    MemberRank
    Oct 2012 Join Date
    AustraliaLocation
    45Posts

    Re: How to add NPC with shop

    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 by SirJechtX; 21-04-17 at 01:43 PM.

  5. #5
    Kałabanga Chelios1985 is offline
    True MemberRank
    Oct 2012 Join Date
    PolandLocation
    569Posts

    Re: How to add NPC with shop

    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 by Chelios1985; 21-04-17 at 02:01 PM.
    Leave a Like !

  6. #6
    Member Yui is offline
    MemberRank
    Jul 2015 Join Date
    GermanyLocation
    44Posts

    Re: How to add NPC with shop

    Quote Originally Posted by SirJechtX View Post
    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. :)

  7. #7
    Member SirJechtX is online now
    MemberRank
    Oct 2012 Join Date
    AustraliaLocation
    45Posts

    Re: How to add NPC with shop

    Quote Originally Posted by Yui View Post
    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

  8. #8
    Hardcore Member FlyingBurrito is online now
    MemberRank
    Jul 2016 Join Date
    114Posts

    Re: How to add NPC with shop

    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."))
    )

  9. #9
    off@kal. - on@gw2/d3 :) TranX1337 is offline
    True MemberRank
    May 2009 Join Date
    GermanyLocation
    613Posts

    Re: How to add NPC with shop

    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

  10. #10
    Hardcore Member FlyingBurrito is online now
    MemberRank
    Jul 2016 Join Date
    114Posts

    Re: How to add NPC with shop

    Quote Originally Posted by TranX1337 View Post
    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 shit 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

  11. #11
    off@kal. - on@gw2/d3 :) TranX1337 is offline
    True MemberRank
    May 2009 Join Date
    GermanyLocation
    613Posts

    Re: How to add NPC with shop

    ye right




Advertisement