Jump to content
  • 0

Script checks for "costume items"


Question

Posted

Hello guys!

 

I would like to request a simple item script regarding costumes type items.

 

Please help me make a script that checks "if" 3 "costume" type items (upper, mid, lower) are equipped then gives all stats +1. I cant seem to find the right command/s for it.

 

Any help would be greatly appreciated.

 

Thank you in advance guys!

 

 

 

 

 

 

12 answers to this question

Recommended Posts

Posted

To give allstats regardless the costumes ID :

 

  • Method 1.

For each costume ID in item_db add

...,{},{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }
  • Method 2.

Apply the patch for OnPCStatCalcEvent, recompile then load the following script :

-	script	bonus_costumes	-1,{
OnPCStatCalcEvent:
	if ( getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) )
		bonus bAllStats,1;
	end;
}
Posted

Thanks for the reply!

 

I think I like the method 1 better since it does not involve changing SRC.

 

So I will put those codes in ALL of the costume type items, but if they wear like 3 of those wont they get like +3 stats all in all? I only want a max of +1 stats when they wear all 3.

 

Thank you my friend!

Posted

but if they wear like 3 of those wont they get like +3 stats all in all?

Nope the variable @wear prevent multi-allstats, they get only allstats +1 when wearing the set of costumes (low, middle, up) ;)

Posted

but if they wear like 3 of those wont they get like +3 stats all in all?

Nope the variable @wear prevent multi-allstats, they get only allstats +1 when wearing the set of costumes (low, middle, up) ;)

 

 

I tried the script but I think its not working my friend.

 

I equipped all these 3 costumes (upper,mid,lower) :

 

19504,T_Sunglasses,Costume Sunglasses,5,0,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,12,{ bonus bUnbreakableHelm,0; },{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }

19505,T_Cigarette,Costume Cigarette,5,0,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,54,{ bonus bUnbreakableHelm,0; },{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }

19506,T_Valkyrie_Feather_Band,Costume Valkyrie Feather Band,5,0,,0,,0,,0,0xFFFFFFFF,7,2,1024,,0,1,300,{bonus bUnbreakableHelm,0;},{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }

 

What am I missing?

 

Thanks!

Posted

 

but if they wear like 3 of those wont they get like +3 stats all in all?

Nope the variable @wear prevent multi-allstats, they get only allstats +1 when wearing the set of costumes (low, middle, up) ;)

 

 

I tried the script but I think its not working my friend.

 

I equipped all these 3 costumes (upper,mid,lower) :

 

19504,T_Sunglasses,Costume Sunglasses,5,0,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,12,{ bonus bUnbreakableHelm,0; },{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }

19505,T_Cigarette,Costume Cigarette,5,0,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,54,{ bonus bUnbreakableHelm,0; },{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }

19506,T_Valkyrie_Feather_Band,Costume Valkyrie Feather Band,5,0,,0,,0,,0,0xFFFFFFFF,7,2,1024,,0,1,300,{bonus bUnbreakableHelm,0;},{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{ set @wear,0; }

 

What am I missing?

 

Thanks!

Just a follow up on the above.

 

Thank you Mr. Capuche

 

:)

Posted

Put the check in on_script part - it seems the command check the equipment before the server make the equipment equipped.

...,{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }
Posted

Put the check in on_script part - it seems the command check the equipment before the server make the equipment equipped.

...,{ if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }

 

First of all thanks for your reply.

 

I tried this fix my friend but it still doesnt work. No +1 to stats given.

 

Here is what I used:

 

19504,T_Sunglasses,Costume Sunglasses,5,0,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,12,{ bonus bUnbreakableHelm,0; if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }

19505,T_Cigarette,Costume Cigarette,5,0,,0,,0,,0,0xFFFFFFFF,7,2,4096,,0,0,54,{ bonus bUnbreakableHelm,0; if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }

19506,T_Valkyrie_Feather_Band,Costume Valkyrie Feather Band,5,0,,0,,0,,0,0xFFFFFFFF,7,2,1024,,0,1,300,{bonus bUnbreakableHelm,0; if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }

 

Though there is no error in map console when loaded.

 

Thank you my friend! :)

Posted
...{ bonus bUnbreakableHelm,0; if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) && @wear == 0 ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }

This one should work (it's working on my test server)

Posted
...{ bonus bUnbreakableHelm,0; if (getequipisequiped(EQI_COSTUME_HEAD_LOW) && getequipisequiped(EQI_COSTUME_HEAD_MID) && getequipisequiped(EQI_COSTUME_HEAD_TOP) && @wear == 0 ) { bonus bAllStats,1; set @wear,1; } },{},{ set @wear,0; }

This one should work (it's working on my test server)

 

Oh huhu its still not working in mine. Will this work on 3ceam EMU? Maybe this is the problem? Maybe we can do adjustments to it to work on 3ceam?

 

Thanks!

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.

  • Recently Browsing   0 members

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