Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Fshing Help (https://forums.graalonline.com/forums/showthread.php?t=27004)

prozacboy666 04-06-2002 02:15 AM

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?

Dustey 04-06-2002 06:52 AM

nope :( not much we can do given our current information so.... *please hang up and try your call again*

Spectre1337 04-06-2002 07:21 AM

<Riot>
The script that is causing errors would be helpful
</Riot>

Saga2001 04-06-2002 07:26 AM

well first you fix the script and than voila!

prozacboy666 04-07-2002 02:46 AM

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.

Aknts 04-07-2002 04:45 AM

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; }} 


Aknts 04-07-2002 04:46 AM

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; }}


SaijinGohan 04-07-2002 05:17 AM

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.;
}


prozac424242 04-07-2002 07:00 AM

please note
 
jsut a freindly note,

I am the original prozac,

a totally different person form prozacboy666.

prozacboy666 04-07-2002 07:57 AM

yes i am not the prozac from san's my friend gave this account to me 3 years ago X_x

nyghtGT 04-07-2002 05:36 PM

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"

prozacboy666 04-07-2002 09:22 PM

i spent my last penny on getting my pw up. Psyker wanted $20 just for him to review it =/

joseyisleet 04-08-2002 08:26 AM

-=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....

prozacboy666 04-09-2002 12:50 AM

wounder what?


All times are GMT +2. The time now is 11:44 PM.

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