Graal Forums

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

nyghtGT 09-25-2001 10:25 AM

Mining ....
 
Here is some cheap mining stuff i made ... its very primitive and may not work but use it as you please ... its my first uses of triggeraction ...

on the hammer/axe:

// NPC made by Nyght v3.5
if (playersays(get axe)){toweapons Test Axe}

if (weaponfired) {
setani jaxe,hammergold.png;
triggeraction playerx+1.5+vecx(playerdir)*2,
playery+2+vecy(playerdir)*2,mining,#v(axepower);
}

and on the rock(s):

// NPC made by Nyght v3.2
if (actionmining) {
axepower = strtofloat(#p(0));
this.power -= axepower;
if (this.power<=1) {
setstring uncraftedgold,#v(strtofloat(#s(uncraftedgold))+1);
hide;putleaps 2,x,y;timeout=10;
}
}
if (timeout){show
}

just if your gonna use em let me know so i can check em out on your server/player world project if or when it may go up ....

sqar 09-25-2001 04:46 PM

Ummmm!
thats almost the exact same script that you find in the newfeatures2001.txt file in your graal directory
its not the original :asleep:

Shard_IceFire 09-25-2001 08:38 PM

lol

BocoC 09-25-2001 09:17 PM

Hee hee

Shard_IceFire 09-25-2001 09:20 PM

ROFL

ownerofbabylon 09-26-2001 02:12 AM

Quote:

Originally posted by sqar
Ummmm!
thats almost the exact same script that you find in the newfeatures2001.txt file in your graal directory
its not the original :asleep:

they have a mining script in the newfeatures.txt???

LiquidIce00 09-26-2001 02:15 AM

Quote:

Originally posted by ownerofbabylon


they have a mining script in the newfeatures.txt???

Stefan put like a little vecx vecy example .. and its kinda like that

SSRobgeta 09-26-2001 04:01 AM

I made a really screwed up version of Lumber Jacking because I didn't know how to use Triggeraction yet. Anyone wanna see it? ;)

SSj_Link 09-26-2001 04:56 AM

i do lol


-freaky-

Enigma_GP6 09-26-2001 06:33 AM

Triggeraction? Never heard of it............ :megaeek:
:sigh: I need to check the command list again.........

-Rebel001

SSRobgeta 09-26-2001 06:21 PM

I'll put my script on later :o

toad1413 09-26-2001 06:44 PM

I made a fully working mining script without triggerationand without strings too! The only thing that doesn't work is the selling. :(

dragoonvenganc 09-26-2001 09:03 PM

Well i made lol

i made a lumberjack and minning script..
lumberjack plants tree in time the tree grows has 5 dif growth stages.. you can cut down at any stage.. but the bigger the more wood i checked the player gani and x and y to do.. selling works it works.

and minning have bunch of rocks you blow one up and it lays rocks .. same stuff as lumberjack it works..

i am tring to use trigger action cant get it to work .. it would make script shorter.. he he mine work.. good.. you can sell and trade so on..

SSRobgeta 10-01-2001 12:54 AM

I can't get my Triggeraction to work either

ArmadeusWarlock 10-01-2001 04:08 AM

Quote:

Originally posted by Kaimetsu


And you too should shorten your sig.

That would help :o

SagaTCN 10-01-2001 11:58 PM

I happen to think that's a very nice basic example.

pretty.

fireball_dolphonia 10-02-2001 02:18 AM

rock script
 
here it is
if (created) { this.step = 6; updateimg(); }
if (playerenters)
{ setcharani jrockfall,1; blockagain; sleep 2; this.step = 0; updateimg(); }
function updateimg() { setcharani jrock,#v(this.step+1); if (this.step=6) dontblock; else
{ blockagain; drawunderplayer; } }
if (hitbyaxe && random(0,1)<6)
{ ownerexists = false; this.hitterid = save[0]; gethitter();
if (hitter=0)with (players[hitter]){strength = strtofloat(#s(client.axestrength)); setstring client.axestrength,;
if (strength=1) ownerexists = true; } if (ownerexists==true)
{ this.step++; updateimg(); if (this.step==6) { gethitter(); if (hitter=0) with (players[hitter]) { if (this.type==1)
setstring uncrafteddiamond,#v(strtofloat(#s(uncrafteddiamond ))+1); else if (this.type==2)
setstring uncrafteddurby,#v(strtofloat(#s(uncrafteddurby))+1 ); else if (this.type==3)
setstring uncraftedgold,#v(strtofloat(#s(uncraftedgold))+1); else if (this.type==4)
setstring uncraftediron,#v(strtofloat(#s(uncraftediron))+1);
setani jgotgem,#v(4+this.type); freezeplayer2; }
sleep 2; gethitter(); if (hitter=0) with (players[hitter]) { unfreezeplayer; }
}
}
}
function gethitter() { hitter = -1; for (i=0; i<playerscount; i++) if (players[i].id==this.hitterid) { hitter = i; break; } }

SSRobgeta 10-02-2001 02:39 AM

Re: rock script
 
Quote:

Originally posted by fireball_dolphonia
here it is
if (created) { this.step = 6; updateimg(); }
if (playerenters)
{ setcharani jrockfall,1; blockagain; sleep 2; this.step = 0; updateimg(); }
function updateimg() { setcharani jrock,#v(this.step+1); if (this.step=6) dontblock; else
{ blockagain; drawunderplayer; } }
if (hitbyaxe && random(0,1)<6)
{ ownerexists = false; this.hitterid = save[0]; gethitter();
if (hitter=0)with (players[hitter]){strength = strtofloat(#s(client.axestrength)); setstring client.axestrength,;
if (strength=1) ownerexists = true; } if (ownerexists==true)
{ this.step++; updateimg(); if (this.step==6) { gethitter(); if (hitter=0) with (players[hitter]) { if (this.type==1)
setstring uncrafteddiamond,#v(strtofloat(#s(uncrafteddiamond ))+1); else if (this.type==2)
setstring uncrafteddurby,#v(strtofloat(#s(uncrafteddurby))+1 ); else if (this.type==3)
setstring uncraftedgold,#v(strtofloat(#s(uncraftedgold))+1); else if (this.type==4)
setstring uncraftediron,#v(strtofloat(#s(uncraftediron))+1);
setani jgotgem,#v(4+this.type); freezeplayer2; }
sleep 2; gethitter(); if (hitter=0) with (players[hitter]) { unfreezeplayer; }
}
}
}
function gethitter() { hitter = -1; for (i=0; i<playerscount; i++) if (players[i].id==this.hitterid) { hitter = i; break; } }

I bet thats the 2001 script and someone sold it to you

btedji 10-02-2001 03:08 AM

he might have gotten it when graal had the debugger error

fireball_dolphonia 10-02-2001 03:11 AM

Quote:

Originally posted by btedji
he might have gotten it when graal had the debugger error
:grrr: no i didnt theres a page where u get mostly all scripts of g2k1

btedji 10-02-2001 03:18 AM

Quote:

Originally posted by fireball_dolphonia
:grrr: no i didnt theres a page where u get mostly all scripts of g2k1
zorg online?

fireball_dolphonia 10-02-2001 03:32 AM

no

btedji 10-02-2001 03:36 AM

Quote:

Originally posted by fireball_dolphonia
no
ok, doesnt matter where you got it though :)

SSRobgeta 10-02-2001 03:57 AM

Quote:

Originally posted by btedji


ok, doesnt matter where you got it though :)

True True

nyghtGT 10-02-2001 05:43 PM

delete
 
delete this thread please !!!!

nyghtGT 10-03-2001 02:34 AM

its getting annoying
 
its getting annoying

btedji 10-03-2001 03:03 AM

this thread is good for people who wanted to do the mining thing

nyghtGT 10-03-2001 03:06 AM

hmmm ...
 
Quote:

Originally posted by btedji
this thread is good for people who wanted to do the mining thing
not for those who dont understand it ...

btedji 10-03-2001 03:07 AM

Re: hmmm ...
 
Quote:

Originally posted by nyghtGT
not for those who dont understand it ...
true

nyghtGT 10-03-2001 03:16 AM

listen ....
 
if you dont completely understand this then just IM me at nyght2k1 and i'll explain but please dont use this unless you know what all the parts do and so on .....


All times are GMT +2. The time now is 04:13 PM.

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