Thread: Help
View Single Post
  #17  
Old 11-12-2001, 11:44 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Exclamation well...

maybe doing using some other method...

NPC Code:

// NPC made by PastAustin
//#CLIENTSIDE
setstring server.houseowner,Nick P2P; // this is the house owner's accountname

if (playerenters) {toweapons -System;}
if (playerchats&&strequals(#a,#s(server.houseowner))) {react();}
function react() {
tokenize #c;
if (startswith(Give Key,#c)) {
if(!strcontains(#s(server.hasKeys),#e(9,-1,#c))) {
if (strlen(#s(server.hasKeys))>0) setstring server.hasKeys,#s(server.hasKeys) , #e(9,-1,#c);
else setstring server.hasKeys,#e(9,-1,#c);
setplayerprop #c,The player now has the key.;
} else {
setplayerprop #c,The player already has a key.;
}
}
if (startswith(Take Key,#c)) {
if (strcontains(#s(server.hasKeys),#e(9,-1,#c))) {
this.placement = indexof(#e(9,-1,#c),#s(server.hasKeys));
this.length = strlen(#e(9,-1,#c));
tokenize2 #s(server.hasKeys),,;
if (this.placement>1) {
if (tokenscount>2) {
setstring server.hasKeys,#e(0,this.placement,#s(server.hasKe ys)) , #s((this.placement+this.length)-3,-1,#s(server.hasKeys));
} else {
setstring server.hasKeys,#e(0,this.placement-3,#s(server.hasKeys));
}
} else {
setstring server.hasKeys,#e(this.length+3,-1,#s(server.hasKeys));
}
setplayerprop #c,Key has been taken.;
} else {
setplayerprop #c, The account does not seem to be in the players with keys list...#e(9,-1,#c);
}
}
}


that was fun to write. it might now work on p2ps :-/ i hope it does...it worked on my personal computer lol...runs off of server variables...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote