POGING UTOY Posted January 5 Share Posted January 5 (edited) 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 January 5 by POGING UTOY wrong grammar Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted January 5 Share Posted January 5 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; } Quote Link to comment Share on other sites More sharing options...
0 POGING UTOY Posted January 5 Author Share Posted January 5 you're right its not working i hope someone will make it work Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted January 10 Share Posted January 10 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. 1 Quote Link to comment Share on other sites More sharing options...
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 UTOYwrong grammar
Link to comment
Share on other sites