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 01-07-2002, 02:06 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Question how can i fix this

Ok i wanted to make something like a craft system bud it lags as hell because of a part in da script and its not my computer bud the script this is the script plz fix it

if (playerenters) {message Free Table;hide;}
if (actionmining) {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=100) {setimg fossil.gif;this.Mine=this.Mine-100;toweapons Rock;hide;destroy;message Free Table;}}
Reply With Quote
  #2  
Old 01-07-2002, 02:19 AM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Here you go

Tested, Works
NPC Code:

if (playerenters) {
message Free Table;
}

if (actionmining) {
setstringthis.User,#a;
setstring this.Mine,#v(strtofloat(#s(this.Mine))+1);
message #s(this.Mine)% by #s(this.User);
}

if (strequals(#s(this.User),#a)){
if (strtofloat(#s(this.Mine))>99) {
setimg fossil.gif;
setstring this.Mine,#v(strtofloat(#s(this.Mine))0);
toweapons Rock;message Free Table;
setimgpart pics1.png,1,1,1,1;
}
}



Dunno, Havent tested (makes it so it does not say free table unless somoene is done crafting ... i think)
NPC Code:

if (playerenters&&!this.mode==1) {
message Free Table;
}

if (actionmining) {
this.mode = 0;
setstringthis.User,#a;
setstring this.Mine,#v(strtofloat(#s(this.Mine))+1);
message #s(this.Mine)% by #s(this.User);
}

if (strequals(#s(this.User),#a)){
if (strtofloat(#s(this.Mine))>99) {
setimg fossil.gif;
setstring this.Mine,#v(strtofloat(#s(this.Mine))0);
toweapons Rock;message Free Table;
setimgpart pics1.png,1,1,1,1;
this.mode = 1;
}
}

__________________
Aim: Mmm Kumada

Reply With Quote
  #3  
Old 01-07-2002, 02:45 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
thanks for fixing owner system

bud it still lags if i use the hammer will it take like 10 sec before the precent i giong up by 1
Reply With Quote
  #4  
Old 01-07-2002, 03:56 AM
PhenomX PhenomX is offline
Registered User
Join Date: Jan 2002
Location: Holliday, Texas
Posts: 38
PhenomX is on a distinguished road
Send a message via AIM to PhenomX
maybe some of the setimg s are lagging your computer, try check all your options and make sure there is nothing that could interfere, because if graal has to look for te img, it could lag it down fast enough the make the percentage slower appearing.
__________________
-GForce
Reply With Quote
  #5  
Old 01-07-2002, 05:03 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Unhappy nope

i think its not that also could someone of you remake it a little plzz
caus i cant i really dont know what the bug is
Reply With Quote
  #6  
Old 01-07-2002, 06:24 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Your hammer script is probably bugged.. or u dont have the fossil.gif img
__________________
Aim: Mmm Kumada

Reply With Quote
  #7  
Old 01-07-2002, 07:27 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Unhappy :(

well here is my hammer script check it for bugs plzzz

// NPC made by Discounter
if (playerenters) {
message Hammer;
blockagain;
}
if (playertouchsme) {
toweapons Hammer;
}
if (weaponfired) {
setani jaxe,hammergold.png;freezeplayer 0.5;
sleep 3;
triggeraction playerx+1.5+vecx(playerdir)*2,
playery+2+vecy(playerdir)*2,mining,#v(axepower);
}
Reply With Quote
  #8  
Old 01-07-2002, 08:18 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
For rocks or anything you want to have triggeraction, use setshape.... So it will work even w/o the gif...

setshape 1,32,32; will define and NPC with the width and hiegh of 32 px despite its gif (if any)
__________________

subliminal message: 1+1=3
Reply With Quote
  #9  
Old 01-07-2002, 08:21 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Re: :(

Quote:
Originally posted by la_builder
well here is my hammer script check it for bugs plzzz

// NPC made by Discounter
if (playerenters) {
message Hammer;
blockagain;
}
if (playertouchsme) {
toweapons Hammer;
}
if (weaponfired) {
setani jaxe,hammergold.png;freezeplayer 0.5;
sleep 3;
triggeraction playerx+1.5+vecx(playerdir)*2,
playery+2+vecy(playerdir)*2,mining,#v(axepower);
}
U didn't make that lol.. There are 2 people claiming to make taht script.. u and josey... haha
__________________
Aim: Mmm Kumada

Reply With Quote
  #10  
Old 01-07-2002, 08:36 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Smile mmmm

First off all kumada i didnt cliam the owner ship it was releast by stefan knorr and falcor would this stop the lag because if so explain it to me why
Reply With Quote
  #11  
Old 01-07-2002, 08:45 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Post

here is the level
Attached Files
File Type: nw craftpro.nw (9.8 KB, 129 views)
Reply With Quote
  #12  
Old 01-07-2002, 08:51 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Re: mmmm

Quote:
Originally posted by la_builder
First off all kumada i didnt cliam the owner ship it was releast by stefan knorr and falcor would this stop the lag because if so explain it to me why
Yea u did.
Quote:
// NPC made by Discounter
__________________
Aim: Mmm Kumada

Reply With Quote
  #13  
Old 01-07-2002, 09:05 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
ow

o sorry your right bud plz get back to the problem
Reply With Quote
  #14  
Old 01-08-2002, 04:14 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
Re: Re: :(

Quote:
Originally posted by Kumada


U didn't make that lol.. There are 2 people claiming to make taht script.. u and josey... haha
you have got to be an idiot. EVERYONE uses a variation of that. They use the triggeraction code, because its a formula that is easy to use. Every other aspect of the NPC is done by individuals. They USE (or steal in your mind) the x,y formula, but they DIDNT steal the NPC. If you take the time to formulate your own trigger action x,y and the one stefan gave in newfeatures works fine, then you wasted time.

Dont be so quick to say that someone stole something. People use resources.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #15  
Old 01-08-2002, 04:37 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
Re: Re: :(

Quote:
Originally posted by Kumada


U didn't make that lol.. There are 2 people claiming to make taht script.. u and josey... haha
Kumada,
Just because two scripts look the same doesn't mean jack **** you stupid ****. Just because we used triggeraction and vecx and vecy doesn't mean we stole it. I know I didn't and I have a few people who can vouche for that because I was gone before triggeraction was even put into the commands. So you need to shut the **** up.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
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 02:52 AM.


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