Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

View Poll Results: wich job is better?
Farming 3 50.00%
Baking 1 16.67%
Minning 2 33.33%
Voters: 6. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-16-2001, 04:16 AM
fireball_dolphonia fireball_dolphonia is offline
Registered User
Join Date: Sep 2001
Location: Graalistan
Posts: 73
fireball_dolphonia is on a distinguished road
Question Jobs

how do u script the farming job
__________________

ages.ccs.com/ccsimages/cat_
Reply With Quote
  #2  
Old 09-16-2001, 04:48 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
What, do you think someone's just gonna post the farming script for you? Either learn how to yourself or at least give us a basic farming script and we can help you fix the errors.
__________________

-=Shard IceFire=-
Reply With Quote
  #3  
Old 09-16-2001, 04:57 AM
fireball_dolphonia fireball_dolphonia is offline
Registered User
Join Date: Sep 2001
Location: Graalistan
Posts: 73
fireball_dolphonia is on a distinguished road
all i need is the watering can
__________________

ages.ccs.com/ccsimages/cat_
Reply With Quote
  #4  
Old 09-16-2001, 05:07 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

If you hafta use G2k1 scripts and can't make your own scripts that own g2k1 scripts... then you're just pathetic and shouldn't even be scripting.

*duck falls from the ceiling and explodes*
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #5  
Old 09-16-2001, 08:50 AM
wetferret1 wetferret1 is offline
Script Cow - MOOO!
wetferret1's Avatar
Join Date: Aug 2001
Location: Oregon, USA
Posts: 1,285
wetferret1 is on a distinguished road
Send a message via AIM to wetferret1
if (initialized) {
sprites = {-1,-1, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 4, 3, 3, 2, 1};
stepnext = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13, 0, 0, 0, 0};
stepdienext = { 0, 0, 0,16,15,14,12,12,12,12, 0, 0, 0, 0, 0, 0, 0};
}
if (created) {
showcharacter;
set this.istree;

this.step = 0;
this.timer = 0;
displaytree();
level.inittrees = true;

timeout = 10;
}
if (timeout) {
if (!(this.step in {0,10,11})) {
this.timer += 10;
if (this.step==1 || this.timer>=this.stepwait) {
if ((this.step in |2,9|) && this.waterlast<this.waterneeded)
this.step = stepdienext[this.step];
else
this.step = stepnext[this.step];
this.waterlast = 0;
this.timer = 0;
}
}
displaytree();
message;
timeout = 10;
}

