Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-03-2002, 08:57 AM
Glory Glory is offline
Banned
Glory's Avatar
Join Date: Mar 2002
Location: Sunnydale
Posts: 1,365
Glory is on a distinguished road
Send a message via AIM to Glory
How does this NPC work please?

if (created)
{ for (i=0;i<allplayerscount;i++)
{ if (strequals(#F,))
{ if (strequals(#a,accname))
{ setplayerprop #3,headname;}
}
}
}
Reply With Quote
  #2  
Old 09-03-2002, 09:17 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: How does this NPC work please?

Quote:
Originally posted by Glory
if (created)
{ for (i=0;i<allplayerscount;i++)
{ if (strequals(#F,))
{ if (strequals(#a,accname))
{ setplayerprop #3,headname;}
}
}
}
that wouldnt work at all
NPC Code:

if(created){
for(i=0;i<allplayerscount;i++){
with(allplayers[i]){
if(strlen(#F)==0){
if(strequals(#a,accname)){
setplayerprop #3,head;
}
}
}
}
}


Last edited by Python523; 09-04-2002 at 04:43 AM..
Reply With Quote
  #3  
Old 09-03-2002, 09:18 AM
Glory Glory is offline
Banned
Glory's Avatar
Join Date: Mar 2002
Location: Sunnydale
Posts: 1,365
Glory is on a distinguished road
Send a message via AIM to Glory
Oh ok thanks...well it was suppose to change the RC head, I got it off a friend but I r super confused.
Reply With Quote
  #4  
Old 09-03-2002, 11:25 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Re: How does this NPC work please?

Quote:
Originally posted by Glory
if (created)
{ for (i=0;i<allplayerscount;i++)
{ if (strequals(#F,))
{ if (strequals(#a,accname))
{ setplayerprop #3,headname;}
}
}
}
But...that would set the heads of all the RCs when the script was created! You'd have to use actionplayeronline or so in the Control NPC.

Something like this:
NPC Code:

if (actionplayeronline) {
if (strequals(#F,)) setplayerprop #3,headname;
}

__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #5  
Old 09-04-2002, 03:13 AM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Is #F equal to the RC?
Reply With Quote
  #6  
Old 09-04-2002, 04:43 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Spark910
Is #F equal to the RC?
#F is the level of the player / npc when using with statements
Reply With Quote
  #7  
Old 09-04-2002, 04:45 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Python523

#F is the level of the player / npc when using with statements
I thought #L was the level?
__________________
Reply With Quote
  #8  
Old 09-04-2002, 04:46 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Argit. #L is the NPC's level, #F is the PLAYER's level... and the coding is VERY unorganized and hard to read =/
---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
Reply With Quote
  #9  
Old 09-04-2002, 04:47 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by G_yoshi


I thought #L was the level?
if I did on an npc that was in the level stuff.nw and G_yoshi is in dkstuff.nw
with(getplayer(G_yoshi)){
setstring client.level,#L;
}
client.level = stuff.nw
inside a with statement, #F is the npc of what you got in the with statement, #L would be the NPC you used to send the with statement
Reply With Quote
  #10  
Old 09-04-2002, 04:48 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Did I not already explain it?? 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
Reply With Quote
  #11  
Old 09-04-2002, 04:49 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
your post was posted less than a minute before mine and it took me a little more than a minute to type mine
Reply With Quote
  #12  
Old 09-04-2002, 04:51 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
LOl, all mine take less than a minute, lolz. You didn't need to go into detail anyway... if you put if (strequals(#F,)) it means RC;
---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
Reply With Quote
  #13  
Old 09-04-2002, 04:57 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by emortylone
LOl, all mine take less than a minute, lolz. You didn't need to go into detail anyway... if you put if (strequals(#F,)) it means RC;
---Shifter
strlen(#F)==0 would work the same but both have there faults, I dont feel like testing this theory right now but it could work and it couldnt work

set the file cofig to
level <bunch of spaces here>
then create a level, go into DOS, and rename to level so it has no name (basically "" without the "s) then upload it, theoretically you could warp to the level since graal will still read the NW header (GLEVNW01) or whatever .graal uses to make it .graal and you are now in a level that has a length of 0 and that it equals nothing (null)
Reply With Quote
  #14  
Old 09-04-2002, 05:28 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by Python523

strlen(#F)==0 would work the same but both have there faults, I dont feel like testing this theory right now but it could work and it couldnt work

set the file cofig to
level <bunch of spaces here>
then create a level, go into DOS, and rename to level so it has no name (basically "" without the "s) then upload it, theoretically you could warp to the level since graal will still read the NW header (GLEVNW01) or whatever .graal uses to make it .graal and you are now in a level that has a length of 0 and that it equals nothing (null)
I'm not sure you can warp to nothing, I think you indeed have to be on a level with a name atleast 1 character.
__________________

subliminal message: 1+1=3
Reply With Quote
  #15  
Old 09-04-2002, 06:16 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Falcor


I'm not sure you can warp to nothing, I think you indeed have to be on a level with a name atleast 1 character.
I think so to but I was mearly suggesting that there is no 'correct' way to find out if something really IS an RC if you could go to nothing, unless you set a flag or a string when actionplayeronline in the CNPC, since I dont think RCs load attributes
Reply With Quote
Reply


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 10:36 AM.


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