POGING UTOY Posted January 5, 2022 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 4 Reputation: 0 Joined: 04/18/20 Last Seen: May 1, 2024 Share Posted January 5, 2022 (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, 2022 by POGING UTOY wrong grammar Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted January 5, 2022 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted January 5, 2022 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: .@equipped = true; if(inarray(.maps$,strcharinfo(3)) != -1) { for(.@a = 0; .@a < .slotlen; .@a++) .@equipped &= !getequipcardcnt(.slots[.@a]); if(.@equipped) end; for(.@a = 0; .@a < .slotlen; .@a++) { if(inarray(.@itemids,getequipid(.slots[.@a])) == -1) { .@itemids[getarraysize(.@itemids)] = getequipid(.slots[.@a]); for(.@i = 0; .@i < 4; .@i++) { .@cardid = getequipcardid(.slots[.@a],.@i); if(.@cardid >= 4000) { getmapunits(BL_PC,strcharinfo(3),.@mapusers[0]); // Add player to ongoing list. for(.@j = 0; .@j < getarraysize(.@mapusers); .@j++) { if(inarray(getd("."+strcharinfo(3)+"_mapusers"), .@mapusers[.@j]) != -1) { setd "."+strcharinfo(3)+"_mapusers["+getarraysize(getd("."+strcharinfo(3)+"_mapusers"))+"]", .@mapusers[.@j]; } } for(.@j = 0; .@j < getarraysize(getd("."+strcharinfo(3)+"_mapusers")); .@j++) { // Remove player and item list. if(inarray(.@mapusers, getd("."+strcharinfo(3)+"_mapusers["+.@j+"]")) != -1) { deletearray "."+strcharinfo(3)+"_"+getd("."+strcharinfo(3)+"_mapusers["+.@j+"]")+"_mapitems"; deletearray getd("."+strcharinfo(3)+"_mapusers["+.@j+"]"), 1; } // Searching through lists of map players cards... else if(getcharid(3) != getd("."+strcharinfo(3)+"_mapusers["+.@j+"]")) { if(inarray(getd("."+strcharinfo(3)+"_"+getd("."+strcharinfo(3)+"_mapusers["+.@j+"]")+"_mapitems"), .@cardid) != -1) { warp "prontera",0,0; dispbottom "You've been removed from the map because someone else is already using "+getitemname(.@cardid)+"."; end; } } } // Adding card to the current players list. setd "."+strcharinfo(3)+"_"+getcharid(3)+"_mapitems["+getarraysize(getd("."+strcharinfo(3)+"_"+getcharid(3)+"_mapitems"))+"]", .@cardid; } } } } } 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(.@a = 0; .@a < getarraysize(.maps$); .@a++) setmapflag .maps$[.@a], mf_loadevent; } Quote Link to comment Share on other sites More sharing options...
0 POGING UTOY Posted January 5, 2022 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 4 Reputation: 0 Joined: 04/18/20 Last Seen: May 1, 2024 Author Share Posted January 5, 2022 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, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted January 10, 2022 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...
Question
POGING UTOY
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
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.