if (actionwater && !(this.step in {0,10,11})) {
// Player waters the tree
this.waterlast++;
setcharani appletree#v(sprites[this.step]),25;
}
if (actionpushed || washit) {
if (this.step==10) {
this.step = 11;
displaytree();
}
}
if (playerchats && strequals(#c,reset trees) && strequals(#n,Jman9912)) {
this.step = 0;
displaytree();
}
if (updatetreeimg) {
displaytree();
}
if (playertouchsme) {
if (strequals(#a,#s(this.owner)) && this.step==11) {
// Player gets the apples
this.step = 12;
this.timer = 0;
displaytree();

apples = this.minapples + int(0.5+this.water/300);
setstring apples,#v(strtofloat(#s(apples))+apples);
setstring client.apples,#s(apples);
say2
You got #v(apples) apples!#b
You have now #s(apples) of#b
them.;
} else if (!(this.step in {0,10,11})) {
if (this.step>=12)
status = 4;
else if (this.waterlast>=this.waterneeded)
status = 0;
else if (this.timer<this.stepwait*4/10)
status = 1;
else if (this.timer<this.stepwait*8/10)
status = 2;
else
status = 3;
setcharani appletree#v(sprites[this.step]),#v(20+status);
message Owner: #s(this.owner);
}
}

function displaytree() {
if (sprites[this.step]<0)
hide;
else {
show;
setcharani appletree#v(sprites[this.step]),;
}
}
__________________
[img]http://s-o.clanpages.com/wet***getlal.png[/img]
Quote:
Originally posted by Loriel
I am not corrupt, and I will ban you if you don't believe that.
(-=Wetferret IceFire=-)
Reply With Quote
  #6  
Old 09-16-2001, 02:19 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
the whole point was not to give him a script
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 09-16-2001, 04:27 PM
wetferret1 wetferret1 is offline
Script Cow - MOOO!
wetferret1's Avatar
Join Date: Aug 2001
Location: Oregon, USA
Posts: 1,285
wetferret1 is on a distinguished road
Send a message via AIM to wetferret1
I am going to make a job! Hehe
__________________
[img]http://s-o.clanpages.com/wet***getlal.png[/img]
Quote:
Originally posted by Loriel
I am not corrupt, and I will ban you if you don't believe that.
(-=Wetferret IceFire=-)
Reply With Quote
  #8  
Old 09-16-2001, 04:33 PM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
I would think the watering can would just be...
PHP Code:
if (onwater(x,y)&&weaponfired)
{
  
setani ganifill,;
  
this.waterfill=4;
}
if (
weaponfired&&!onwater(x,y)) 
{
  
setani gani water,;
  
this.waterfill-=1;
}
if (
weaponfired&&!onwater(x,y)&&this.water=0)
{
  
setani gani canempty,;

With the tree, there would be a couple lines similar to...
PHP Code:
if (playertouchsme&&strequals(#m,water))
{
  
this.watered++;

__________________
the sky is falling
Reply With Quote
  #9  
Old 09-16-2001, 04:36 PM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
Quote:
Originally posted by wetferret1
NPC Code:
if (initialized) {
sprites = {-1,-1, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 4, 3, 3, 2, 1};
stepnext = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13, 0, 0, 0, 0};
stepdienext = { 0, 0, 0,16,15,14,12,12,12,12, 0, 0, 0, 0, 0, 0, 0};
}
if (created) {
showcharacter;
set this.istree;

this.step = 0;
this.timer = 0;
displaytree();
level.inittrees = true;

timeout = 10;
}
if (timeout) {
if (!(this.step in {0,10,11})) {
this.timer += 10;
if (this.step==1 || this.timer>=this.stepwait) {
if ((this.step in |2,9|) && this.waterlast<this.waterneeded)
this.step = stepdienext[this.step];
else
this.step = stepnext[this.step];
this.waterlast = 0;
this.timer = 0;
}
}
displaytree();
message;
timeout = 10;
}

if (actionwater && !(this.step in {0,10,11})) {
// Player waters the tree
this.waterlast++;
setcharani appletree#v(sprites[this.step]),25;
}
if (actionpushed || washit) {
if (this.step==10) {
this.step = 11;
displaytree();
}
}
if (playerchats && strequals(#c,reset trees) && strequals(#n,Jman9912)) {
this.step = 0;
displaytree();
}
if (updatetreeimg) {
displaytree();
}
if (playertouchsme) {
if (strequals(#a,#s(this.owner)) && this.step==11) {
// Player gets the apples
this.step = 12;
this.timer = 0;
displaytree();

apples = this.minapples + int(0.5+this.water/300);
setstring apples,#v(strtofloat(#s(apples))+apples);
setstring client.apples,#s(apples);
say2
You got #v(apples) apples!#b
You have now #s(apples) of#b
them.;
} else if (!(this.step in {0,10,11})) {
if (this.step>=12)
status = 4;
else if (this.waterlast>=this.waterneeded)
status = 0;
else if (this.timer<this.stepwait*4/10)
status = 1;
else if (this.timer<this.stepwait*8/10)
status = 2;
else
status = 3;
setcharani appletree#v(sprites[this.step]),#v(20+status);
message Owner: #s(this.owner);
}
}

function displaytree() {
if (sprites[this.step]<0)
hide;
else {
show;
setcharani appletree#v(sprites[this.step]),;
}
}

Why is there a line "if (playerchats && strequals(#c,reset trees) && strequals(#n,Jman9912)) {"? Did you steal this from Jman9912? Also, is "initialized" even a predefined flag?
__________________
the sky is falling
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:42 PM.


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