Thread: Help
View Single Post
  #14  
Old 05-22-2001, 06:44 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
hehe, Ice Pick is getting there....

personally, I wouldn't set flags...I'd set a string with all the people that have a key and check them as they come in...like this:

NPC Code:

if (playerchats && startswith(#c,give key) && strequals(#a,Lugie)) {
tokenize #T(#e(8,-1,#c));
setstring this.KeyAccounts,#s(this.KeyAccounts) #s(#t(0));
message Key given to #t(0);
timeout = 3;
}
if (playerchats && startswith(#c,take key) && strequals(#a,Lugie)) {
setstring this.RemoveAcct,#T(#e(8,-1,#c));
tokenize #s(this.KeyAccounts);
for (i = 0; i < tokenscount; i++) {
if (!strequals(#t(i),#s(this.RemoveAcct)
setstring this.TempKeys, #s(this.TempKeys) #s(#t(i));
}
setstring this.KeyAccounts,#s(this.TempKeys);
}


not 100% guaranteed to work, but it should

-Kyle
Reply With Quote