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 04-22-2002, 08:14 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Can flags be unset by NPCs in other levels online?

If a player is in a different level and an NPC tried to unset a flag from that player would it work online, because it doesn't offline.
__________________
Reply With Quote
  #2  
Old 04-22-2002, 08:54 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight

How can a clientsided NPC access a players attrivutes when it's not in the level?? You would need a serversided npc it use a with (getplayer(account))
Reply With Quote
  #3  
Old 04-22-2002, 10:53 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Would that lag like a server.string?
__________________
Reply With Quote
  #4  
Old 04-22-2002, 11:01 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
Quote:
Originally posted by Googi
Would that lag like a server.string?
Is this non-p2p?
If non-p2p you could have a weapon that sets it depending on server string...
On p2p you could have a server side section that uses with and unsets it...
__________________

!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
  #5  
Old 04-23-2002, 06:33 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Like this?

NPC Code:

if (timeout){
with (getplayer(#s,this.oneaowner#v(#a))){
unset mine1;
unset ownsmine;
}
setstring this.oneaowner,(no owner);
this.onea=0;
}

__________________
Reply With Quote
  #6  
Old 04-23-2002, 07:52 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Quote:
Originally posted by Googi
(code)
NPC Code:

with (getplayer(#s,this.oneaowner#v(#a))){


If you want to get the player who owns it, it's more like:
NPC Code:
 with(getplayer(#s(this.oneaowner))) { } 



[edit] And I missed a parenthesis (sp...i know) [/edit]
__________________
Reply With Quote
  #7  
Old 04-23-2002, 08:14 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
I'm guessing with (getplayer) doesn't work offline either?
__________________
Reply With Quote
  #8  
Old 04-23-2002, 08:55 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
Quote:
Originally posted by Googi
I'm guessing with (getplayer) doesn't work offline either?

Jagen:
Yep, anything involoving with is only supported by an NPC Server
Reply With Quote
  #9  
Old 04-23-2002, 10:39 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
Well if this is p2p, I believe I am correct in saying you could make it auto kill if the player leaves the level like this, I don't beleieve it works non-p2p.
NPC Code:

if (playerleaves)
setstring this.owner,;

__________________

!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
  #10  
Old 04-25-2002, 09:12 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
i personally hate to use flags unless it is REALLY necessary just b/c it lags too much. LAG in my point of few ruins things. While it isn't worth sacrificing an entire great NPC, i try and use other things. Add an NPC, maybe just one, that is a system and edit flags in that or something, or have it update each time. Server flags lag. Sans used a server flag for each person, and they had to remove it b/c of all the lag! So having a server flag for EACH person can SERIOUSLY lag. And can't you just {set flagname} then l8er put {unset flagname} l8er??
---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 04-25-2002, 09:13 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Oh yeah, or attachplayertoobj might work too! Use variables. if (playerperforms action)this.action=1;
if (this.action==1) then whatever you want it to do. It does not even need to have ne GFX to work.
---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
  #12  
Old 04-25-2002, 11:05 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally posted by emortylone
i personally hate to use flags unless it is REALLY necessary just b/c it lags too much. LAG in my point of few ruins things. While it isn't worth sacrificing an entire great NPC, i try and use other things. Add an NPC, maybe just one, that is a system and edit flags in that or something, or have it update each time. Server flags lag. Sans used a server flag for each person, and they had to remove it b/c of all the lag! So having a server flag for EACH person can SERIOUSLY lag. And can't you just {set flagname} then l8er put {unset flagname} l8er??
---Shifter
Flags are good, and I'm not using a server flag.
__________________
Reply With Quote
  #13  
Old 04-26-2002, 08:21 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
That about somes it up, thanx Heh. If you put a flag on, it can just be a client side flag. The only reason you would need a server flag is if it is accessible to multiple people. Client flags lag a hell of a lot less (each server flag = about 1 flag per person!) and aren't a big deal. just use set flagname
---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
  #14  
Old 04-26-2002, 08:36 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Clientside flags referring to specific flags used for the player that stay in the client. Normal client flags would be a lot less complex. Like ... so tired! Heh, um, like set and unset. or if something, then something...
---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
  #15  
Old 04-26-2002, 08:50 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Heh, as i figured. Is there a chance you'd be nice enough to explain all the p2p stuff to me? I do only non-p2p, put i figure if i am going to be posting and making scripts for people, then i might as well figure out the p2p stuff just in case.
---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
  #16  
Old 04-26-2002, 09:02 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
How about e-mailing me or IM'ing me and explaining a few key points? LOL, if not that is cool.
---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
  #17  
Old 04-26-2002, 09:09 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Allright thanx. I'm about to go soon. BGut you're giving me something to do. I hit refresh adn wait to see when Emortylane doesn't dominate the entire last posts on the page, lol.
---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
  #18  
Old 04-30-2002, 12:18 AM
Faheria_Admin5 Faheria_Admin5 is offline
Registered User
Join Date: Sep 2001
Posts: 70
Faheria_Admin5 is on a distinguished road
Send a message via AIM to Faheria_Admin5
hmmmm

Heres an idea dont know if it helps ya any.

In a p2p server if there is an item like maybe you pick up an emerald and the first person to the king gets 10 gralats. Then you could do something like this.

//In a weapon script
//#CLIENTSIDE
if(created) {
setimg emerald.png;
}
if(playerenters||timeout) {
if(!strequals(client.emeraldpickuptime,serverr.eme raldtime)) {
destroy;
}
}

//In emerald area script
if(created) {
setimg emerald.png;
setshape 1,32,32;
}
if(playertouchsme) {
if(strlen(#s(serverr.emeraldtime))=0) {
setstring serverr.emeraldtime,#v(timevar);
}
setstring client.emeraldpickuptime,#s(serverr.emeraldtime);
addweapon Emerald;
}

//In Kings Script
if(created) {
//putmakekingtypethings here
}
if(playertouchsme&&hasweapon(Emerald)) {
setstring serverr.emeraldtime,;
playerrupees+=10;
removeweapon Emerald;
say2 Thank you young man this#bwill make a nice ring for me.;
}
I think thats all im late for class try it out
__________________

Reply With Quote
  #19  
Old 04-30-2002, 08:16 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Heh. if (action) setstring string,value;
---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
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 11:14 PM.


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