Difference between revisions of "Death check with weapon script"

no edit summary
imported>Spd1274
imported>Spd1274
Line 92: Line 92:
Finally our script finishes up by running a test that Dead and Once have been set to the correct values for a killed NPC. <br /> Than the script adds an Item of our choice to the Player's inventory and displays a message.<br /> In order to avoid the script giving the Player the item over and over and over, the last action of the script is to set Once to 1, avoiding a loop.
Finally our script finishes up by running a test that Dead and Once have been set to the correct values for a killed NPC. <br /> Than the script adds an Item of our choice to the Player's inventory and displays a message.<br /> In order to avoid the script giving the Player the item over and over and over, the last action of the script is to set Once to 1, avoiding a loop.


Now, let's save our script, by clicking on the Floppy Disk icon, and close the window.
Now, be sure to change to Script Type to: Magic Effect. Now click the Floppy Disk icon to save the script. Close the Script Editor.
 
[[Image:scripttypepic.png]]


This completes our creation of the script, it is all that simple. It needs to be said that the tests run under "ScriptEffectStart" must be run there, because that portion of the script is run while attacking the victim, and if those tests were run under "GameMode" the Player would no longer have a target to test.
This completes our creation of the script, it is all that simple. It needs to be said that the tests run under "ScriptEffectStart" must be run there, because that portion of the script is run while attacking the victim, and if those tests were run under "GameMode" the Player would no longer have a target to test.
Line 100: Line 102:
== The Gift ==
== The Gift ==


In this case we are creating a potion so, we need to navigate to the Potion section of the CS. Click on Magic -> than Potion.
In this case we are creating a potion so, we need to navigate to the Potion section of the CS Object Window. Click on Magic -> than Potion.


[[Image:thegiftpic.png]]
[[Image:thegiftpic.png]]


We than need to select a potion inside the menu. I am choosing "TestPoison" because I like it's bottle image, double click on your choice. Now, you want to change the ID to something easily found, in this case: Item (in order to match our skeleton script). Next change the name of the potion Now, you can edit the properties of the potion if you'd like, but that is for another tutorial, and falls out of my hands.  
We than need to select a potion inside the menu. I am choosing "TestPoison" because I like it's bottle image, double click on your choice. Now, you want to change the ID to something easily found, in this case: Item (in order to match our skeleton script). Next change the name of the potion Now, you can edit the properties of the potion if you'd like, but that is for another tutorial, and falls out of my hands.  


Save the item, and close out of the dialogue box.
Save the item, and close out of the dialogue box.
Line 113: Line 113:
== The Ench ==
== The Ench ==


The Ench is altogether to challenging, simply navigate to the Enchantment division by clicking Step -> than step -> and than Step.
The Ench is altogether to challenging, simply navigate to the Enchantment division by clicking Magic -> than Enchantment


Right-Click inside the list of enchantments and select New.
Right-Click inside the list of enchantments and select New.
Anonymous user