Jump to content
  • 0

Help this function


Tisuuu

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   3
  • Joined:  02/14/14
  • Last Seen:  

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:

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;
		}
	">
Link to comment
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.   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...