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
  #16  
Old 08-25-2002, 12:39 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
LOL, like you can make scripts that will READ to/from an NPC. Like you can do:
NPC Code:

with (getnpc(Control-NPC))
{ setstring this.string,#s(client.string);}


that would read the control-npc and set a this.string from the player. The Control-NPC is VITAL in most cases... you need it to be able to do things and such. It replaces server.strings for the most part, and you can do MANY things with it. Just because no on is in the level, should the timer stop?? So what if the playercount on the server was 0, should the timer not continue?/ x.X
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
  #17  
Old 08-30-2002, 11:20 PM
Androk2k1 Androk2k1 is offline
Banned
Androk2k1's Avatar
Join Date: Dec 2001
Posts: 1,336
Androk2k1 is on a distinguished road
What does [i] do? It's used very often, but I don't quite understand it's purpose..
  #18  
Old 08-30-2002, 11:46 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Quote:
Originally posted by Androk2k1
What does [i] do? It's used very often, but I don't quite understand it's purpose..
Accessing the i. elementh of an array.
So allplayers[2] would give you the 3. player (count starts at zero), allplayers[i] gives you a player depending on the current value of the variable i.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
  #19  
Old 08-31-2002, 12:30 AM
Lit Lit is offline
Registered User
Join Date: Jul 2002
Location: none
Posts: 41
Lit is on a distinguished road
Send a message via AIM to Lit Send a message via Yahoo to Lit
I just relized how hard it whould be to have this all scripted out making ur own game and all it must have took at least over 20 months for scripting bombs joltbombs everything superbombs puting all the GFX together i wonder how long it did take them all.............
  #20  
Old 08-31-2002, 06:06 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
LOL, you can't just put allplayers[i] because I would have no value!
NPC Code:

if (created)
{ for (i=0;i<allplayerscount;i++)
{ with (allplayers[i])
{ sendpm Hello;}
}
}


---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
  #21  
Old 09-04-2002, 05:28 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by emortylone
LOL, you can't just put allplayers[i] because I would have no value!
NPC Code:

if (created)
{ for (i=0;i<allplayerscount;i++)
{ with (allplayers[i])
{ sendpm Hello;}
}
}


---Shifter
"LOL" he said depending on the value of i.
  #22  
Old 09-04-2002, 06:14 PM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
What would be more laggier NPC server or without one?
  #23  
Old 09-04-2002, 06:33 PM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
Isnt the scripts of a npc server laggy?
I know some are
  #24  
Old 09-04-2002, 06:44 PM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
When i scripted about 1 1/2years ago i hated the Mp3/Mid players they had when u change the # into 1.mp3 or 1.mid so i made something better so u can just say play name.mid
then about a year ago i just fixed it up and now it doesnt cause that much lag It use to take about 3 minutes for it to play the song
i added tokenize to it and it sorta did it a lil quicker then i took out the flags and just did
if (startswith(play,#c)) {
tokenize #c;
if (strequals(#t(2),.mid)) {
play #t(1).mid
}
if (strequals(#t(2),.mp3)) {
play #t(1).mp3
}
}
 


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 05:57 PM.


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