Custom sprites

HyperSonic2097

New member
Messages
50
Points
0
Ok guys, i have tried to search around, but i'm still confused.

I have wrote a script that i have put in /Hercules/npc/custom/aggiuntivi/regen.txt

The script works fine. My question is, how i change the sprite with MY OWN CREATED sprite?

prontera,156,179,4      script  REGENERATOR     PLASMA_B,{

PLASMA_B is obviously a placeholder... I want to put a sprite that is not in lists like these https://dotalux.com/ro/npclist/

I have created a regenerator.act and regenerator.spr already. Now i'm confused on how i have to add that to "list" in a way that i can declare in regen.txt something like prontera,156,179,4      script  REGENERATOR     REGENERATOR,{

Thanks for the reply and for your time. I know that is a noob question, but... :D

 
the list of NPC ids is in db/constants.conf around line 2630 (search for FAKE_NPC)

 
the list of NPC ids is in db/constants.conf around line 2630 (search for FAKE_NPC)
Hi, thanks for the reply. I have tried to write that between free ids and hidden ecc

    // Free IDs 126 - 138
    REGENERATOR:              126
    HIDDEN_WARP_NPC:          139

and in regen.txt i have put this

prontera,156,179,4      script  REGENERATOR     REGENERATOR,{

But the npc doesen't load. The console give me this error... Any Hint?

screen.png

 
from the screenshot I see you are using reloadscript, but the const db doesn't get reloaded when using this command

 
those are reserved for future use, but feel free to use anything that is free between 400 and 1000, or between 10001 and 10248

currently the only free ID within this range is 10204 but you could manually change src/map/npc.h on line 147 (currently the max is 10248)

 
Last edited by a moderator:
those are reserved for future use, but feel free to use anything that is free between 400 and 1000, or between 10001 and 10248

currently the only free ID within this range is 10204 but you could manually change src/map/npc.h on line 147 (currently the max is 10248)
Ok, i have raised the max at 10448

// Old NPC range
#define MAX_NPC_CLASS 1000
// New NPC range
#define MAX_NPC_CLASS2_START 10001
#define MAX_NPC_CLASS2_END 10448

 modified constants.conf in this way

..

    MER_SWORDMAN09:    6045
    MER_SWORDMAN10:    6046
//CUSTOM SPRITES RANGE 10249 - 10448
    REGENERATOR:       10249

but now doesen't load anymore the script.Stille give me this error.

Immagine.png

 
Last edited by a moderator:
Before I have forgot to recompile the server! But now this are the result...It search for a empty name!

Why? I have to declare something even client side? The error "status _set_viewdata (npc) ecc from the console is gone, so server side it seems all ok

Immagine.png

edit: I tried to edit client side data/luafiles514/luafiles/datainfo/npcidentity.lub in this way

..

    JT_4_BONFIRE = 10252,
    JT_4_PCCOUNT = 10253,
    JT_REGENERATOR = 10249    
}

and data/luafiles514/luafiles/datainfo/jobname.lub

    [jobtbl.JT_MD_ORC_LORD] = "ORC_LORD",
    [jobtbl.JT_MD_ORC_FLOWER] = "BLUE_FLOWER",
    [jobtbl.REGENERATOR] = "regenerator"

No luck for now, the error persist

EDIT2: using ID's range > 10250 instead 10249 it finally work!

Thanks meko for the support!

 
Last edited by a moderator:
Hi, someone can tell me actually what's is the valid range for custom npc in new hercules release?

And max value for #define MAX_NPC_CLASS2_END in npc.h?

 
Back
Top