Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-12-2001, 11:48 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 Does it work with npcserver tho.....

ok.
i made a script on a different threa, it was a playerhouse key type thing, and i want to know if it would work on npc server, i am new to npcserver, and i am a nat cadet on andor, and if it doesn't than can anyone tell me why?

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);
}
}
}

__________________

!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
  #2  
Old 11-12-2001, 11:59 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
Smile oops

forgot to end code...
oh well
but mind you thats my first script for npc server lol so if it don't work sorry...
__________________

!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
  #3  
Old 11-12-2001, 09:46 PM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
Well it can't be clientside if its gonna read and set serverflags =p
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #4  
Old 11-12-2001, 11:36 PM
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
Question ? weirdness ?

Weird, I need to find a place with tutorials about npc server...
I do not think I understand why...I know that server flags are server side, but if I remove the //#CLIENTSIDE will it work.
--PastAustin (Carrot)
__________________

!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
  #5  
Old 11-13-2001, 01:46 AM
IceFire_TK IceFire_TK is offline
Banned
Join Date: Nov 2001
Location: O' Canada
Posts: 375
IceFire_TK is on a distinguished road
Send a message via AIM to IceFire_TK Send a message via Yahoo to IceFire_TK
[SPAM] This is Spam[/SPAM]
[*****]This is my ****[/*****]
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.