Jump to content

Recommended Posts

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...
Posted (edited)

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
Posted (edited)
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
  • 4 weeks later...
Posted (edited)

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
Posted (edited)

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
Posted

 

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

Posted

// -------------------------------------------------------------------------------
//     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~!

Posted

 

 

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

  • 3 weeks later...
  • 2 weeks later...
Posted (edited)

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
  • 5 months later...
Posted

 

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?

  • 2 weeks later...
  • 11 months later...
  • 3 weeks later...
Posted

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.

  • 6 months later...
  • 2 months later...
  • 4 months later...
  • 1 month later...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...