The Dink Network

My D-Mod Script... Need Help

June 16th 2005, 07:34 PM
knights.gif
DinkKiller
Peasant He/Him United States
The world could always use more heroes 
Can someone just teach me how to do a basic script? Do it on these lines.
S1=Sprite 1 S2=Sprite 2
S1 "Hi Priest. Can you tell me where Sith lives?"
S2 "God is with you, child."
S1 "Um... Great. But where does Sith live?"
S2 "I will only talk if you ask nicely."
S1 "Just tell me where Sith lives."
S2 "Learn to talk like a Buddhist would"
S1 "WHERE THE HELL DOES SITH LIVE YOU STUPID PRIEST!!"
S2 "......"
S1 "Fine. Can you please tell me where Sith lives."
S2 "Thank you. He lives in the house that is in the North-West corner of our town.
S1 "Thank you (in a whisper) you stupid priest"
S2 "What did you say?"
S1 "I said go to hell you fricken' priest"
S2 (While Dink walks away) "........."

S1=Dink S2=Priest
Please help me. (This is from the soon to be script of Dink and the Bonca)
(Redink1, SimonK, Carrie2004, anyone that has made a 30-800 screen D-Mod)
June 16th 2005, 07:52 PM
goblinm.gif
void main( void )
{
}

void talk( void )
{
freeze(1);
say_stop("Hi Priest. Can you tell me where Sith lives?", 1);
say_stop("`2God is with you, child.", &current_sprite); //etc
unfreeze(1);
}
June 16th 2005, 08:26 PM
knights.gif
DinkKiller
Peasant He/Him United States
The world could always use more heroes 
What does everything mean?
June 16th 2005, 08:42 PM
goblinm.gif
You can probably guess most of it... the stuff in the brackets after void talk( void ) is what happens after you "talk" to the person (i.e., hit spacebar.)

The stuff in the brackets after void main( void ) is what gets run when you walk onto the screen (actually when the sprite is drawn, I think, but whatever.) So if you wanted to make the dude walk around you'd put stuff there. I'll let you figure the rest out, since you seem reasonably sharp.
June 16th 2005, 08:45 PM
goblinm.gif
I guess one more thing needs explanation... sprite numbers. Dink is 1. The sprite whose script is running is &current_sprite, which is an integer. Sprite numbers are used in all 4 commands!
June 17th 2005, 01:03 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
All that is pretty simple anyway, everyone better know that freeze freezes you
June 17th 2005, 01:28 AM
pq_skull.gif
dinkme
Peasant He/Him India
 
void talk();
{
freeze(1);
freeze(&current_sprite);
say_stop("`2Hello Dink",&current_sprite);
say_stop("Thank You",1);
unfreeze(1);
unfreeze(&current_sprite);

}
June 17th 2005, 07:02 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
To be honest, I don't think you need help like the topic title suggests, you just couldn't be bothered to read a tutorial (make that any tutorial as a talking script is one of the first things they'll teach you) - people recommend this file to start. Then this one is quite handy too (or the Windows Help File version). Even in a D-Mod with less than 30 screens we see working conversation-scripts
June 17th 2005, 08:58 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
Don't forget the good ol' EasyDinkC
June 17th 2005, 10:26 AM
goblinm.gif
Weird, I learned scripting mostly by just looking at the source and trying to write dmods. But I suppose it's a personal thing... I usually learn more from doing homework than I do in class.
June 17th 2005, 10:34 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Yeah, but you can't advice people to simply look at the source, mess around and see where they'll finish Source files are useful but some reading on how scripts work and all is what most should start with. Even if it was only the tut1.txt file in the develop directory (and then pick up the rest of the commands by looking at sources and the DinkC Reference).
June 17th 2005, 11:08 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
But you don't almost need to know scripting with EasyDinkC only what global variables are and local and syntax.
June 17th 2005, 12:08 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
You do - if I remember correctly it'll only help you in making shop scripts, for all other things it has a dropdown-menu to insert the procedures and all the commands. If you don't know the commands, you can fiddle around a bit but you will need tutorials eventually.
June 17th 2005, 01:25 PM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
yeah, I needed Ruidiemnts of Scripting, before I could script with ti actually. I remember I startet to nag Redink1 on his mail asking for if statement and such

I don't know if he can remember it though. Anyway... EasyDinkC will atleast help you very on your way if you just know the basic of DinkC
June 18th 2005, 01:11 AM
knights.gif
DinkKiller
Peasant He/Him United States
The world could always use more heroes 
How do you use Easy DinkC?
June 18th 2005, 03:55 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
Read the manual.
June 21st 2005, 07:27 AM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
I think you should click on Developement and download some tutorials. I also learned scripting by looking at other scripts.
Good luck!