Jump to content

Costume NPC and @costumeitem


Rebel

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  08/29/14
  • Last Seen:  

where should i put .diff files please reply 

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Can someone modified this into latest? this is a good feature.!

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  88
  • Reputation:   0
  • Joined:  08/25/12
  • Last Seen:  

why i cant find the NPC location?

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   1
  • Joined:  09/19/14
  • Last Seen:  

Discord: https://discord.gg/uh3GJ9XxqQ

Edited by Dev-Merot
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

please update this to be able to be compatible to the latest git

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  11/24/12
  • Last Seen:  

I have an error in the map server

 

[Error]:  Loading NPC file: npc/custom/costume.txt
script error on npc/custom/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared f
tion
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it
uh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part, // Convert the Headgear
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
Edited by Shen
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   22
  • Joined:  10/24/14
  • Last Seen:  

Hey, Just managed to get it work!

 

I had some of the issues others had because the .diff was old.

After manually editing few lines, it worked for me.

 

These days you could just use/make the costume items in the item_db. Just like normal headgear except equipment's placement is different.

 

 1024 = Costume Top Headgear

 2048 = Costume Mid Headgear

 4096 = Costume Low Headgear

 

But its nice functions for making just a quick costume change.

 

My commits at GitHub:


 

Here is my diff file:

rAthena commit hash: 1325e6889199aa3c4d89ade090398d225ab0147b

My commit hash: 92676a4f7440f0e87e221615612b0700aedeaa14

Date created: 29-30.4.2015


 

How to apply a diff file in git?

1. Put the diff file in rathena root folder

2. Check what will be changed: git apply --check my_file_name.diff

3. Apply the changes in diff file: git apply my_file_name.diff

 

Remember to recompile when done.

 

I hope this helps  /no1

 

--

A small update (19.03.2016): After about one year I made a merge with the upstream.. a freaking monstrous pile of changes had taken place. After merge I only had to do a small edit on status.c but it seems to be working just fine.



if (i == EQI_AMMO || i == EQI_COSTUME_HEAD_TOP || i == EQI_COSTUME_HEAD_MID || i == EQI_COSTUME_HEAD_LOW) // Costume item edit

Edited by Sehrentos
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

successfully recompiled my server files but i have 1 concern sir @Sehrentos

 

post-908-0-79166300-1414506408_thumb.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  11/24/12
  • Last Seen:  

thanks for your Reply Sehrentos but i still have the same probleme >_< maybe because of the REvision ? i'm using the 17421

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   1
  • Joined:  12/12/13
  • Last Seen:  

Reply pls 

 

 

 

[Error]:  Loading NPC file: npc/custom/Eclipse/costume.txt
script error on npc/custom/Eclipse/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared function
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it, huh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part;
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
 

 

 

Same Problem.... !

Edited by exchisu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  09/22/14
  • Last Seen:  

Reply pls 

 

 

 

[Error]:  Loading NPC file: npc/custom/Eclipse/costume.txt
script error on npc/custom/Eclipse/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared function
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it, huh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part;
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
 

 

 

Same Problem.... !

 

Find this codes:

                               mes "[Clown]";
                               mes "Need some time to think about it, huh?";
                               mes "Alright, I can understand.";
                               close;
                       }
                       'c'ostume .@Part;
                       mes "[Clown]";
                       mes "Done, enjoy your costume headgear.";
                       close;
       case 2:
                       next;

and change it to this one:

                               mes "[Clown]";
                               mes "Need some time to think about it, huh?";
                               mes "Alright, I can understand.";
                               close;
                       }
                       costume .@Part;
                       mes "[Clown]";
                       mes "Done, enjoy your costume headgear.";
                       close;
       case 2:
                       next;
Edited by ChiroDev
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

 

Reply pls 

 

 

 

[Error]:  Loading NPC file: npc/custom/Eclipse/costume.txt
script error on npc/custom/Eclipse/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared function
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it, huh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part;
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
 

 

 

Same Problem.... !

 

Find this codes:

                               mes "[Clown]";
                               mes "Need some time to think about it, huh?";
                               mes "Alright, I can understand.";
                               close;
                       }
                       'c'ostume .@Part;
                       mes "[Clown]";
                       mes "Done, enjoy your costume headgear.";
                       close;
       case 2:
                       next;

and change it to this one:

                               mes "[Clown]";
                               mes "Need some time to think about it, huh?";
                               mes "Alright, I can understand.";
                               close;
                       }
                       costume .@Part;
                       mes "[Clown]";
                       mes "Done, enjoy your costume headgear.";
                       close;
       case 2:
                       next;

 

 

