Jump to content
  • 0

About new Rathena change const.txt , can't use custom npc


redlightliu

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   1
  • Joined:  04/24/17
  • Last Seen:  

About new Rathena change const .txt( 7 days ).

I can't use my custom NPC.

How to use custom NPC in new Rathena?

If I use in const.txt,

map.serv will be [Error]:status_set_viewdata (NPC): No view data for class <your custom NPC number>

Any body can use custom in new Rathena?

Edited by redlightliu
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

9 hours ago, redlightliu said:

Custom npc sprite:unsure:

a new ID too? I guess because your NPC id is out of range based on this check. https://github.com/rathena/rathena/commit/f42c2ff21171ac48fec329d6ff0dfdbbd2f0ea59#diff-301256667588bcb9a1bbf9b2ab500229R1094 try change the ID (<-- better this) or add/edit the range urself

// Old NPC range
#define MAX_NPC_CLASS NPC_RANGE2_END
// New NPC range
#define MAX_NPC_CLASS2_START NPC_RANGE3_START
#define MAX_NPC_CLASS2_END NPC_RANGE3_END

//Checks if a given id is a valid npc id. [Skotlex]
//Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001)
#define npcdb_checkid(id) ( ( (id) > NPC_RANGE1_START && (id) < NPC_RANGE1_END ) || (id) == JT_HIDDEN_WARP_NPC || ( (id) > NPC_RANGE2_START && (id) < NPC_RANGE2_END ) || (id) == JT_INVISIBLE || ( id > NPC_RANGE3_START && id < NPC_RANGE3_END ) )

 

or can u paste here what's u write on const.txt and in ur script definition?

Edited by Cydh
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   1
  • Joined:  04/24/17
  • Last Seen:  

UP

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1533
  • Reputation:   235
  • Joined:  08/03/12
  • Last Seen:  

2 hours ago, redlightliu said:

About new Rathena change const .txt( 7 days ).

I can't use my custom NPC.

How to use custom NPC in new Rathena?

If I use in const.txt,

map.serv will be [Error]:status_set_viewdata (NPC): No view data for class <your custom NPC number>

Any body can use custom in new Rathena?

npc id ? http://nn.ai4rei.net/dev/npclist/?qq=8

or custom npc sprite ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   1
  • Joined:  04/24/17
  • Last Seen:  

1 minute ago, Chaos92 said:

npc id ? http://nn.ai4rei.net/dev/npclist/?qq=8

or custom npc sprite ?

Custom npc sprite:unsure:

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   1
  • Joined:  04/24/17
  • Last Seen:  

On 2017/10/22 at 10:29 AM, Cydh said:

a new ID too? I guess because your NPC id is out of range based on this check. https://github.com/rathena/rathena/commit/f42c2ff21171ac48fec329d6ff0dfdbbd2f0ea59#diff-301256667588bcb9a1bbf9b2ab500229R1094 try change the ID (<-- better this) or add/edit the range urself


// Old NPC range
#define MAX_NPC_CLASS NPC_RANGE2_END
// New NPC range
#define MAX_NPC_CLASS2_START NPC_RANGE3_START
#define MAX_NPC_CLASS2_END NPC_RANGE3_END

//Checks if a given id is a valid npc id. [Skotlex]
//Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001)
#define npcdb_checkid(id) ( ( (id) > NPC_RANGE1_START && (id) < NPC_RANGE1_END ) || (id) == JT_HIDDEN_WARP_NPC || ( (id) > NPC_RANGE2_START && (id) < NPC_RANGE2_END ) || (id) == JT_INVISIBLE || ( id > NPC_RANGE3_START && id < NPC_RANGE3_END ) )

 

or can u paste here what's u write on const.txt and in ur script definition?

Thanks, I will change ID in other official NPC.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...