Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Image's in scripts help. (https://forums.graalonline.com/forums/showthread.php?t=38584)

Googi 09-26-2002 09:06 AM

Image's in scripts help.
 
I've been trying to rescript pearl diving to include black and pink pearls, since Loriel pretty much destroyed pearl diving, and Rabid said it might get uploaded if I made it.

Anyways, I've got everything done except that I can't get the new images to show up, mostly because I think I might be missing part of the script (even though everything else seems to work fine)

The only problem is that nowhere in the script does pearl1.gif show up.

So, I must ask, how is the script showing the image pearl1.gif.

Graal2001_NAT 09-26-2002 09:19 AM

...use ganis and params

Googi 09-26-2002 09:28 AM

Quote:

Originally posted by Graal2001_NAT
...use ganis and params
That's impossible, I changed the name of pearl1.gif to pearlohi.gif and the pearl image stopped appearing.

Graal2001_NAT 09-26-2002 09:31 AM

this.pearltype = 1;
setcharani whatever,#v(this.pearltype);

make the sprite that shows pearls PARAM1 and make the pearl image sprite# 1

Googi 09-26-2002 09:49 AM

NPC Code:

if (timeout) {
if (random(0,1)<this.popen) {
this.pearl = (random(0,1)<this.ppearl);
if (this.pearl==true)
setstring this.pearlsprite,1;
else
setstring this.pearlsprite,;

setcharani seashell_open,#s(this.pearlsprite);
sleep 0.1;
this.isopen = true;
sleep 0.9;
setcharani seashell_idle,#s(this.pearlsprite);
sleep random(3,6);
setcharani seashell_close,#s(this.pearlsprite);
sleep 0.2;
this.isopen = false;
sleep 0.8;
setcharani seashell_closed,;
}



Does that work?

R0b1n-NPC 09-26-2002 10:09 AM

Your formatting sucks, but it looks ok... I could be wrong.

Graal2001_NAT 09-26-2002 10:12 AM

isnt that the 2k1 script...

Googi 09-26-2002 10:59 PM

Quote:

Originally posted by Graal2001_NAT
isnt that the 2k1 script...
Yes sir it is.

Quote:

Originally posted by R0b1n-NPC
Your formatting sucks, but it looks ok... I could be wrong.
I see no indentation errors...

Oh, and I know that it's okay, I want to know if it would show pearl1.gif.

R0b1n-NPC 09-27-2002 12:13 AM

It all depends on the ganis googi..

Why not make new ones with param1 or attributes?

Googi 09-27-2002 03:08 AM

Quote:

Originally posted by R0b1n-NPC
It all depends on the ganis googi..

Why not make new ones with param1 or attributes?

That's not what I'm asking though...

Gah...

Okay, this is the entire ORIGIONAL (One I didn't modify), pearl clam shell script.

NPC Code:

if (created) {
this.pdefopen = 0.1;
this.delay = 10;
this.ppearl = 0.2;
}
if (created) {
drawunderplayer;
setstring this.pearlsprite,;
showcharacter;
setcharani seashell_closed,;

this.popen = this.pdefopen;
timeout = random(this.delay*0.8,this.delay*1.2);
}
if (timeout) {
if (random(0,1)<this.popen) {
this.pearl = (random(0,1)<this.ppearl);
if (this.pearl==true)
setstring this.pearlsprite,1;
else
setstring this.pearlsprite,;

setcharani seashell_open,#s(this.pearlsprite);
sleep 0.1;
this.isopen = true;
sleep 0.9;
setcharani seashell_idle,#s(this.pearlsprite);
sleep random(3,6);
setcharani seashell_close,#s(this.pearlsprite);
sleep 0.2;
this.isopen = false;
sleep 0.8;
setcharani seashell_closed,;
}
this.popen = this.pdefopen;

timeout = random(this.delay*0.8,this.delay*1.2);
}
if (actiondivekick && strequals(#s(client.race),bomy)) {
this.popen += 0.025;
}
if (playertouchsme && strequals(#s(client.race),bomy) && this.isopen==true && this.pearl==true) {
this.pearl = false;
setstring this.pearlsprite,;
setcharani #m(-1),;

pearls = strtofloat(#s(pearls))+1;
setstring pearls,#v(pearls);
setstring client.pearls,#s(pearls);
setstring server.gavepearls,#v(strtofloat(#s(server.gavepear ls))+1);
setani bomy_gotpearl,;
say2
Wow this is one of the#b
valueable white pearls!#b
You have now #s(pearls) pearls.;
}



Now, basicly, I'm asking where in that script does it tell the clamshell to show pearl1.gif.

Googi 09-27-2002 03:31 AM

Quote:

Originally posted by Kaimetsu
setcharani seashell_open,#s(this.pearlsprite);

READ WITH YOUR EYES THINK WITH YOUR BRAIN

Yes, I noticed that, however, the fact that pearlsprite is defined to 1, and not pearl1 makes me wonder how it could display the pearl1.gif file.

R0b1n-NPC 09-27-2002 03:50 AM

duh

setcharani blah,pearl#v(pearlsprite).gif;
:edit
you really are an idiot arent you?
edit:

CheeToS2 09-27-2002 04:01 AM

why are you posting 2k1 scripts? -_-

Googi 09-27-2002 04:57 AM

Quote:

Originally posted by R0b1n-NPC
pearl#v(pearlsprite).gif;

I don't see that anywhere in the script.

Quote:

Originally posted by CheeToS2
why are you posting 2k1 scripts? -_-

In order to give people trying to help me a better understanding of my problem, perhaps?

And besides the pearl script is already all over the forums? (As are many other 2K1 scripts I imagine), anyone can find it using the search utility.

R0b1n-NPC 09-27-2002 04:47 PM

Googi's an idiot dude, no point trying to explain, he just wants someone to do it for him.

Googi 09-27-2002 10:58 PM

Quote:

Originally posted by R0b1n-NPC
Googi's an idiot dude
I agree, and I will not try to argue that, I will also admit to being a terrible scripter.

Quote:

Originally posted by R0b1n-NPC
no point trying to explain, he just wants someone to do it for him.
Untrue, I understood Kaimetsu's most recent explanation.

I didn't know there were ganis for clam shells XD

emortylone 09-27-2002 11:08 PM

Googi... I'm starting to think you're just trying to con people into revealing and giving things to you so you can use them... learn to script instead of always posting things. I didn't start posting here really until I was at a point when I could do basic things at the very least! You are asking about the dumbest things! Come on =/
---Shifter

Googi 09-27-2002 11:33 PM

Quote:

Originally posted by emortylone
Googi... I'm starting to think you're just trying to con people into revealing and giving things to you so you can use them... learn to script instead of always posting things. I didn't start posting here really until I was at a point when I could do basic things at the very least! You are asking about the dumbest things! Come on =/
---Shifter

Hello sir, part of the purpose of this board is for people to ask questions, if you choose not to answer them, that is your choice, but choosing to ask questions is mine.


All times are GMT +2. The time now is 11:37 AM.

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