Jump to content
  • 0

Request Costume NPC


boosack20

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  01/08/14
  • Last Seen:  

Hi,

 

I want a NPC that convert your sprite into others. More like a costume or any other headgears.

 

Sample would be my valkryie helm then using the costume to turn apple o' archer..

 

Thanks.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

read the quote below.. you can add this on NPCs and item scripts..

 

in your case for example, you can add the setlook/changelook function in the OnEquip area of the Valkyrie Helm entry in item_db into Apple o' Archer

 

5171,Valkyrie_Helm,Valkyrie Helm,5,100000,,1000,,5,,1,0xFFFFFFFE,2,2,256,,0,1,225,{ setlook 4,72; bonus bMdef,5; if(isequipped(2357,2421,2524)) bonus bAllStats,1; },{},{}

 

You can also work on it via client side, if you're going to add more items, just copy the resource data(idnum2itemdesctable, itemresnametable, etc.) then change the sprite ID in the item db, that way it would look like a Valkyrie Helm in your inventory but it would display AoA when equipped.

 

 


*setlook <look type>,<look value>;
*changelook <look type>,<look value>;
 
'setlook' will alter the look data for the invoking character. It is used 
mainly for changing the palette used on hair and clothes: you specify which look 
type you want to change, then the palette you want to use. Make sure you specify 
a palette number that exists/is usable by the client you use.
'changelook' works the same, but is only client side (it doesn't save the look value).
 
    // This will change your hair(6), so that it uses palette 8, what ever your 
    // palette 8 is, your hair will use that color
 
    setlook 6,8;
 
    // This will change your clothes(7), so they are using palette 1, whatever 
    // your palette 1 is, your clothes will then use that set of colors.
    
    setlook 7,1;
 
Here are the possible look types:
 
 0 - Base sprite
 1 - Hairstyle
 2 - Weapon
 3 - Head bottom
 4 - Head top
 5 - Head mid
 6 - Hair color
 7 - Clothes color
 8 - Shield
 9 - Shoes
 
Whatever 'shoes' means is anyone's guess, ask Gravity - the client does nothing 
with this value. It still wants it from the server though, so it is kept, but 
normally doesn't do a thing.
 
Only the look data for hairstyle, hair color and clothes color are saved to the 
char server's database and will persist. The rest freely change as the character 
puts on and removes equipment, changes maps, logs in and out and otherwise you 
should not expect to set them. In fact, messing with them is generally 
hazardous, do it at your own risk, it is not tested what will this actually do -
it won't cause database corruption and probably won't cause a server crash, but 
it's easy to crash the client with just about anything unusual.
 
However, it might be an easy way to quickly check for empty view IDs for 
sprites, which is essential for making custom headgear. 
 
Since a lot of people have different palettes for hair and clothes, it's 
impossible to tell you what all the color numbers are. If you want a serious 
example, there is a Stylist script inside the default rAthena installation that 
you can look at: 'npc/custom/stylist.txt'
Edited by sandbox
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   6
  • Joined:  01/23/14
  • Last Seen:  

/omg Is this even possible?? I wanna know if this possible cuz i want to have this script!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  01/08/14
  • Last Seen:  

There is another topic that have costume npc which turns your items to another.. but his npc removes the cards, refine and so on.. on my request I just want to change the costume of the sprite.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

of course, you can't change the item type from item_db by script (from my knowledge).

 

so the npc is just exchange your equipment with costume item based on item_db...

that's why the cards, refine, enchant, etc will gone...

Edited by Jesky
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

 

read the quote below.. you can add this on NPCs and item scripts..

 

in your case for example, you can add the setlook/changelook function in the OnEquip area of the Valkyrie Helm entry in item_db into Apple o' Archer

5171,Valkyrie_Helm,Valkyrie Helm,5,100000,,1000,,5,,1,0xFFFFFFFE,2,2,256,,0,1,225,{ setlook 4,72; bonus bMdef,5; if(isequipped(2357,2421,2524)) bonus bAllStats,1; },{},{}

You can also work on it via client side, if you're going to add more items, just copy the resource data(idnum2itemdesctable, itemresnametable, etc.) then change the sprite ID in the item db, that way it would look like a Valkyrie Helm in your inventory but it would display AoA when equipped.

 

 

*setlook <look type>,<look value>;
*changelook <look type>,<look value>;
 
'setlook' will alter the look data for the invoking character. It is used 
mainly for changing the palette used on hair and clothes: you specify which look 
type you want to change, then the palette you want to use. Make sure you specify 
a palette number that exists/is usable by the client you use.
'changelook' works the same, but is only client side (it doesn't save the look value).
 
    // This will change your hair(6), so that it uses palette 8, what ever your 
    // palette 8 is, your hair will use that color
 
    setlook 6,8;
 
    // This will change your clothes(7), so they are using palette 1, whatever 
    // your palette 1 is, your clothes will then use that set of colors.
    
    setlook 7,1;
 
Here are the possible look types:
 
 0 - Base sprite
 1 - Hairstyle
 2 - Weapon
 3 - Head bottom
 4 - Head top
 5 - Head mid
 6 - Hair color
 7 - Clothes color
 8 - Shield
 9 - Shoes
 
Whatever 'shoes' means is anyone's guess, ask Gravity - the client does nothing 
with this value. It still wants it from the server though, so it is kept, but 
normally doesn't do a thing.
 
Only the look data for hairstyle, hair color and clothes color are saved to the 
char server's database and will persist. The rest freely change as the character 
puts on and removes equipment, changes maps, logs in and out and otherwise you 
should not expect to set them. In fact, messing with them is generally 
hazardous, do it at your own risk, it is not tested what will this actually do -
it won't cause database corruption and probably won't cause a server crash, but 
it's easy to crash the client with just about anything unusual.
 
However, it might be an easy way to quickly check for empty view IDs for 
sprites, which is essential for making custom headgear. 
 
Since a lot of people have different palettes for hair and clothes, it's 
impossible to tell you what all the color numbers are. If you want a serious 
example, there is a Stylist script inside the default rAthena installation that 
you can look at: 'npc/custom/stylist.txt'

 

 

But, it will removed when the player relogin isn't?

  • Like 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Yeah setlook does, so I recommend the 2nd part where editing of the sprite of the item_db entry is involved.. that way it would be permanent.

 

I used to do this on my server before, I created costumes by duplicating items without hassle...

 

Read the item_avail.txt for more info :)

Edited by sandbox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  01/08/14
  • Last Seen:  

@Jesky - thanks for the help.

 

@sandbox - thank you. It helped me to understand on how to do this. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Glad I could help :)

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