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 12-07-2001, 09:11 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
This. Problem

I am having a problem with This. command. I made a script where you have this.something=100. Then it goes down every 1 % every 2 mins. But when I use something to make it go up like this.something=this.something+5 it doesn't work. I tried Strings, but that doesn't work either. Please Help.
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #2  
Old 12-07-2001, 09:58 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Re: This. Problem

Quote:
Originally posted by SSRobgeta
I am having a problem with This. command. I made a script where you have this.something=100. Then it goes down every 1 % every 2 mins. But when I use something to make it go up like this.something=this.something+5 it doesn't work. I tried Strings, but that doesn't work either. Please Help.
i now your not a complete fool but i am just making sure you realize that this.varables only pertain to th NPC they are set on ...
Reply With Quote
  #3  
Old 12-07-2001, 10:13 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
but when I did just strings once it didn't work
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #4  
Old 12-07-2001, 10:24 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 nyght help me. I screwed up this script bad. It was working at first then it screwed up on me.
//Created by Rob Getshu (Food Status)
if (playertouchsme) {
toweapons *Food Bar;
timeout=6;
setstring foodenergy,#v(strtofloat(#s(foodenergy))+100);
}
if (created && isweapon) {
timeout=6;
}
if(weaponfired){
if(strtofloat(#s(foodenergy))=>80){
setani bloated,;
}
if(strtofloat(#s(foodenergy))<=79 && strtofloat(#s(foodenergy))>=60){
setani fine,;
}
if (strtofloat(#s(foodenergy))=<59 && strtofloat(#s(foodenergy))>=40) {
setani nothungry,;
}
if (strtofloat(#s(foodenergy))=< 39 && strtofloat(#s(foodenergy))>=20) {
setani hungry,;
}
if (strtofloat(#s(foodenergy))=< 19 && strtofloat(#s(foodenergy))>=0) {
setani starving,;
}
setplayerprop#c, #s(foodenergy/100*100)%;
freezeplayer .6;
}

if(timeout){
if(strtofloat(#s(foodenergy))>0){
foodenergy--;
}
if (strtofloat(#s(foodenergy))=<0) {
disableweapons
}
if(strtofloat(#s(foodenergy))=>0){
enableweapons
}
}
timeout=6;

//banana
// NPC made by Rob Getashu
timeout=1;
if (timeout) {
message Banana;
sleep 1;
message 5 G;
timeout=1;
}
if (playerchats&&strequals(#c,banana)&&playerrupees=> 0) {
toweapons Banana;
playerrupees=playerrupees-5;
}
if (weaponfired) {
setani eatbanana,;
strtofloat(#s(foodenergy)) = strtofloat(#s(foodenergy))+5;
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
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 04:08 PM.


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