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
  #16  
Old 10-14-2001, 02:47 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
Quote:
Originally posted by Enigma_GP6


Well You need to fix this, like so:

if(playerenters){
setstring percentdone,0;
if(playertouchsme&&isweapon(pick)){
percentdone++;
message This rock is #v(#s,percentdone) Percent Done;
}
if(percentdone==100){
hide;
playerruppes+=1;
sleep 30;
show;
}

Dont forget, if you want a string value to appear in a message or a sign, you have to use message codes,

-Rebel95
I like this better
NPC Code:

if(playerenters){
setstring percentdone,0;
if(playertouchsme && isweapon(pick)){
percentdone++;
message This rock is strtofloat(#s(percentdone)) Percent Done;
}
if(#s(percentdone==100)){
hide;
playerruppes+=1;
sleep 30;
show;
}


but even then that wont work because percentdone is being displayed like its a flag when its a string ... and even then the command 'percentdone++' would not even work ..... and before you tried to use 'percentdone' as a variable and it was never sey as a variable .....
Reply With Quote
  #17  
Old 10-14-2001, 03:25 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
whats strofloat for?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #18  
Old 10-14-2001, 03:31 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
strtofloat

Quote:
Originally posted by ownerofbabylon
whats strofloat for?
'strtofloat' makes a string being able to be tested as a number
Reply With Quote
  #19  
Old 10-14-2001, 05: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
Heres an exsample of PERCENT. If you bomb this object 4 times. It'll open. I think you should use Triggeraction.

//Created by Rob Getashu
if (exploded && this.bombed<=4){
this.bombed++;
message #v(this.bombed/4*100)%
if (this.bombed=4) {
setcharani stone_open,#s(this.bugsprite);
sleep 2;
setcharani stone_idle,#s(this.bugsprite);
sleep 2;
setcharani stone_close,#s(this.bugsprite);
sleep 2;
setcharani stone_closed,;
setstring bugs,#v(strtofloat(#s(bugs))+1);
}
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #20  
Old 10-14-2001, 05: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
Now be Jelious
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #21  
Old 10-14-2001, 05:31 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
I am so Jelous
Reply With Quote
  #22  
Old 10-14-2001, 08:04 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Waait...So who's bright idea was it to use a string for the percent done? You could save yourself alot of trouble...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #23  
Old 10-14-2001, 08:09 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
strings dont get reset when a playerenters a level, thats why you have to manually reset them
Reply With Quote
  #24  
Old 10-14-2001, 10:59 AM
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
why be jelious when it does not even work .. there is a obviouse erorr and if supersayin jin ... rob.. here is the best scripter you know u do not know many people..

not to be ignorant.
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #25  
Old 10-14-2001, 11:07 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
what it was ....

Quote:
Originally posted by btedji
strings dont get reset when a playerenters a level, thats why you have to manually reset them
what i explained what Lord Helmut did 'if (playerenters) {percentdone=0;}
therefore anyone entering could reset it ... so i told him to do if (playerenters && !actionMining) {percentage=o;}
Reply With Quote
  #26  
Old 10-15-2001, 12:22 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 dragoonvenganc
why be jelious when it does not even work .. there is a obviouse erorr and if supersayin jin ... rob.. here is the best scripter you know u do not know many people..

not to be ignorant.
Your so messed up it does work. -.-
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #27  
Old 10-15-2001, 12:30 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 dragoonvenganc
why be jelious when it does not even work .. there is a obviouse erorr and if supersayin jin ... rob.. here is the best scripter you know u do not know many people..

not to be ignorant.
Second of all: Learn to spell
Third of all: You don't even have the Gani Files *****!
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #28  
Old 10-15-2001, 12:32 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 dragoonvenganc
why be jelious when it does not even work .. there is a obviouse erorr and if supersayin jin ... rob.. here is the best scripter you know u do not know many people..

not to be ignorant.
And he thinks I'm a good scipter because (I know him in real life) I'm only 13 and I'm at a high level of scripting.
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #29  
Old 10-15-2001, 12:35 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 dragoonvenganc
why be jelious when it does not even work .. there is a obviouse erorr and if supersayin jin ... rob.. here is the best scripter you know u do not know many people..

not to be ignorant.
AND another thing... I'm more of an Althlete then a computer guy.
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #30  
Old 10-15-2001, 12:38 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


AND another thing... I'm more of an Althlete then a computer guy.
im fairly even
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 07:55 AM.


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