Jump to content
  • 0
POGING UTOY

request for one card holder per guild

Question

hi guys i want to request this script 

only one holder of specific item/card per guild ( inside woe castle ) sample gtb card only one person in your guild can equip it, if other member tried  to equip he/she is automatic kick in the castle

Edited by POGING UTOY
wrong grammar
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Yeah ok this is my first attempt it's completely untested and probably not going to work. Also it's horrendous this is probably better done with source tbh.

-	script	CardHolderThing	-1,{
OnPCStatCalcEvent:
OnPCLoadMapEvent:
	[email protected] = true;
	if(inarray(.maps$,strcharinfo(3)) != -1) {
		for([email protected] = 0; [email protected] < .slotlen; [email protected]++)
			[email protected] &= !getequipcardcnt(.slots[[email protected]]);
		if([email protected])
			end;
		for([email protected] = 0; [email protected] < .slotlen; [email protected]++) {
			if(inarray([email protected],getequipid(.slots[[email protected]])) == -1) {
				[email protected][getarraysize([email protected])] = getequipid(.slots[[email protected]]);
				for([email protected] = 0; [email protected] < 4; [email protected]++) {
					[email protected] = getequipcardid(.slots[[email protected]],[email protected]);
					if([email protected] >= 4000) {
						getmapunits(BL_PC,strcharinfo(3),[email protected][0]);
						// Add player to ongoing list.
						for([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) {
							if(inarray(getd("."+strcharinfo(3)+"_mapusers"), [email protected][[email protected]]) != -1) {
								setd "."+strcharinfo(3)+"_mapusers["+getarraysize(getd("."+strcharinfo(3)+"_mapusers"))+"]", [email protected][[email protected]];
							}
						}
						for([email protected] = 0; [email protected] < getarraysize(getd("."+strcharinfo(3)+"_mapusers")); [email protected]++) {
							// Remove player and item list.
							if(inarray([email protected], getd("."+strcharinfo(3)+"_mapusers["[email protected]+"]")) != -1) {
								deletearray "."+strcharinfo(3)+"_"+getd("."+strcharinfo(3)+"_mapusers["[email protected]+"]")+"_mapitems";
								deletearray getd("."+strcharinfo(3)+"_mapusers["[email protected]+"]"), 1;
							} 
							// Searching through lists of map players cards...
							else if(getcharid(3) != getd("."+strcharinfo(3)+"_mapusers["[email protected]+"]")) {
								if(inarray(getd("."+strcharinfo(3)+"_"+getd("."+strcharinfo(3)+"_mapusers["[email protected]+"]")+"_mapitems"), [email protected]) != -1) {
									warp "prontera",0,0;
									dispbottom  "You've been removed from the map because someone else is already using "+getitemname([email protected])+".";
									end;
								}
							}
						}
						// Adding card to the current players list.
						setd "."+strcharinfo(3)+"_"+getcharid(3)+"_mapitems["+getarraysize(getd("."+strcharinfo(3)+"_"+getcharid(3)+"_mapitems"))+"]", [email protected];
					}
				}
			}
		}
	}
	end;
OnInit:
	setarray .slots, EQI_ACC_L, EQI_ACC_R, EQI_GARMENT, EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_SHOES;
	setarray .maps$, "alde_gld", "aru_gld", "gef_fild13";
	.slotlen = getarraysize(.slots);
	for([email protected] = 0; [email protected] < getarraysize(.maps$); [email protected]++)
		setmapflag .maps$[[email protected]], mf_loadevent;
}

 

Link to comment
Share on other sites

  • 0

may try this.

https://pastebin.com/raw/4xgQ2Krr

however, this cant auto handle the scenario where the player left the guild after he registered as the member who using the GTB during WOE.

But if you are a guild master, then you may try to use the command [at]gmreset to force your guild member (even if left guild) reset it.

  • Love 1
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...

Important Information

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