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 10-13-2001, 12:41 PM
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
% done

how do they do it on 2001 and Prov where everytime u fire a weapon on a NPC it adds 1% or so and returns a action at 100%?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #2  
Old 10-13-2001, 05:13 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
its just adding to a general total. not hard

if(action) this.percentdone++;
__________________

subliminal message: 1+1=3
Reply With Quote
  #3  
Old 10-13-2001, 09:38 PM
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
that brings me to my next point. How do you declare your variables in graal?

in VB you have to do

dim playerspeed as integer
playerspeed = 0

how do you define them in graal?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #4  
Old 10-13-2001, 09:40 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
Quote:
Originally posted by ownerofbabylon
that brings me to my next point. How do you declare your variables in graal?

in VB you have to do

dim playerspeed as integer
playerspeed = 0

how do you define them in graal?
you dont...

its automatically delcared....

like

setstring blah,blah;

then blah is a string

this.blah = 5;

thats in integer in that npc

level.blah = 5;
that is a level wide integer
__________________
Thanks,
-KJL
Reply With Quote
  #5  
Old 10-13-2001, 09:43 PM
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
i have never heard of level. before. Thats pretty good =D
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #6  
Old 10-13-2001, 09:44 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
I know how to do this! I made Lumber jacking for my server and I'm working on more.
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #7  
Old 10-13-2001, 09:51 PM
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
so for lets say mining or something:

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

So that would set the string percentdone to 0 when they enter, when the fire the pick on the NPC it adds 1 to percent done and when it reaches 100 it gives them 1 gralat and hides the rock for 30 seconds?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #8  
Old 10-13-2001, 09:52 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Quote:
Originally posted by ownerofbabylon
i have never heard of level. before. Thats pretty good =D
Npcserver only. And I think it is still bugged where weapons can't read level.variables, although I am not sure. Stefan may have fixed.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #9  
Old 10-13-2001, 09:54 PM
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
oh damn, i was about to get happy
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #10  
Old 10-13-2001, 11:13 PM
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 ownerofbabylon
so for lets say mining or something:

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

So that would set the string percentdone to 0 when they enter, when the fire the pick on the NPC it adds 1 to percent done and when it reaches 100 it gives them 1 gralat and hides the rock for 30 seconds?
I am not the expert but i think 'triggeraction' may help you out greatly ...
Reply With Quote
  #11  
Old 10-13-2001, 11:23 PM
Petey84 Petey84 is offline
Registered User
Join Date: Sep 2001
Location: Johnstown PA, and Mobile AL
Posts: 308
Petey84 is on a distinguished road
Send a message via AIM to Petey84 Send a message via Yahoo to Petey84
Shakaku:
Lol, I learned that, but i've heard it only works online or somethin, but i know how to use it. I'm not that great of a scripter tho, u can add me to aim and i'll try to help Moe478
__________________
-Pete aka Wilddude
-Nishoku as well ;D!

AIM
Pete: WildDude2002
Nishoku: Nishoku, SaikoAkumu
-----------------------------------------------
StarX480: bai
Reply With Quote
  #12  
Old 10-13-2001, 11:41 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
NPC Code:

if(playerenters){
setstring percentdone,0; //Why reset when a player enters?
if(playertouchsme&&isweapon(pick)){ //isweapon does not
//Have arguments. maybe your looking for hasweapon(name).
//actionACTIONNAME would be good to put here.

percentdone++;
message This rock is percentdone Percent Done;//It will say
//literally "This rock is percentdone Percent Done"

}
if(percentdone==100){
hide;
playerruppes+=1;
sleep 30;
show;
//THIS is where you should reset the percent done.
}



Not the best code... But im poiting out your errors.
__________________

subliminal message: 1+1=3

Last edited by Falcor; 10-13-2001 at 11:46 PM..
Reply With Quote
  #13  
Old 10-14-2001, 12:02 AM
Link188 Link188 is offline
Registered User
Link188's Avatar
Join Date: Jul 2001
Location: Monroeville, PA
Posts: 548
Link188 is on a distinguished road
Send a message via AIM to Link188
Just ask SSRobgeta, hes the best scriptor i know...
__________________
~Jeice Lighthawk~
"And you will shed tears of scarlet..."

~Edited by me. ^_^
Reply With Quote
  #14  
Old 10-14-2001, 12:09 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
thanks faldos.
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #15  
Old 10-14-2001, 02:24 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
Quote:
Originally posted by ownerofbabylon
so for lets say mining or something:

if(playerenters){
setstring percentdone,0;
if(playertouchsme&&isweapon(pick)){
percentdone++;
message This rock is percentdone Percent Done;
}
if(percentdone==100){
hide;
playerruppes+=1;
sleep 30;
show;
}
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
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:25 AM.


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