scripts?
#1
Posted 19 January 2010 - 07:21 PM
#2
Posted 19 January 2010 - 07:27 PM
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. j/k
Apologies if I got the tab names wrong... >_>
#3
Posted 19 January 2010 - 11:41 PM
#5
Posted 20 January 2010 - 09:18 AM
#7
Posted 20 January 2010 - 03:48 PM
Have it on you?
Edited by AgentLym, 20 January 2010 - 03:48 PM.
#8
Posted 20 January 2010 - 08:21 PM
ok now i put one in but i dont know how to make it work...
http://www.zcrealm.n...cript.php?num=6
#9
Posted 21 January 2010 - 08:00 AM
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?
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.
Edited by AgentLym, 21 January 2010 - 08:02 AM.
#10
Posted 21 January 2010 - 02:46 PM
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?
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.
#11
Posted 21 January 2010 - 03:44 PM
#12
Posted 21 January 2010 - 05:50 PM
#13
Posted 21 January 2010 - 06:28 PM
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
Posted 21 January 2010 - 06:39 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)
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
Posted 21 January 2010 - 06:42 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users