getequipbound [Request]

Lord Ganja

New member
Messages
161
Points
0
Age
34
Location
Ganja World
May I request this source coz I can't make it on my own..
default_gawi.gif
 
default_swt3.gif


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!

 
Last edited by a moderator:
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


Code:
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;}
 
Back
Top