Welcome to PaperScript
What is PaperScript
Supported Games
What PaperScript is not
Some Examples
// PaperScript has a very simple C-like preprocessor
#define DEBUG
script OnEquipHandler : ObjectReference {
auto property PlayerREF: Actor
auto property Gold001: MiscItem
event OnEquipped(actor: Actor) {
PlayerREF.AddItem(Gold001, 10)
Debug.MessageBox("The magical armor grants you money")
#if DEBUG
Debug.Notification("gave gold to player")
#endif
}
event OnUnequipped(actor: Actor) {
PlayerREF.RemoveItem(Gold001, 10)
Debug.MessageBox("The magical armor takes your money")
#if DEBUG
Debug.Notification("removed money from player")
#endif
}
}Last updated