Editing Krafties Spells API

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
= Krafties - Spell Receiver API v1.0 =
+
The Spell Receiver API allows player owned krafties to cast specific spells on any objects you create! The API allows you to then handle and respond to the spells when they are cast with ANY LSL code you put together via linked messages. At this point in time, when a spell is cast the API exposes the name of the spell that was cast, and the type of spell cast. These are all handled in a link_message event.
 
 
~~ NOTE: You MUST obtain an API key from Krafties before being able to use any of the Krafties APIs! This key is unique to each individual creator and should not be shared.
 
  
~~ Please see http://krafties.com/wiki for more details on the API and API keys.
 
  
  
The Spell Receiver API allows player owned krafties to cast specific spells on any objects you create! The API allows you to then handle and respond to the spells when they are cast with ANY LSL code you put together via linked messages. At this point in time, when a spell is cast the API exposes the name of the spell that was cast, and the type of spell cast. These are all handled in a link_message event.
 
  
 +
= SETUP =
  
  
---------------------------------------------------------------------------------------
 
SETUP:
 
---------------------------------------------------------------------------------------
 
 
Step 1) Obtain your unique API Key. If you already have an API Key from a separate Krafties API, that will work for this one as well!
 
Step 1) Obtain your unique API Key. If you already have an API Key from a separate Krafties API, that will work for this one as well!
  
Line 20: Line 14:
  
 
Step 3) Open and configure the "Krafties_API Config [Spell Receiver]" script. All configuration variables are at the top of the script.
 
Step 3) Open and configure the "Krafties_API Config [Spell Receiver]" script. All configuration variables are at the top of the script.
    a) API_KEY:
+
    a) API_KEY:
 
         - This is the key you get from Krafties that identifies you as a unique creator. Once you have obtained your key, copy/paste it into the script where it says UNIQUE_API_KEY_HERE.
 
         - This is the key you get from Krafties that identifies you as a unique creator. Once you have obtained your key, copy/paste it into the script where it says UNIQUE_API_KEY_HERE.
    b) SPELL_DISPLAY_TYPES
+
    b) SPELL_DISPLAY_TYPES
 
         - This list determines what types of spells will show up in the menus of a player attempting to cast a spell on this object, if the player's creature has unlocked said spells. Alongside the predefined spell group identifiers, you can also include the names of specific spells or specific element types. Spell group identifiers follow:
 
         - This list determines what types of spells will show up in the menus of a player attempting to cast a spell on this object, if the player's creature has unlocked said spells. Alongside the predefined spell group identifiers, you can also include the names of specific spells or specific element types. Spell group identifiers follow:
 
             * SET_SPELL
 
             * SET_SPELL
Line 45: Line 39:
 
            
 
            
  
*** IF ALL WENT WELL, YOU NOW HAVE THE BASIC SPELL CASTING FEATURES SET UP. CLICKING THE OBJECT WILL GIVE YOU A MENU ALLOWING YOU TO CAST SPELLS ON IT IF YOU HAVE A SUITABLE ACTIVE KRAFTIE ATTACHED.
+
'''IF ALL WENT WELL, YOU NOW HAVE THE BASIC SPELL CASTING FEATURES SET UP. CLICKING THE OBJECT WILL GIVE YOU A MENU ALLOWING YOU TO CAST SPELLS ON IT IF YOU HAVE A SUITABLE ACTIVE KRAFTIE ATTACHED'''
 
              
 
              
*** ADVANCED STEPS FOLLOW
+
'''ADVANCED STEPS FOLLOW'''
  
 
          
 
          
Line 73: Line 67:
 
             * IF FLAMETHROWER IS CAST:
 
             * IF FLAMETHROWER IS CAST:
 
                 - Link message sent: llMessageLinked(LINK_SET, 59377, "Flamethrower", "Fire");
 
                 - Link message sent: llMessageLinked(LINK_SET, 59377, "Flamethrower", "Fire");
---------------------------------------------------------------------------------------
 
  
---------------------------------------------------------------------------------------
+
 
 +
 
 +
 
 +
 
 +
 
 +
{{Technical}}

Please note that all contributions to Krafties may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)