Jump to content
  • 0

Script checks for "costume items"


johnbond

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

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!

 

 

 

 

 

 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

I would like to request a simple item script regarding costumes type items.
Move to script request section
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

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!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

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) ;)

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

you can use

db/re/item_combo_db.txt#L4

ID:ID:ID,{ bonus bAllStats,1; }
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

to give allstats +1 regardless of the costume id, item combo db isn't the best way...

for only 20 upper, mid, lower costumes he must write 20*20*20 lines...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

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!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

 

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

 

:)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

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; }
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

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! :)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

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

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