I think the NPC is not the issue. the reason for this are " expect command, missing function name or calling undeclared function " 

 

It's a command that the script didn't acknowledge as a function and missing. apply the source code and this NPC will work.

Reply pls 

 

 

 

[Error]:  Loading NPC file: npc/custom/Eclipse/costume.txt
script error on npc/custom/Eclipse/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared function
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it, huh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part;
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
 

 

 

Same Problem.... !

 

Hope this helps you guys http://rathena.org/board/topic/82370-costume-npc-and-costumeitem/?p=272111

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

// -------------------------------------------------------------------------------
//     Script Name : Headgear to Costume converter >> Costume to Headgear converter
// -------------------------------------------------------------------------------
// Description :
// - Allows a user to convert the equipped headgear (on Top, Mid or Low) into a
// costume item. It will remove any card and refine of the Item.
// - Allows a user to restore the equipped costume headgear (on Top, Mid or Low)
// into its original form. It will not return any card or refine of the item.
// -------------------------------------------------------------------------------
-    script    Costume Clown    -1,{
    mes "[Clown]";
    mes "Here you can convert your headgears into a Costume Headgear or restore to its Original State.";
    mes "And it only cost 1 ^0000FFCostume Ticket^000000 when you're converting or restoring your headgear.";
    switch(select("I want to convert.:I want to restore.:No thanks.")) {
    case 1:
            next;
            if(countitem(8502) <1) {
            mes "[Clown]";
            mes "I need at least 1 ^0000FFCostume Ticket^000000 to convert your headgear into a ^0000FFCostume^000000";
            close;
            }
            mes "[Clown]";
            mes "Please, select what to convert.";
            mes "Remember, cards and refine will be removed.";
            next;
                setarray .@Position$[1],"Top","Mid","Low";
                setarray .@Position[1], 1, 9, 10;
                set .@Menu$,"";
            for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
            {
                if( getequipisequiped(.@Position[.@i]) )
                set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
                set .@Menu$, .@Menu$ + ":";
            }
            set .@Part, .@Position[ select(.@Menu$) ];
            if( !getequipisequiped(.@Part) )
            {
                mes "[Clown]";
                mes "Your not wearing anything there...";
                close;
            }
            mes "[Clown]";
            mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
            next;
            if( select("Yes, proceed:No, I am sorry.") == 2 )
            {
                mes "[Clown]";
                mes "Need some time to think about it, huh?";
                mes "Alright, I can understand.";
                close;
            }
            costume .@Part; // Convert the Headgear
            delitem 8502,1;
            mes "[Clown]";
            mes "Done, enjoy your costume headgear.";
            close;
    case 2:
            next;
            if(countitem(8502) <1) {
            mes "[Clown]";
            mes "I need at least 1 ^0000FFCostume Ticket^000000 to restoring your headgear into its Original State.";
            close;
            }
            mes "[Clown]";
            mes "Please, select what to restore.";
            mes "Remember, I will only restore it back without refine and cards.";
            next;
                setarray .@Position$[1],"Top","Mid","Low";
                setarray .@Position[1], 13, 12, 11;
                set .@Menu$,"";
            for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
            {
                if( getequipisequiped(.@Position[.@i]) )
                set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
                set .@Menu$, .@Menu$ + ":";
            }
            set .@Part, .@Position[ select(.@Menu$) ];
            if( !getequipisequiped(.@Part) )
            {
                mes "[Clown]";
                mes "Your not wearing anything there...";
                close;
            }
            mes "[Clown]";
            mes "You want to restore your " + getitemname(getequipid(.@Part)) + "?";
            next;
            if( select("Yes, proceed:No, I am sorry.") == 2 )
            {
                mes "[Clown]";
                mes "Need some time to think about it, huh?";
                mes "Alright, I can understand.";
                close;
            }
            a = getequipid(.@Part);            
            delitem a,1;
            getitem a,1;
            delitem 8502,1;
            
            mes "[Clown]";
            mes "Done, enjoy your restored headgear.";
            close;
        
    case 3:
        next;
        mes "[Clown]";
        mes "Very well. Return at once if you seek my services.";
        close;
    }
}
// --------------------------------------------------------------------------
// Use duplicates to put your npc on different cities
// --------------------------------------------------------------------------
prontera,139,173,5    duplicate(Costume Clown)    Costume Clown#1    715

Can anyone help me to ignore bounded items when converting/restoring (Not showing in the list)

Thanks~!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   1
  • Joined:  12/12/13
  • Last Seen:  

 

 

Reply pls 

 

 

 

