Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-23-2001, 02:40 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Food Status

Hey can someone help? I wanna make this so it goes down slowly and it shows the percent your hungry. Look and see...

// NPC made by Rob Getashu
if (playertouchsme) {
toweapons Food Bar;
}
if (created) {
set foodbargodown;
foodpower = this.foodenergy
}
if (isweapon && this.foodenergy=100) {
this.foodenergy++;
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6
}
if (this.foodenergy=>80&&weaponfired) {
setani bloated,;
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6
}
if (this.foodenergy=<60>79&&weaponfired) {
setani fine,;
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6
}
if (this.foodenergy=<40>59&&weaponfired) {
setani nothungry,;
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6
}
if (this.foodenergy=<20>39&&weaponfired) {
setani hungry,;
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6
}
if (this.foodenergy=<20>39&&weaponfired) {
setani starving,;
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6
}
if (this.foodenergy=<0) {
disableweapons
}
if (this.foodenergy=>0) {
enableweapons
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #2  
Old 10-23-2001, 03:10 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
use arrays
Reply With Quote
  #3  
Old 10-23-2001, 03:28 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Quote:
Originally posted by btedji
use arrays
Thank you for helping?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #4  
Old 10-23-2001, 03:34 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
one thing you can do is dont use this command so much:

setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6;

just put that after a weaponfired flag by itself
Reply With Quote
  #5  
Old 10-23-2001, 03:38 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
ok
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #6  
Old 10-23-2001, 03:42 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
and use strings if you want the data to save when player logs off
Reply With Quote
  #7  
Old 10-23-2001, 03:44 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
I dare you to fix script and post
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #8  
Old 10-23-2001, 03:49 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
i would if i was at home and on a better comp that had graal
Reply With Quote
  #9  
Old 10-23-2001, 03:52 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
when will you be home on a better computer with graal
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #10  
Old 10-23-2001, 03:53 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
about a hour
Reply With Quote
  #11  
Old 10-23-2001, 03:54 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Can you do it then?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #12  
Old 10-23-2001, 03:57 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by SSRobgeta
Can you do it then?
if i am not busy
Reply With Quote
  #13  
Old 10-23-2001, 03:59 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
When you play Graal, you have nothing to do lol
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #14  
Old 10-23-2001, 04:00 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
When you play Graal, you have nothing to do lol
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #15  
Old 10-23-2001, 04:12 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
copying off me ehh???
Reply With Quote
  #16  
Old 10-23-2001, 05:55 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
if (playertouchsme) {
toweapons Food Bar;
timeout=.05;
}
if (created && isweapon) {
set foodbargodown;
foodpower = this.foodenergy
timeout=.05;
}
if(weaponfired){
if(this.foodenergy=>80){
setani bloated,;
}
if(this.foodenergy<=79 && this.foodenergy >=60){
setani fine,;
}
if (this.foodenergy=<59 && this.foodenergy>=40) {
setani nothungry,;
}
if (this.foodenergy=< 39 && this.foodenergy>=20) {
setani hungry,;
}
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6;
}

if(timeout){
if(this.foodenergy==100){
this.foodenergy++;
}
if (this.foodenergy=<0) {
disableweapons
}
else {
enableweapons
}
timeout=.1;
}

should work, not tested yet =)
__________________
No Webhost at the moment
Reply With Quote
  #17  
Old 10-23-2001, 06:17 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Quote:
Originally posted by royce
copying off me ehh???
What?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #18  
Old 10-23-2001, 06:20 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Quote:
Originally posted by TDO2000
if (playertouchsme) {
toweapons Food Bar;
timeout=.05;
}
if (created && isweapon) {
set foodbargodown;
foodpower = this.foodenergy
timeout=.05;
}
if(weaponfired){
if(this.foodenergy=>80){
setani bloated,;
}
if(this.foodenergy<=79 && this.foodenergy >=60){
setani fine,;
}
if (this.foodenergy=<59 && this.foodenergy>=40) {
setani nothungry,;
}
if (this.foodenergy=< 39 && this.foodenergy>=20) {
setani hungry,;
}
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6;
}

if(timeout){
if(this.foodenergy==100){
this.foodenergy++;
}
if (this.foodenergy=<0) {
disableweapons
}
else {
enableweapons
}
timeout=.1;
}

should work, not tested yet =)
Sorry but it doesn't =(
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #19  
Old 10-23-2001, 06:27 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
if (playertouchsme) {
toweapons Food Bar;
timeout=.05;
}
if (created && isweapon) {
set foodbargodown;
this.foodenergy=100;
timeout=.05;
}
if(weaponfired){
if(this.foodenergy=>80){
setani bloated,;
}
if(this.foodenergy<=79 && this.foodenergy >=60){
setani fine,;
}
if (this.foodenergy=<59 && this.foodenergy>=40) {
setani nothungry,;
}
if (this.foodenergy=< 39 && this.foodenergy>=20) {
setani hungry,;
}
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6;
}

if(timeout){
if(this.foodenergy>0){
this.foodenergy--;
}
if (this.foodenergy=<0) {
disableweapons
}
else {
if(!weaponsenabled){
enableweapons
}
}
timeout=.5;
}

tested =)
__________________
No Webhost at the moment

Last edited by TDO2000; 10-23-2001 at 06:33 AM..
Reply With Quote
  #20  
Old 10-23-2001, 08:01 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Quote:
Originally posted by TDO2000
if (playertouchsme) {
toweapons Food Bar;
timeout=.05;
}
if (created && isweapon) {
set foodbargodown;
this.foodenergy=100;
timeout=.05;
}
if(weaponfired){
if(this.foodenergy=>80){
setani bloated,;
}
if(this.foodenergy<=79 && this.foodenergy >=60){
setani fine,;
}
if (this.foodenergy=<59 && this.foodenergy>=40) {
setani nothungry,;
}
if (this.foodenergy=< 39 && this.foodenergy>=20) {
setani hungry,;
}
setplayerprop#c, #v(this.foodenergy/100*100)%;
freezeplayer .6;
}

if(timeout){
if(this.foodenergy>0){
this.foodenergy--;
}
if (this.foodenergy=<0) {
disableweapons
}
else {
if(!weaponsenabled){
enableweapons
}
}
timeout=.5;
}

tested =)
Thanks!
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #21  
Old 10-23-2001, 08:08 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
sry i was busy lol
Reply With Quote
  #22  
Old 10-23-2001, 06:23 PM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Np
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #23  
Old 10-23-2001, 06:25 PM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Ok. Now I have the food bar done. How would I make food? would it do with this.foodenergy--; ?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #24  
Old 10-23-2001, 10:14 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
omg
use a string where to save the hunger if u eat something add something to the string else let it go down...
__________________
No Webhost at the moment
Reply With Quote
  #25  
Old 10-23-2001, 10:15 PM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
Rob i have over estimated u come on that was a dum question
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #26  
Old 10-24-2001, 02:26 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
LOL I was realy kidding. I wanted to see if someone would do it for me so I wouldn't have to.
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:02 PM.


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