Jump to content
  • 0
Sign in to follow this  
Tsuuu

Help this Function

Question

Hello , I found this function but can not remember where , everything works as expected, but would like to make a change in function and do not know how.

 

The function lists all the teams of the character, wanna listed only head - top , armor, shield , boots and robe, also list only those who have without this item , those already equipped stay off the list.

 

it's possible? Could someone please help me?

it's possible
 
it's possible
 

Function source:

 

/*=======================================================
* Returns where the current item is equipped.
*-------------------------------------------------------*/
BUILDIN(getequippedon) {
	int i = status->current_equip_item_index;
	struct map_session_data *sd;

	if (( sd = script->rid2sd(st) ) != NULL) {
		switch (i) {
		case EQI_HAND_L:
			script_pushint(st, ( sd->inventory_data[i]->type == IT_ARMOR ? EQP_SHIELD : EQP_WEAPON ));
			break;
		default:
			script_pushint(st, sd->status.inventory[i].equip);
			break;
		}
	}
	else
		script_pushint(st, 0);
	return 0;
}

Item_db:

Id: 9999
	AegisName: "Diablo_Enchant"
	Name: "Diablo Enchant"
	Type: 11
	Script: <" callfunc( "F_DiabloEnchant",9999,909 ); ">
},
{
	Id: 909
	AegisName: "Jellopy"
	Name: "Jellopy"
	Buy: 6
	Weight: 10
	BuyingStore: true
	Script: <"
		.@eqp = getequippedon();
		
		if (.@eqp & EQP_ARMOR) {
			bonus bVit,100;
		}
		if (.@eqp & EQP_HEAD_TOP) {
			bonus bInt,100;
		}
		if (.@eqp & EQP_SHOES) {
			bonus bAgi,100;
		}
	">
Edited by Tsuuu

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.