![]() |
% 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%?
|
its just adding to a general total. not hard
if(action) this.percentdone++; |
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? |
Quote:
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 |
i have never heard of level. before. Thats pretty good =D
|
I know how to do this! I made Lumber jacking for my server and I'm working on more.
|
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? |
Quote:
|
oh damn, i was about to get happy
|
Quote:
|
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 :D Moe478 |
NPC Code: Not the best code... But im poiting out your errors. |
Just ask SSRobgeta, hes the best scriptor i know...;)
|
thanks faldos.
|
Quote:
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, :rolleyes: -Rebel95 |
Quote:
NPC Code: 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 ..... |
whats strofloat for?
|
strtofloat
Quote:
|
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); } } |
Now be Jelious;)
|
I am so Jelous
|
Waait...So who's bright idea was it to use a string for the percent done? You could save yourself alot of trouble...
|
strings dont get reset when a playerenters a level, thats why you have to manually reset them
|
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. |
what it was ....
Quote:
therefore anyone entering could reset it ... so i told him to do if (playerenters && !actionMining) {percentage=o;} |
Quote:
|
Quote:
Third of all: You don't even have the Gani Files *****! |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
He really did it in 7:15!
|
Quote:
|
running one mile in less than 10 mins isnt really hard if you are a lil fit
|
Is this thread dedicated to confusing the poor Lord Helmut with code that doesn't work?
strtofloat in a sign wont work #s(percentdone) works #v(#s(percentdone)) does not work. |
Quote:
|
*votes for this thread to be closed*
|
now you total idiot pay attetion
//Created by Rob Getashu if (exploded && this.bombed<=4){ this.bombed++; message #v(this.bombed/4*100)% <<<<<HERE you need ; 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); } } with out that ; it keeps thinking you are saying text. i dint try the program on my computer. I am not that stupid i know i do not have the gani. and i ran a mile last year in 7:06 thanx. |
Quote:
|
| All times are GMT +2. The time now is 07:08 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.