Jump to content

Photo

scripts?


  • Please log in to reply
30 replies to this topic

#1 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 19 January 2010 - 07:21 PM

hey how do you put scripts in zquest i tried putting it in with notepad icon_confused.gif icon_unsettled.gif and it did not work so how?

#2 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 19 January 2010 - 07:27 PM

First, you want to put every script you're going to use in one file. Make sure you have

CODE
import "std.zh"


at the top, or you'll probably get errors. Save this as a .z instead of a .txt, since ZQuest reads .z files.

Now, go into ZQuest, and under 'Quest', you go to 'Scripts' and go to 'Compile'. From here, you hit import and say yes. Find the .z file you made and import it. Then, hit compile and hope for dear life nothing's wrong. icon_razz.gif j/k

Apologies if I got the tab names wrong... >_>

#3 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 19 January 2010 - 11:41 PM

On the normal screen editor, just press Y to get to the "Compile ZScript" dialogue.

#4 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 19 January 2010 - 11:59 PM

QUOTE(cremeens1000 @ Jan 19 2010, 06:21 PM) View Post

hey how do you put scripts in zquest i tried putting it in with notepad icon_confused.gif icon_unsettled.gif and it did not work so how?

how do you save it as a z file its always a text file

#5 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 20 January 2010 - 09:18 AM

In the save dialogue, choose "All files" from the save as type box, and then save it as name.z.

#6 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 20 January 2010 - 03:16 PM

QUOTE(MoscowModder @ Jan 20 2010, 08:18 AM) View Post

In the save dialogue, choose "All files" from the save as type box, and then save it as name.z.
ok now i put one in but i dont know how to make it work...


#7 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 20 January 2010 - 03:48 PM

We may have to see the script so we can see how it works ourselves! ^^'

Have it on you?

Edited by AgentLym, 20 January 2010 - 03:48 PM.


#8 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 20 January 2010 - 08:21 PM

QUOTE(cremeens1000 @ Jan 20 2010, 02:16 PM) View Post

ok now i put one in but i dont know how to make it work...
download link
http://www.zcrealm.n...cript.php?num=6


#9 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 21 January 2010 - 08:00 AM

Once you've compiled your script, a box will appear with three tabs: FFC, Global, and Item. Click on the item tab, click on the Message script on the right hand side, then click the '<<' to send it to the quest file. Make a note of which numbered script you sent the 'Message' script over to.

Go back to the main screen, and go to Quest->Strings, and make a new string that says what you want to appear when you pick up said item. Make a note of the number of this string, as well.

Then, go to the item that you want to display the message, click the 'Pickup' tab, and enter the number of the script which you took note of earlier into the 'Script' box. Then, click on the Arguments tab, and in the D0 box, enter the number of the string when you took note of.

Why?

CODE
item script Message{
  void run(int m){
    Screen->Message(m);
  }
}


The first line designates the type of script this is. As you can see, it's an Item script, therefore it's located under the item tab in the script assigning dialog.
In the next line, you see 'int m'. That's designating an argument as Integer 'm'. Remember the argument you set in the item's argument tab? That was 'int m'.
The next line is actually what happens when the script activates. Since you set the script in the pickup tab of the item, it activates on pickup of the item. In this case, it'll display the message numbered 'm', which you set in the argument D0.

It's a little complicated at first, but you'll get it! ^^ SO you don't have to worry about all the technical stuff yet. icon_razz.gif

Edited by AgentLym, 21 January 2010 - 08:02 AM.


#10 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 21 January 2010 - 02:46 PM

QUOTE(AgentLym @ Jan 21 2010, 07:00 AM) View Post

Once you've compiled your script, a box will appear with three tabs: FFC, Global, and Item. Click on the item tab, click on the Message script on the right hand side, then click the '<<' to send it to the quest file. Make a note of which numbered script you sent the 'Message' script over to.

Go back to the main screen, and go to Quest->Strings, and make a new string that says what you want to appear when you pick up said item. Make a note of the number of this string, as well.

Then, go to the item that you want to display the message, click the 'Pickup' tab, and enter the number of the script which you took note of earlier into the 'Script' box. Then, click on the Arguments tab, and in the D0 box, enter the number of the string when you took note of.

Why?

CODE
item script Message{
  void run(int m){
    Screen->Message(m);
  }
}

how do i make a note of witch numbered script i want to use?

The first line designates the type of script this is. As you can see, it's an Item script, therefore it's located under the item tab in the script assigning dialog.
In the next line, you see 'int m'. That's designating an argument as Integer 'm'. Remember the argument you set in the item's argument tab? That was 'int m'.
The next line is actually what happens when the script activates. Since you set the script in the pickup tab of the item, it activates on pickup of the item. In this case, it'll display the message numbered 'm', which you set in the argument D0.

It's a little complicated at first, but you'll get it! ^^ SO you don't have to worry about all the technical stuff yet. icon_razz.gif



#11 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 21 January 2010 - 03:44 PM

Eh... just grab a piece of paper and write it down? ^^' If you imported the script to slot 1 of your item script list, write down '1'. Then, in the Script box under the pickup tab in the item you want the script to work on, you put the number you wrote down. (a number 1, in this case)

#12 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 21 January 2010 - 05:50 PM

oh i thought you were talking about something els i am very dumb

#13 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 21 January 2010 - 06:28 PM

Heh, don't be too down on yourself, now!

I had so much trouble getting started with scripts that I'm surprised the pros didn't give up on me! And now that I get it, it's feels awesome being able to help other people! I just hope I'm a good teacher! ^^'

#14 Tree

Tree

    Everything must go away

  • Members
  • Real Name:Mundy Fumple McStroodlestein
  • Location:The Milky Way Galaxy

Posted 21 January 2010 - 06:39 PM

QUOTE(AgentLym @ Jan 21 2010, 02:44 PM) View Post

Eh... just grab a piece of paper and write it down? ^^' If you imported the script to slot 1 of your item script list, write down '1'. Then, in the Script box under the pickup tab in the item you want the script to work on, you put the number you wrote down. (a number 1, in this case)
thanks for the help the script works but there is something lame about it,
when you pickup the item the string comes up but once the item chime da na na na thing stops you cane move around even if the stirng still going.

#15 Joe123

Joe123

    Retired

  • Members

Posted 21 January 2010 - 06:42 PM

Quest->Rules->Other->Message Freeze All Action


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users