Jump to content
  • 0
Sign in to follow this  
Lord Ganja

getequipbound [Request]

Question

May I request this source coz I can't make it on my own.. :gawi:  :swt3:

 

getequipbound <equipment slot>;

 

It returns the bound type of the currently equipped item.

 

0 - Equipment is not bounded

1 - Account Bound

2 - Guild Bound

3 - Party Bound

4 - Character Bound

 

I will use this to my custom pvp room wherein when you killed a player you have a chance to steal his currently equipped item and I want the bound type to be the same.

OnPCDieEvent:	for(.@i=0; .@i < 10; .@i++)	{		if( getequipisequiped(.@i) ) {			.@itemid = getequipid(.@i);			.@refine = getequiprefinerycnt(.@i);			.@card1 = getequipcardid(.@i,0);			.@card2 = getequipcardid(.@i,1);			.@card3 = getequipcardid(.@i,2);			.@card4 = getequipcardid(.@i,3);			if( getequipbound(.@i) )				.@bound = getequipbound(.@i);							if( rand(1,100) <= 20 ) {				delequip .@i;				if ( .@bound )					getitembound2 .@itemid,1,1,.@refine,0,.@card1,.@card2,.@card3,.@card4,.@bound,killerrid;				else					getitem2 .@itemid,1,1,.@refine,0,.@card1,.@card2,.@card3,.@card4,killerrid;			}		}	}end;

 

Thanks in advance!

Edited by Lord Ganja

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Ended up doing this on my own. Can anyone check if it has some glitches? LOL I'm not actually into source. but this script command is working fine with me.ani_pat.gif

BUILDIN(getequipbound){	int i, num, type;	TBL_PC *sd;	num=script_getnum(st,2);	sd=script->rid2sd(st);	if( sd == NULL )		return false;	if (num > 0 && num <= ARRAYLENGTH(script->equip))		i=pc->checkequip(sd,script->equip[num-1]);	type = sd->status.inventory[i].bound;	if( i > 0 && type )		script_pushint(st,type);	else		script_pushint(st,0);	return true;}

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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