[Error]:  Loading NPC file: npc/custom/Eclipse/costume.txt
script error on npc/custom/Eclipse/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared function
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it, huh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part;
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
 

 

 

Same Problem.... !

 

Find this codes:

                               mes "[Clown]";
                               mes "Need some time to think about it, huh?";
                               mes "Alright, I can understand.";
                               close;
                       }
                       'c'ostume .@Part;
                       mes "[Clown]";
                       mes "Done, enjoy your costume headgear.";
                       close;
       case 2:
                       next;

and change it to this one:

                               mes "[Clown]";
                               mes "Need some time to think about it, huh?";
                               mes "Alright, I can understand.";
                               close;
                       }
                       costume .@Part;
                       mes "[Clown]";
                       mes "Done, enjoy your costume headgear.";
                       close;
       case 2:
                       next;

 

 

I think the NPC is not the issue. the reason for this are " expect command, missing function name or calling undeclared function " 

 

It's a command that the script didn't acknowledge as a function and missing. apply the source code and this NPC will work.

Reply pls 

 

 

 

[Error]:  Loading NPC file: npc/custom/Eclipse/costume.txt
script error on npc/custom/Eclipse/costume.txt line 45
    parse_line: expect command, missing function name or calling undeclared function
    40 :                                mes "[Clown]";
    41 :                                mes "Need some time to think about it, huh?";
    42 :                                mes "Alright, I can understand.";
    43 :                                close;
    44 :                        }
*   45 :                        'c'ostume .@Part;
    46 :                        mes "[Clown]";
    47 :                        mes "Done, enjoy your costume headgear.";
    48 :                        close;
    49 :        case 2:
    50 :                        next;
 

 

 

Same Problem.... !

 

Hope this helps you guys http://rathena.org/board/topic/82370-costume-npc-and-costumeitem/?p=272111

 

 

 

all of these src edit, are for Add the command to rAthena ? because the cmd error a guy told me, are commands for eAmod no for rAthena, that's why

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

how to remove the effect of costume item

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   22
  • Joined:  10/24/14
  • Last Seen:  

how to remove the effect of costume item

 

You need to edit status.c find " for (i = 0; i < EQI_MAX; i++) " some where around line 2959 and edit:

if (i == EQI_AMMO || i == EQI_COSTUME_TOP || i == EQI_COSTUME_MID || i == EQI_COSTUME_LOW)

This should disable bonus stats to effect player from all costume gear.

 

+ I'm not sure but you might also need to disable equipment autobonus edit pc_delautobonus and pc_exeautobonus in pc.c havent tested it.

 

Edit: This is updated in my previous post:

http://rathena.org/board/topic/82370-costume-npc-and-costumeitem/?p=272111

Edited by Sehrentos
Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

 

Hey, Just managed to get it work!
 
I had some of the issues others had because the .diff was old.
After manually editing few lines, it worked for me.
 
These days you could just use/make the costume items in the item_db. Just like normal headgear except equipment's placement is different.
 
 1024 = Costume Top Headgear
 2048 = Costume Mid Headgear
 4096 = Costume Low Headgear
 
But its nice functions for making just a quick costume change.
 
My commits at GitHub:
 
Here is my diff file:
rAthena commit hash: 1325e6889199aa3c4d89ade090398d225ab0147b
My commit hash: 92676a4f7440f0e87e221615612b0700aedeaa14
Date created: 29-30.4.2015
 
How to apply a diff file in git?
1. Put the diff file in rathena root folder
2. Check what will be changed: git apply --check my_file_name.diff
3. Apply the changes in diff file: git apply my_file_name.diff
 
Remember to recompile when done.
 
I hope this helps  /no1

 

I managed to make this work, but how to remove the effect when turned to costume?

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  114
  • Topics Per Day:  0.03
  • Content Count:  298
  • Reputation:   4
  • Joined:  03/13/12
  • Last Seen:  

can u please convert it for eathena thanks

Link to comment
Share on other sites

  • 11 months later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  08/10/13
  • Last Seen:  

Hello,

Anyone got it working for recent rAthena ?

Thanks !

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   2
  • Joined:  06/26/16
  • Last Seen:  

I got it almost working, except that the npc isnt converting the item to costume, it only changes the costume to regular item and it can make duplicates also.

Link to comment
Share on other sites

  • 6 months later...

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  30
  • Reputation:   0
  • Joined:  10/25/15
  • Last Seen:  

Where do I put the diff file?

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

where to put .diff??? please pm me for guide or post reply thank you

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/25/16
  • Last Seen:  

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
Reply to this topic...

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