I shall begin by explaining the first few steps to writing your own script.
(Note: In each line, anything that is written behind a ; will be ignored by the game, it is just a note by the author, to help himself think, or in this case to explain to others. You may find it useful when writing yourself.)
Each script needs a beginning and an end. It should look like this:
Code: Select all
begin my_first_script ; my_first_script being the unique name of your new script
endHere a simple example which will make the item you attach it to cast a spell on you when activated:
Code: Select all
begin my_first_script
If ( OnActivate == 1) ; as explained above, this checks if the item is activated or not, and if it is it will continue to execute the following line
Cast, "fireball", Player ; telling it to cast a fireball spell at you
Endif ; closing the if statement
end

