Well hi guys, my first post hope im doing everything correct.
I managed to make the @costumeitem command work for my rAthena but when i enable this costume npc it wont find any headgears that im using, in exchange it can find my weapons... anybody can point out where is the error??
prontera,149,214,4 script Costumer#cs_0 421,{
mes "[Clown]";
mes "Here you can convert your headgears into a Costume Headgear or restore to its Original form.";
switch(select("I want to convert.:I want to restore.:No thanks.")) {
case 1:
next;
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$) ];
set .@id, getequipid(.@Part);
set .@ref, getequiprefinerycnt(.@Part);
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;
}
for(set .@i,0; .@i<4; set .@i,.@i+1)
set .@slot[.@i], getequipcardid(.@Part,.@i);
if (.@slot[0]>4000 && .@slot[0]<5000) { // If it has card don't convert
mes "[Clown]";
mes "A card? Here?!";
mes "As I said before, I don't convert headgear with cards.";
emotion e_hmm;
close;
}
getinventorylist;
for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)
if (@inventorylist_expire[.@i] != 0 && @inventorylist_equip[.@i] != 0) { // If rental don't convert
mes "[Clown]";
mes "Sorry, I don't convert a rental headgear!";
emotion e_hmm;
close;
}
if (.@ref > 0) { // If refine don't convert
mes "[Clown]";
mes "Sorry please keep in mind.";
mes "I don't convert headgear with refine.";
emotion e_hmm;
close;
}
if (!countitem(.@id)) {
mes "[Clown]";
mes "Where is "+getitemname(@id)+"...?";
npctalk "You're a snoozy cheater!";
logmes "CHEATER: Tried to sign an item not having it: "+getitemname(@id);
emotion e_wah;
close;
}
costume .@Part; // Convert the Headgear
mes "[Clown]";
mes "Done, enjoy your costume headgear.";
close;
case 2:
next;
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;
mes "[Clown]";
mes "Done, enjoy your restored headgear.";
close;
case 3:
mes "[Clown]";
mes "Very well. Return at once if you seek my services.";
close;
}
}
Question
alternate
Well hi guys, my first post hope im doing everything correct.
I managed to make the @costumeitem command work for my rAthena but when i enable this costume npc it wont find any headgears that im using, in exchange it can find my weapons... anybody can point out where is the error??
Edited by alternateLink to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.