Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   dun get this. (https://forums.graalonline.com/forums/showthread.php?t=25888)

la_builder 03-19-2002 02:55 AM

dun get this.
 
if i try to get the owner tag and the thing that if you are at 10% it stops and sets other gif and continues agian with 0% it wont work can somebody plz fix this error oo here is the script where the error is in

NPC Code:
// NPC made by Discounter{hiring lats}
if (playerenters) {
}
if(actionwaterd) {this.User=#a;this.Mine=this.Mine+1; message #v(this.Mine)% by #v(this.User);sleep 0;}
if (this.User=#a) {
if (this.Mine=10) setgif bushgrape1.gif;sleep 5
}


Kadar 03-19-2002 02:58 AM

[Kadar]
// NPC made by Discounter
if(actionwaterd) {
if (this.Mine==0){
this.User=#a;
this.Mine++;
message #v(this.Mine)% by #v(this.User);
}
if (!this.Mine==0){
this.Mine++;
message #v(this.Mine)% by #v(this.User);
}
if (this.User=#a) {
if (this.Mine=10){
this.Mine = 0;
setgif bushgrape1.gif;sleep 5
}
}
[/Kadar]

la_builder 03-19-2002 03:05 AM

still he say error
NPC Code:
[edited by Kadar]
// NPC made by Discounter
if(actionwaterd)
if (this.Mine==0){
this.User=#a;
this.Mine


la_builder 03-19-2002 03:30 AM

well that was much off help kai thanks dude..
any more advices on how i could make this thing work so it will stop if it reaches 10% and set other gif and than begins agian at 0%

la_builder 03-19-2002 03:44 AM

well i fixed it lol the brackets where the prob.
bud how do i make sure that the second time it recheas 10% it will take second gfx

Saga2001 03-19-2002 12:14 PM

Quote:

Originally posted by Kaimetsu


Use the style button on it then post it and I'll have a look.

he needs more than curlies, he needs a miracle...

#v(this.Mine)% by #v(this.User)


they are not variables, they are strings #s()

darkriders_p2p 03-19-2002 12:33 PM

*looks around*
how did la_builder make something that ALMOST worked when he couldn't make a guy facing north with the bow out.
*suspects of stealing*
he stole from a crappy scripter :(

Saga2001 03-19-2002 03:47 PM

Quote:

Originally posted by darkriders_p2p
*looks around*
how did la_builder make something that ALMOST worked when he couldn't make a guy facing north with the bow out.
*suspects of stealing*
he stole from a crappy scripter :(

sad, isn't it?

neomaximus2k 03-19-2002 03:52 PM

Quote:

Originally posted by darkriders_p2p
*looks around*
how did la_builder make something that ALMOST worked when he couldn't make a guy facing north with the bow out.
*suspects of stealing*
he stole from a crappy scripter :(

yeah he stole from you LMAO :P
muwhahahahahahahahahahaha

TDO2000 03-19-2002 06:16 PM

Quote:

Originally posted by Kadar

NPC Code:

this.User=#a;



That's a joke, isn't it?
wasn't there a command called setstring?
else you would need to save the players id if u want it as a number (and if it's non p2p you should use a save var for this)

screen_name 03-19-2002 09:47 PM

Re: dun get this.
 
NPC Code:

// NPC made by screen_name

if(actionMined) {
if (this.User==NoOne) {
this.User=#a;
}
this.Mine++;
message #v(this.Mine)% by #v(this.User);
}
if (this.User==#a) {
if (this.Mine==10) {
setgif bushgrape1.gif;sleep 5;
}
}


screen_name 03-19-2002 09:49 PM

Quote:

Originally posted by neomaximus2k


yeah he stole from you LMAO :P
muwhahahahahahahahahahaha


lol

screen_name 03-19-2002 09:51 PM

Quote:

Originally posted by TDO2000

That's a joke, isn't it?
wasn't there a command called setstring?
else you would need to save the players id if u want it as a number (and if it's non p2p you should use a save var for this)

they use this.whatever=#a in playerhouses i think

Spanko 03-19-2002 09:52 PM

NPC Code:
// NPC fix0red by Grim Squeaker
if (actionMined) {
if (strlen(#s(this.User))==0)
setstring this.User,#a;
this.Mine++;
message #v(this.Mine)% by #v(this.User);
}
if (created||timeout) {
if (strequals(#s(this.User),#a)) {
if (this.Mine==100) {
setimg bushgrape1.gif;
sleep 5;
}
}
timeout=0.1;
}

This is assuming it's a P2P script, otherwise it won't work. It also doesn't seem to actually do anything after it's completed but that's something you'll have to change yourself.
And the owner never actually changes, which is something which Googi would probably love but is rather weird.

Quote:

Originally posted by screen_name

they use this.whatever=#a in playerhouses i think

It doesn't work anywhere nor ever. It's always setstring, though there are rumours Stefan is working on changing the scripting engine so it is possible to set string in such a fashion.

screen_name 03-19-2002 10:07 PM

Quote:

Originally posted by Spanko

It doesn't work anywhere nor ever. It's always setstring, though there are rumours Stefan is working on changing the scripting engine so it is possible to set string in such a fashion.

lol, okay, guess i was wrong :D

la_builder 03-19-2002 11:13 PM

thanks everybody who actually helped bud it was already fixed before the last script and its non-p2p. And the other guys darkraider or something like that did you ever heard of learning..
i gues not...
pretty stupid back than bud i wanted to know how to loop gani properly caus it lagd. So....

THINK BEFORE YOU SAY SOMETHING


All times are GMT +2. The time now is 03:41 AM.

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