This is the main page for the Magic Spell Scripting Language. This page explains a few basic concepts of how magic spells are created using scripts and then has an index of commands usable in the scripting language.
In the game Magic of the Gods (TM), it is possible to create new magic words, magic items and magic places with scripts written in a special language. Scripts can also be used to create other things such as new crafting skills or items. It is important to understand that writing a script is never enough to make something new in the game. There is always at least one other component of any spell, item or skill. This is not a rule we made up, this is the way the magic works and the way the computer software that runs the game works.
For some magic, such as magic words, the only other thing needed besides the script is for the gods to bless the script and illuminate it with the power of the Eternal Flame. If you don't know what this means, then you have much to learn about magic. We are not always going to explain things in clear non-game terms. Instead, we may use in-game terms that you can use to accomplish something in the game, but may not allow you to know exactly how the computer that runs the game works. You can ask the gods to illuminate a script with the power of the Eternal Flame and if the god you are talking to has the power to do that (not all of them do), then he or she will know exactly what you are talking about. It is not necessary for the players to know what that means except in game terms. It breaks immersion in the game to use too much computer jargon so we try to use our own magic jargon instead.
The process of writing a script is essentially this.
(1) Contact the gods or their servants or priests to find out if the gods would be willing to bless a script that does what you want your script to do.
(2) Read the explanations of the various commands until you have some understanding of them.
(3) Create a document using a word processing program of some kind. You can start with a blank page and start adding commands or you can cut and paste a script written by someone else into your document and modify it.
(4) When you think you have a script that will work, you will have to agree to give the game developers a legal right to unlimited use of it so the game doesn't get shut down by lawsuits over intellectual property rights. If you don't give the game developers permission to use your script, your script will not be used in the game. Contact the game developers to find out how to do this. You can contact them by sending a private message to "Charles" on the forum or posting a public message on the forum asking about it or you can send e-mail it to whatever is the current e-mail address for one of the game developers. At the time this is being written (June 8, 2008) the best address is champion67@gmail.com.
(5) If you wish, you can post your script on the forum at www.onlinegamemaker.proboards82.com to see if anyone can spot any errors. Doing this may allow others to copy your script and have their character use it in the game. This may or may not matter to you.
(6) Send your script in text format (with a .txt file extension) to the game developers. You can send it by private message to "Charles" on the forum or you can e-mail it to whatever is the current e-mail address for one of the game developers. At the time this is being written (June 8, 2008) the best address is champion67@gmail.com.
(7) The game developers will probably test the script to see if it works and will probably notify you of the results.
(8) You will very likely have to change the script to correct errors and then resend it.
(9) Contact the gods in-game and tell them you have written a script and what it does. Ask them to illuminate your script with the power of the Eternal Flame. Depending on what kind of script you wrote, it may also require World Magic, Blended Magic or other magic to work. You may need to provide graphics including 3-D graphic models called meshes if your script requires them.
(10) The gods or their servants may edit the script. This may drastically reduce what it can do or impose requirements for mana in order for the spell to be cast.
(11) The gods may then illuminate the script with the power of the Eternal Flame. If this happens, your script will be activated and it can then be used in the game in the manner you specified in the script. If it is a script to create magic words, you can say the magic words to activate the script. If it is a magic item the gods will also need to create the item and give it to you. Then you can use the item to activate the script. If it is a magic place, the gods will need to enchant the place and then you can activate the script by going to that place. If it is a skill rather than magic, your script will most likely be activated by using the appropriate tool in an appropriate context, but that's something you specify in the script.
Scripting Language Tutorial (badly written, but the best we have at the moment)
Here is a list of the commands:
Scripting Command
Reference
(Only some of these command references have been posted. The rest will be completed soon.)
Ability Commands
AbilityKnown
AbilityLevel
Ability Memorised
AddAbility
Delete Ability
SetAbilityLevel
Actor Commands
Actor
Actor Aggressiveness
ActorAIState
ActorBeard
ActorClothes
ActorDestinationX
ActorDestinationZ
ActorDistance
ActorFace
ActorGender
ActorGlobal
ActorGroup
ActorHair
ActorHasEffect
ActorID
ActorIDFromInstance
ActorInTrigger
ActorIsHuman
ActorLeader
ActorLevel
ActorMount
ActorOutdoors
ActorPets
ActorRider
ActorTarget
ActorUnderWater
ActorX
ActorXP
ActorXPMultiplier
ActorY
ActorZ
ActorZone
ActorZoneInstance
AddActorEffect
AnimateActor
Attribute
ChangeActor
ChangeMoney
Class
ContextActor
CountPartyMembers
DeleteActorEffect
FindActor
FireProjectile
FirstActorInZone
GiveItem
GiveKillXP
GiveXP
HasItem
KillActor
MaxAttribute
Money
MoveActor
Name
NextActor
NextActorInZone
OpenTrading
PartyMember
PlaySound
PlaySpeech
Race
Reputation
Resistance
RotateActor
SetActorAIState
SetActorBeard
SetActorClothes
SetActorDestination
SetActorFace
SetActorGender
SetActorGlobal
SetActorGroup
SetActorHair
SetActorLevel
SetActorTarget
SetAttribute
SetLeader
SetMaxAttribute
SetMoney
SetName
SetReputation
SetResistance
SetTag
Spawn
Tag
UpdateXPBar
Warp
Dialog Commands
CloseDialog
CreateProgressBar
DeleteProgressBar
DialogInput
DialogOutput
OpenDialog
Output
UpdateProgressBar
Faction Commands
DefaultFactionRating
ChangeFactionRating
FactionRating
HomeFaction
SetFactionRating
SetHomeFaction
File Commands
CloseFile
DeleteFile
Eof
FilePos
FileSize
OpenFile
ReadByte
ReadFile
ReadFloat
ReadInt
ReadLine
ReadShort
ReadString
SeekFile
WriteByte
WriteFile
WriteFloat
WriteInt
WriteLine
WriteShort
WriteString
Item Commands
ActorAmulet
ActorBackpack
ActorBelt
ActorChest
ActorFeet
ActorHands
ActorHat
ActorLegs
ActorRing
ActorShield
ActorWeapon
ItemAmor
ItemAttribute
ItemDamage
ItemDamageType
ItemHealth
ItemMass
ItemMiscData
ItemName
ItemRange
ItemValue
SetItemHealth
SpawnItem
Math Commands
Abs
ACos
ASin
ATan
ATan2
Cos
Exp
Int
Log
Log10
Pi
Rand
Rnd
Sign
Sin
Sqrt
Tan
Network Commands
CreateUDPStream
CloseUDPStream
SendUDPMsg
RecvUDPMsg
UDPStreamPort
UDPMsgIP
UDPMsgPort
UDPTimeouts
CountHostIPs
HostIP
DottedIP
Other Commands
CallDLL
DoEvents
End
Global
GoTo
MilliSecs
Parameter
Persistent
RealDate
RealTime
Return
RuntimeError
ScriptLog
SetGlobal
SetSuperGlobal
SuperGlobal
ThreadExecute
Player Commands
PlayerAccountEmail
PlayerAccountName
PlayerInGame
PlayerIsBanned
PlayerIsGM
Quest Commands
CompleteQuest
DeleteQuest
NewQuest
QuestComplete
QuestStatus
UpdateQuest
WaitItem
WaitKill
WaitSpeak
String Commands
Asc
Chr
FullTrim
Instr
Left
Len
Lower
Mid
Right
Replace
Split
Trim
Upper
Visual Commands
CreateEmitter
ScreenFlash
World Commands
CreateZoneInstance
Day
Hour
Minute
Month
RemoveZoneInstance
SaveState
SceneryOwner
Season
SetOwner
Year
ZoneInstanceExists
ZoneOutdoors
Operators (in order of precedence)
| Sign |
Name |
Description |
| * |
Multiplication |
Multiplies two variables as real numbers. |
| / |
Division |
Inverse of multiply. |
| % |
Modulus |
Returns the remainder component of an integer division. |
| $+ |
String addition |
Adds together two variables as strings (text). 5 $+ 5 = 55, compared to 5 + 5 = 10. |
| + |
Addition |
Adds together two variables as real numbers. |
| - |
Subtraction |
Inverse of addition. |
| < |
Less than |
Returns 1 if the left operand is less than the right operand. Both operands are real numbers. |
| > |
Greater than |
Inverse of less than. |
| <= |
Less than or equal to |
Returns 1 if the left operand is less than or equal to the right operand. Both operands are real numbers. |
| >= |
Greater than or equal to |
Inverse of less than or equal to. |
| == |
Equality |
Returns 1 if the left operand and right operand are equal. Both operands are real numbers. |
| != |
Inequality |
Returns 1 if the left operand and right operand are not equal. Both operands are real numbers. |
| $= |
String equality |
Same as equality, except both operands are strings. Hello $= There is 0, compared to Hello == There is 1 (since both operands as real numbers are zero). |
| & |
Bitwise And |
Returns the bitwise AND of the two operands. |
| | |
Bitwise Or |
Returns the bitwise OR of the two operands. |
| ! |
Logical Not |
Returns 1 if the operand is false, or 0 if the operand is true. |
Comments (0)
You don't have permission to comment on this page.