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 04-06-2002, 02:15 AM
prozacboy666 prozacboy666 is offline
Registered User
Join Date: Mar 2002
Posts: 130
prozacboy666 will become famous soon enough
Unhappy Fshing Help

I made this fishing pole and then i tryed to make the script sells your fish so you can get money but no does anyone know why might be wrong?
Reply With Quote
  #2  
Old 04-06-2002, 06:52 AM
Dustey Dustey is offline
Registered User
Join Date: Nov 2001
Location: Do You Think I Know?
Posts: 193
Dustey is on a distinguished road
Send a message via AIM to Dustey
nope not much we can do given our current information so.... *please hang up and try your call again*
__________________
And Yes I work For.... Renegade
Reply With Quote
  #3  
Old 04-06-2002, 07:21 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
<Riot>
The script that is causing errors would be helpful
</Riot>
Reply With Quote
  #4  
Old 04-06-2002, 07:26 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
well first you fix the script and than voila!
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #5  
Old 04-07-2002, 02:46 AM
prozacboy666 prozacboy666 is offline
Registered User
Join Date: Mar 2002
Posts: 130
prozacboy666 will become famous soon enough
if(created) { Rodstock=30; }
if (playerenters) {message (#v(Rodstock) In Stock); }
if (playerchats && strequals(#c,buy fishing rod) && playerrupees<99) {say2 Not Enough Money.; }
if (playerchats && strequals(#c,buy fishing rod)) {
if (Rodstock==0) { say2 No Rods In Stock.; } }
if (playerchats && strequals(#c,buy fishing rod) && !hasweapon(Fishing Rod)) {
if (playerrupees>=100 && Rodstock>0) {setplayerprop #c,*Bought Fishing Rod*;
toweapons Fishing Rod; Rodstock=Rodstock-1; playerrupees=playerrupees-100;
message (#v(Rodstock) In Stock); } }
if (weaponfired && hasweapon(Fishing Rod) && onwater(playerx-1,playery-1)||onwater(playerx+1,playery+1)||onwater(playerx-1,playery+1)||onwater(playerx+1,playery-1)) {
freezeplayer 5;
playersprite=33; this.x=playerx; this.y=playery;
if (playerdir=0) { this.x+=1; this.y-=1.4; }
if (playerdir=1) { this.x+=0; this.y+=1.2}
if (playerdir=2) { this.-+=.7; this.y+=1.2 }
if (playerdir=3) { this.x+=2; this.y-=1.4}
showimg 100,fishrod.png,this.x,this.y;
changeimgpart 100,playerdir*20,0,20,35;
freezeplayer 1; fishweight = int(random(1,5)); fishcatch = int(random(1,10));
if(fishcatch<=7) { } else {
fishedweight = strtofloat(#s(fishedweight))+fishweight;
if (fishedweight>100) fishedweight = 150; setstring fishedweight,#v(fishedweight);
setstring fishedsize,#v(strtofloat(#s(fishedsize))+this.size );
setstring client.fishedweight,#s(fishedweight); say2 You got a #v(fishweight) pounder!;
setstring this.fisher,#a; }}

there is the script.
Reply With Quote
  #6  
Old 04-07-2002, 04:45 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
Quote:
Originally posted by Kaimetsu
Code tags please!
Like this I think..

PHP Code:
if(created) { Rodstock=30; } 
if (
playerenters) {message (#v(Rodstock) In Stock); } 
if (playerchats && strequals(#c,buy fishing rod) && playerrupees<99) {say2 Not Enough Money.; } 
if (playerchats && strequals(#c,buy fishing rod)) { 
if (Rodstock==0) { say2 No Rods In Stock.; } } 
if (
playerchats && strequals(#c,buy fishing rod) && !hasweapon(Fishing Rod)) { 
if (playerrupees>=100 && Rodstock>0) {setplayerprop #c,*Bought Fishing Rod*; 
toweapons Fishing RodRodstock=Rodstock-1playerrupees=playerrupees-100
message (#v(Rodstock) In Stock); } } 
if (weaponfired && hasweapon(Fishing Rod) && onwater(playerx-1,playery-1)||onwater(playerx+1,playery+1)||onwater(playerx-1,playery+1)||onwater(playerx+1,playery-1)) { 
freezeplayer 5
playersprite=33this.x=playerxthis.y=playery
if (
playerdir=0) { this.x+=1this.y-=1.4; } 
if (
playerdir=1) { this.x+=0this.y+=1.2
if (
playerdir=2) { this.-+=.7this.y+=1.2 
if (
playerdir=3) { this.x+=2this.y-=1.4
showimg 100,fishrod.png,this.x,this.y
changeimgpart 100,playerdir*20,0,20,35
freezeplayer 1fishweight int(random(1,5)); fishcatch int(random(1,10)); 
if(
fishcatch<=7) { } else { 
fishedweight strtofloat(#s(fishedweight))+fishweight; 
if (fishedweight>100fishedweight 150setstring fishedweight,#v(fishedweight); 
setstring fishedsize,#v(strtofloat(#s(fishedsize))+this.size); 
setstring client.fishedweight,#s(fishedweight); say2 You got a #v(fishweight) pounder!; 
setstring this.fisher,#a; }} 
__________________
Reply With Quote
  #7  
Old 04-07-2002, 04:46 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
Or like this...


NPC Code:
if(created) { Rodstock=30; } 
if (playerenters) {message (#v(Rodstock) In Stock); }
if (playerchats && strequals(#c,buy fishing rod) && playerrupees<99) {say2 Not Enough Money.; }
if (playerchats && strequals(#c,buy fishing rod)) {
if (Rodstock==0) { say2 No Rods In Stock.; } }
if (playerchats && strequals(#c,buy fishing rod) && !hasweapon(Fishing Rod)) {
if (playerrupees>=100 && Rodstock>0) {setplayerprop #c,*Bought Fishing Rod*;
toweapons Fishing Rod; Rodstock=Rodstock-1; playerrupees=playerrupees-100;
message (#v(Rodstock) In Stock); } }
if (weaponfired && hasweapon(Fishing Rod) && onwater(playerx-1,playery-1)||onwater(playerx+1,playery+1)||onwater(playerx-1,playery+1)||onwater(playerx+1,playery-1)) {
freezeplayer 5;
playersprite=33; this.x=playerx; this.y=playery;
if (playerdir=0) { this.x+=1; this.y-=1.4; }
if (playerdir=1) { this.x+=0; this.y+=1.2}
if (playerdir=2) { this.-+=.7; this.y+=1.2 }
if (playerdir=3) { this.x+=2; this.y-=1.4}
showimg 100,fishrod.png,this.x,this.y;
changeimgpart 100,playerdir*20,0,20,35;
freezeplayer 1; fishweight = int(random(1,5)); fishcatch = int(random(1,10));
if(fishcatch<=7) { } else {
fishedweight = strtofloat(#s(fishedweight))+fishweight;
if (fishedweight>100) fishedweight = 150; setstring fishedweight,#v(fishedweight);
setstring fishedsize,#v(strtofloat(#s(fishedsize))+this.size );
setstring client.fishedweight,#s(fishedweight); say2 You got a #v(fishweight) pounder!;
setstring this.fisher,#a; }}

__________________
Reply With Quote
  #8  
Old 04-07-2002, 05:17 AM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
So many errors.. Here I fixed the first 3 lines

NPC Code:

if(created) {
Rodstock=30;
}
if (playerenters) {
message #v(Rodstock) In Stock;
}
if (playerchats && strequals(#c,buy fishing rod) && playerrupees<99)) {
say2 Not Enough Money.;
}

__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
Reply With Quote
  #9  
Old 04-07-2002, 07:00 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
please note

jsut a freindly note,

I am the original prozac,

a totally different person form prozacboy666.
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #10  
Old 04-07-2002, 07:57 AM
prozacboy666 prozacboy666 is offline
Registered User
Join Date: Mar 2002
Posts: 130
prozacboy666 will become famous soon enough
yes i am not the prozac from san's my friend gave this account to me 3 years ago X_x
Reply With Quote
  #11  
Old 04-07-2002, 05:36 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 Dustey
nope not much we can do given our current information so.... *please hang up and try your call again*
"please deposit fifty-five cents"
Reply With Quote
  #12  
Old 04-07-2002, 09:22 PM
prozacboy666 prozacboy666 is offline
Registered User
Join Date: Mar 2002
Posts: 130
prozacboy666 will become famous soon enough
i spent my last penny on getting my pw up. Psyker wanted $20 just for him to review it =/
Reply With Quote
  #13  
Old 04-08-2002, 08:26 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Quote:
Originally posted by happyme
I have a problem with this script... I would really appreciate it if someone would help me.... when im done fishing, the fishing rod is still there....
NPC Code:

// Fishing Rod made by dfex
if(created) {
Rodstock=30;
}
if (playerenters) {
message (#v(Rodstock) In Stock);
}
if (playerchats && strequals(#c,buy fishing rod)) {
if (playerrupees<100) {
say2 Not Enough Money.;
}
}
if (playerchats && strequals(#c,buy fishing rod)) {
if (Rodstock==0) {
say2 No Rods In Stock.;
}
}
if (playerchats && strequals(#c,buy fishing rod) && !hasweapon(Fishing Rod)) {
if (playerrupees>=100) {
if (Rodstock>0) {
setplayerprop #c,*Bought Fishing Rod*;
toweapons Fishing Rod;
Rodstock=Rodstock-1;
playerrupees=playerrupees-100;
message (#v(Rodstock) In Stock);
}
}
}
if (weaponfired && hasweapon(Fishing Bucket) && onwater(players[0].x,players[0].y)){
playersprite=33;
this.x=playerx;
this.y=playery;
if (playerdir=0) { this.x+=1; this.y-=1.4; }
if (playerdir=1) { this.x+=0; }
if (playerdir=2) { this.x+=.7; this.y+=1.2 }
if (playerdir=3) { this.x+=2; }
showimg 100,od-fishingrod.gif,this.x,this.y;
changeimgpart 100,playerdir*20,0,20,35;
freezeplayer 1;
fishweight = int(random(1,5));
fishcatch = int(random(1,10));
if(fishcatch<=7) {
}
else {
fishedweight = strtofloat(#s(fishedweight))+fishweight;
if (fishedweight>100) fishedweight = 150;
setstring fishedweight,#v(fishedweight);
setstring fishedsize,#v(strtofloat(#s(fishedsize))+this.size );
setstring client.fishedweight,#s(fishedweight);
say2 You got a #v(fishweight) pounder!;
setstring this.fisher,#a;
}}
if (weaponfired && !onwater(players[0].x,players[0].y)){
setplayerprop #c,I cant fish here;
}

Hmm, I wonder....
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #14  
Old 04-09-2002, 12:50 AM
prozacboy666 prozacboy666 is offline
Registered User
Join Date: Mar 2002
Posts: 130
prozacboy666 will become famous soon enough
wounder what?
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 11:27 PM.


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