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 06-10-2001, 07:07 PM
Inguz Inguz is offline
Registered User
Join Date: Mar 2001
Posts: 26
Inguz is on a distinguished road
new (weird) idea

is it possible to make a NPC that makes the player like
sleepy hungry and dirty
if so can someone post the script
ohh and it would be great if it could be noticed by other players
Reply With Quote
  #2  
Old 06-10-2001, 08:39 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool yes it is

yes it is possible

but like
I am not going to make the code (usually when I show people coding on the forum I do it all off the top of my head)

well it deals with some flags
ie
client.sleep=100

and you could have something like 100 = full sleepness.

and like if they are at 100 then they can't walk and just start to sleep on the ground.. (you would have to make your own sleep gani because the sleep gani only shows the head)
__________________
Thanks,
-KJL
Reply With Quote
  #3  
Old 06-11-2001, 03:35 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
if(playerenters) toweapons -System;
if(isweapon||timeout){
if(strequals(#m,sleep)){
setstring sleepy,#v(strtofloat(#s(sleepy))-1);
}else{
setstring sleepy,#v(strtofloat(#s(sleepy))+0.01);
}
if(playerswimming){
setstring dirty,#v(strtofloat(#s(dirty))-1);
}else{
setstring dirty,#v(strtofloat(#s(dirty))+0.01);
}
setstring hungry,#v(strtofloat(#s(dirty))+0.01);
//insert what effect these strings have here
timeout=0.05;
}

Then for all food items, setstring hungry,#v(strtofloat(#s(hungry))-10); or so.

Note: It is possible under this system to stockpile cleanliness and sleep and food...not necessarily a bad thing, but you probably want to put SOME limits on how negative hungry and dirty and sleepy can be.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #4  
Old 06-11-2001, 09:25 AM
Inguz Inguz is offline
Registered User
Join Date: Mar 2001
Posts: 26
Inguz is on a distinguished road
thats great but there is a problem with that script the player would be constantly Sleeping hungry and Dirty
whats the timer command
Reply With Quote
  #5  
Old 06-12-2001, 09:02 AM
Speedoflight14 Speedoflight14 is offline
Registered User
Join Date: Apr 2001
Posts: 72
Speedoflight14 is on a distinguished road
what about make it with day/night script?
__________________
Everyone is human.
Nobodys perfect
Reply With Quote
  #6  
Old 06-12-2001, 09:05 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool or you could

you could make the timeout longer...


like
insted of
timeout=0.05

but like

timeout=5
__________________
Thanks,
-KJL
Reply With Quote
  #7  
Old 06-12-2001, 09:08 AM
Speedoflight14 Speedoflight14 is offline
Registered User
Join Date: Apr 2001
Posts: 72
Speedoflight14 is on a distinguished road
what about it random?
__________________
Everyone is human.
Nobodys perfect
Reply With Quote
  #8  
Old 06-12-2001, 09:24 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool that wouldn't be hard to program in also

that wouldn't be hard to program in also
NPC Code:
if(playerenters) toweapons -System;
if(isweapon||timeout){
tmprand = random (0.01,0.1)
if(strequals(#m,sleep))
setstring sleepy,#v(strtofloat(#s(sleepy))-1);
else
setstring sleepy,#v(strtofloat(#s(sleepy))+tmprand );
if(playerswimming)
setstring dirty,#v(strtofloat(#s(dirty))-1);
else
setstring dirty,#v(strtofloat(#s(dirty))+tmprand );
setstring hungry,#v(strtofloat(#s(dirty))+tmprand );
//insert what effect these strings have here
timeout=0.05;
}

__________________
Thanks,
-KJL
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 09:02 AM.


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