### SCP Area Definition Example Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines a map area with events, name, group, properties (P), and rectangular boundaries. The RECT format is x1,y1,x2,y2,mapID, specifying the corners and map. Multiple RECTs can define complex shapes. Flags like REGION_FLAG_NOBUILDING control area behavior. ```scp VERSION=X1 [COMMENT map0_areas.scp] // AREADEF and ROOMDEF define map regions using RECT= properties // RECT format: x1,y1,x2,y2,mapID (upper-left to lower-right corners) // Areas NOT covered by rectangles are unusable // Rectangle order matters when they overlap // WARNING: NEVER edit map files on a running server! //////////////////////////////////////// // Facet //////////////////////////////////////// [AREADEF a_world] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Felucca GROUP=ALLMAP P=1323,1624,55,0 RECT=0,0,7168,4096,0 // Entire map coverage //////////////////////////////////////// // Areas //////////////////////////////////////// [AREADEF a_cave_1] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=cave GROUP=Mines & Caves FLAGS=REGION_FLAG_NOBUILDING P=2367,942,0,0 RECT=2373,900,2395,928,0 RECT=2395,903,2409,919,0 RECT=2373,928,2383,937,0 RECT=2359,927,2373,945,0 [AREADEF a_dungeon_1] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Dungeon GROUP=Other Dungeons P=6091,1313,15,0 RECT=6057,1285,6137,1327,0 [AREADEF a_dungeon_covetous] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Covetous GROUP=Dungeons FLAGS=REGION_FLAG_UNDERGROUND|REGION_FLAG_GUARDED P=5377,1284,0,0 RECT=5377,1284,5624,1507,0 [AREADEF a_town_britain] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Britain GROUP=Towns FLAGS=REGION_FLAG_GUARDED|REGION_FLAG_ANNOUNCE P=1500,1650,25,0 RECT=1400,1500,1650,1800,0 ``` -------------------------------- ### SCP Region Property Flag Definitions Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines hexadecimal flags that determine various properties and restrictions within game regions. These flags control aspects like magic immunity, travel restrictions, building permissions, and PvP rules. For example, 'region_antimagic_all' bans all magic, while 'region_flag_safe' prohibits any harm. ```scp [DEFNAME region_flags] // Region property flags (hexadecimal) region_antimagic_all 000001 // All magic banned region_antimagic_recall_in 000002 // No recall/teleport in region_antimagic_recall_out 000004 // No recall out region_antimagic_gate 000008 // No gate travel region_antimagic_teleport 000010 // No teleport in region_antimagic_damage 000020 // No harmful magic region_flag_ship 000040 // Ship region region_flag_nobuilding 000080 // Building disabled region_flag_announce 000200 // Announce entry region_flag_insta_ logout 000400 // Instant logout allowed region_flag_underground 000800 // Indoor/dungeon (no weather) region_flag_nodecay 001000 // Items don't decay region_flag_safe 002000 // No harm allowed region_flag_guarded 004000 // Guard protection region_flag_no_pvp 008000 // PvP disabled region_flag_arena 010000 // PvP arena (no murder counts) region_flag_nomining 020000 // Mining disabled ``` -------------------------------- ### SphereServer Resource Loading Configuration (spheretables.scp) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines the loading order for all script resources in SphereServer. This file is critical for managing dependencies and ensuring correct initialization of game elements. It specifies the order for core system files, content definitions, map data, and dynamic content. ```scp //**************************************************************************** // SphereServer by: SphereServer development team and Menasoft. // www.sphereserver.net //**************************************************************************** VERSION=X1 [COMMENT spheretables] // This file is loaded 2nd after SPHERE.INI // Resources are processed top-down // DEFNAMEs come first, TYPEDEF and EVENTS second // ITEMDEF and CHARDEF next, REGION* before AREADEF/ROOMDEF // TEMPLATE last [RESOURCES] // Core system files functions/ core/backward_compatibility_functions.scp core/defs.scp core/defs_component_props.scp core/defs_buffs_debuffs.scp core/defs_faction.scp core/defs_height.scp core/defs_hues.scp core/defs_html.scp core/defs_mounts.scp core/defs_sounds.scp core/defs_types_hardcoded.scp core/msgs.scp core/serv_triggers.scp core/magic_preaos.scp core/dialogs/ // Content files book_content_default.scp name_templates.scp skills/ speech/ types/ items/ multis/ templates/ newbie_templates.scp // Map definitions maps/map0/map0_starts.scp maps/map0/map0_moongates.scp maps/map0/map0_areas.scp maps/map0/map0_teleports.scp // Dynamic content events/ spells/ pcs/ spawns/ stones/ housing/ [OBSCENE] // Filtered word list (empty by default) [FAME] // Fame levels: 0-2000 (Anonymous), 2000-6000 (Known), 6000+ (Famous) 0,2000,6000 Anonymous Known Famous [KARMA] // Karma ranges from -10000 (Wicked) to 6001+ (Goodhearted) -10000,-6000,-2000,2001,6001 Wicked Belligerent Neutral Kindly Goodhearted [PLEVEL 1] // Basic player commands AFK DETAIL WHERE SUICIDE PASSWORD EMAIL [PLEVEL 2] // Counselor commands CAST TELE INFO PAGE GO JAIL [PLEVEL 7] // Administrator commands SRC OBJ NEW DB FILE PLEVEL [EOF] ``` -------------------------------- ### Vendor Configuration and Behavior Source: https://github.com/soulless-1/spherex-scriptpack/blob/master/npcs/README.txt Explains key properties for configuring NPC vendors in SphereX, including VENDCAP for gold capacity, VENDGOLD for current gold, and MARKUP for price adjustments. It also touches upon restock mechanics and preventing restocks. ```ini //Vendor specific settings: VENDCAP = 1000000 // The maximum amount of gold a vendor can hold. VENDGOLD = 500000 // The current amount of gold a vendor has. //MARKUP = 15 // Default markup for selling items to players. Positive values increase price, negative values decrease it. ``` -------------------------------- ### SCP Default Item and Character Definitions Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines fallback items, characters, seeds, messages, and guard call keywords. This section ensures that the game has default behaviors when specific creations fail. It also specifies the keywords used to summon guards. ```scp VERSION=X1 [DEFNAME HARDCODED] // Default fallback items and characters defaultitem i_gold // If item creation fails, create gold defaultchar c_man // If char creation fails, create man defaultseed i_gold // Default seed appearance defaultmsg i_gold // Bulletin board post item guards { c_guard 1 c_guard_f 1 } deffood { i_fruit_grapes 1 i_ham 1 i_cheese_cut 1 } // Guard call keywords guardcall GUARD,GUARDS ``` -------------------------------- ### NPC @Create Trigger for Stats and Properties Source: https://github.com/soulless-1/spherex-scriptpack/blob/master/npcs/README.txt Demonstrates the use of the @Create trigger to define NPC attributes that can have random values, such as stats (STR, DEX, INT), resistances, damages, skills, and appearance. It also shows how to set fixed values like fame and karma. ```ini ON=@Create //Even with fixed size, brain, color, fame/karma skills and stats must be added in @Create //Brain first NPC= //Fame/karma FAME=10000 KARMA=-10000 //Color, if required COLOR= //Stats STR={100 150} DEX={120 130} INT={15 20} MAXHITS={120 160} //From here, excepting skills, can be placed here for random values or in the [CHARDEF ] block for fixed values. //Resistances //Resphysical is also required, armor can be added for backwards but having armor doesn't mean that resphysical isn't required and viceversa. RESPHYSICAL={55 65} RESFIRE={30 35} RESCOLD={40 45} RESPOISON=0 // Any property with a value of 0 should not be added, just remove the whole line //Damages (if not fixed, fixed values are placed above) //DAMPHYSICAL can be added but if it's not present it will be defaulted to RESPHYSICAL = 100 - (RESFIRE+RESCOLD+RESPOISON+RESENERGY) DAMCOLD={30 35} //Skills MAGERY={350 500} MEDITATION={700} //RANGES should NEVER be added for a single value, this should be MEDITATION=700 //Other not-fixed properties HitLeechLife={35 40} ITEM=xx //Wearables (clothes, weapons, light sources, hairs, horns...) //Only wearables, to prevent loot items from being saved, loaded from/to save files, checked in rescount, forcont, etc over and over and being snopped/stolen? in undefined situations ``` -------------------------------- ### Implement GM Utility Commands for Teleportation and Messaging Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Provides custom SCP functions for Game Masters, including a teleport command ('t') for targeted or direct movement and a staff message command ('sm') to broadcast messages to other GMs. These functions enhance administrative control and communication within the game. ```scp VERSION=X1 [FUNCTION t] // Teleport command - better than .tele TARGETFG t_sub [FUNCTION t_sub] // Sub-function handles actual teleportation IF () GO ELSEIF () GO ELSE SYSMESSAGE Target non valido ENDIF TARGETFG t_sub [FUNCTION sm] // Staff message - broadcast to all GMs (PLEVEL 2+) IF (>) SYSMESSAGE Syntax: .sm [text] RETURN 1 ENDIF LOCAL.NAME= FOR () IF (-1>.ACCOUNT.PLEVEL>>1) REF1=-1>.UID> REF1.SYSMESSAGE @ : ENDIF ENDFOR [EOF] ``` -------------------------------- ### NPC Loot and Restock Triggers Source: https://github.com/soulless-1/spherex-scriptpack/blob/master/npcs/README.txt Illustrates the @CreateLoot trigger for defining items dropped by an NPC upon death and the @NPCRestock trigger for managing vendor inventory and buy/sell behavior. @NPCRestock is specifically for vendor templates. ```ini ON=@CreateLoot // loot behaviour, created after the char dies ITEM=xxx ON=@NPCRestock//Use this trigger for BUY/SELL templates only on vendors ITEM=xx ``` -------------------------------- ### Define Magery Spells with Casting Requirements and Effects Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines various Magery Spells, including their DEFNAME, NAME, SOUND, RUNES, CAST_TIME, RESOURCES, RUNE_ITEM, SCROLL_ITEM, FLAGS, EFFECT_ID, EFFECT, LAYER, DURATION, MANAUSE, SKILLREQ, and INTERRUPT. These spells have unique attributes determining their casting mechanics and in-game effects. ```scp VERSION=X1 [COMMENT sphere_spells] // Potions are spells with effects at the potion layer // Spells and potion effects can be added to equipped items // "Good" spells have spellflag_playeronly to prevent NPC casting // Only SPELLFLAG_HARM spells can be reflected by Magic Reflection // MAGICF_OSIFORMULAS in sphere.ini overrides EFFECT/DURATION /////////////////// // Magery Spells // /////////////////// [SPELL 1] DEFNAME=s_clumsy NAME=Clumsy SOUND=snd_spell_clumsy RUNES=UJ // Uus Jux CAST_TIME=0.5 RESOURCES=i_reag_blood_moss,i_reag_nightshade RUNE_ITEM=i_rune_clumsy SCROLL_ITEM=i_scroll_clumsy FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze EFFECT_ID=i_fx_curse EFFECT=3,15 // Reduces DEX by 3-15 LAYER=layer_spell_stats DURATION=2*60.0,3*60.0 // 2-3 minutes MANAUSE=4 SKILLREQ=MAGERY 10.0 INTERRUPT=100.0,100.0 [SPELL 2] DEFNAME=s_create_food NAME=Create Food SOUND=snd_spell_create_food RUNES=IMY // In Mani Ylem CAST_TIME=0.5 RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_mandrake_root RUNE_ITEM=i_rune_create_food SCROLL_ITEM=i_scroll_create_food FLAGS=spellflag_playeronly // NPCs won't cast EFFECT_ID=0 EFFECT=0 DURATION=0.0 MANAUSE=4 SKILLREQ=MAGERY 10.0 INTERRUPT=100.0,100.0 [SPELL 3] DEFNAME=s_feeblemind NAME=Feeblemind SOUND=snd_spell_feeblemind RUNES=RW // Rel Wis CAST_TIME=0.5 RESOURCES=i_reag_ginseng,i_reag_nightshade RUNE_ITEM=i_rune_feeblemind SCROLL_ITEM=i_scroll_feeblemind FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze|SPELLFLAG_CURSE EFFECT_ID=i_fx_curse EFFECT=5,10 // Reduces INT by 5-10 LAYER=layer_spell_stats DURATION=2*60.0,3*60.0 MANAUSE=4 SKILLREQ=MAGERY 10.0 INTERRUPT=100.0,100.0 [SPELL 4] DEFNAME=s_heal NAME=Heal SOUND=snd_spell_heal RUNES=IM // In Mani CAST_TIME=0.5 RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_spider_silk RUNE_ITEM=i_rune_heal SCROLL_ITEM=i_scroll_heal FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_heal ``` -------------------------------- ### Item Type: Kitchen Knife Cake Slicing (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines a kitchen knife item that can be used to cut tiered cakes. On double-click or targeting an item, it checks if the target is a 'i_cake_tiered' and in the player's backpack. If so, it consumes the cake and creates multiple slices. ```scp [TYPEDEF t_kitchenknife] // Kitchen knife for cutting cakes ON=@DClick TARGET RETURN 1 ON=@TargOn_Item IF (!STRCMPI(i_cake_tiered,)) IF (!=) SRC.SYSMESSAGELOC color_text,1042001 // "That must be in your backpack" RETURN 1 ENDIF FOR 6 SERV.NEWITEM i_cake_tiered_slice,1, NEW.COLOR= ENDFOR ARGO.REMOVE ENDIF RETURN 1 ``` -------------------------------- ### Define Ogre Monster Character (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines an 'Ogre' monster with specific combat stats, resources, AI behavior, and loot drops. This uses the CHARDEF block and includes ON=@Create and ON=@CreateLoot events for dynamic initialization and item generation. ```scp [CHARDEF 01] DEFNAME=c_ogre NAME=#NAMES_OGRE the Ogre SOUND=427 ICON=i_pet_ogre CAN=mt_walk|mt_usehands // Combat stats DAM=9,11 ARMOR=32 HEIGHT=28 // Resources and behavior RESOURCES=2 i_ribs_raw FOODTYPE=15 t_meat_raw DESIRES=c_ogre, t_arock AVERSIONS=t_TRAP,r_civilization CATEGORY=Monsters SUBSECTION=Giants DESCRIPTION=Ogre ON=@Create NPC=brain_monster FAME=3000 KARMA=-3000 // Attributes use random ranges STR={166, 195} DEX={46, 65} INT={46, 70} MAXHITS={100, 117} // Resistances (physical, fire, cold, poison, energy) RESPHYSICAL={30, 35} RESFIRE={15, 25} RESCOLD={15, 25} RESPOISON={15, 25} RESENERGY=25 // Skills MAGICRESISTANCE={55.1, 70.0} TACTICS={60.1, 70.0} WRESTLING={70.1, 80.0} ON=@CreateLoot // Gold drops: 125-172 pieces ITEM=i_gold,{125 172} ITEM=i_club // 1% chance for treasure map level 1 ITEM=i_treasure_map1,R99 ``` -------------------------------- ### Item Type: Shrine Resurrection (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines a resurrection shrine item type. It adds a context menu option for resurrection when the source character is dead. When selected, it calls the `RESURRECT` function on the source character. Dependencies include player flags and context menu system. ```scp [TYPEDEF t_shrine] // Resurrection shrine ON=@ContextMenuRequest SRC.AddContextEntry 101,3006195, & statf_dead)? 0:1> // Resurrect ON=@ContextMenuSelect IF (==101) && ( & statf_dead) SRC.RESURRECT ENDIF ``` -------------------------------- ### CHARDEF Structure and Properties Source: https://github.com/soulless-1/spherex-scriptpack/blob/master/npcs/README.txt Defines the basic structure of a character definition (CHARDEF) in SphereX. It includes essential properties like DEFNAME, NAME, ICON, SOUND, and damage/resistance values. Fixed values should be placed directly in the CHARDEF block, while random values belong in triggers. ```ini [CHARDEF xxx] //base defs DEFNAME=c_char_defname DEFNAME2=c_old_xx //DEFNAME2 is allowed, but it's recommended to create a new entry in it's respective core/backwards_compatibility_version.scp with c_old_xx=c_char_defname NAME=Some Name ICON=i_xx // chars without icon set will default to i_pet_whisp SOUND=snd_xx //Preferably all chardefs should have sounds //Fixed values' properties and tags. Fixed only, ranges are not allowed here. DAM=15,20 DAMFIRE=20 FACTION=faction_demon // defnames in lowercase BLOODCOLOR=1 TAG.BARDING.DIFF=95.0 //Aversions, resources, etc DESIRES=r_dungeon_doom,t_coin,t_gold,t_gem,t_wand,t_potion,t_scroll,t_reagent AVERSIONS=t_trap,r_civilization RESOURCES=1 i_reag_blackmoor //TEVENTS TEVENTS=e_carnivores //TSPEECH TSPEECH=spk_human //ResDisp* RESDISPDNID=c_elem_air RESLEVEL=2 RESDISPDNHUE=55 //Expansion settings ERALIMITLOOT=1 ERALIMITGEAR=1 ERALIMITPROPS=1 //GM Tools categories CATEGORY=Monsters SUBSECTION=Elementals DESCRIPTION=Elemental, Example ``` -------------------------------- ### Define Ettin Monster Character (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines an 'Ettin' monster, detailing its base stats, combat capabilities, and environmental preferences. Similar to other CHARDEF entries, it includes AI and combat parameters. ```scp [CHARDEF 02] DEFNAME=c_ettin NAME=Ettin SOUND=367 ICON=i_pet_ettin CAN=mt_walk|mt_usehands DAM=7,17 ARMOR=38 HEIGHT=32 RESOURCES=4 i_ribs_raw FOODTYPE=15 t_meat_raw DESIRES=c_ettin,c_ettin_w_axe,t_arock AVERSIONS=r_civilization CATEGORY=Monsters SUBSECTION=Giants DESCRIPTION=Ettin ON=@Create NPC=brain_monster FAME=3000 KARMA=-3000 STR={136, 165} DEX={56, 75} INT={31, 55} MAXHITS={82, 99} RESPHYSICAL={35, 40} RESFIRE={15, 25} ``` -------------------------------- ### NPC Event: Undead Environment Change Handler (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Handles environmental changes for undead NPCs, altering their strength based on light conditions. It checks for darkness or indoor environments to restore strength, and weakens them in light, potentially removing them if they are conjured. Dependencies include game environment flags and NPC stats. ```scp VERSION=X1 [DEFNAME extendedAI] ExtendedAI=1 [FUNCTION f_addExtendedAIEvent] // Conditionally add extended AI events if (==1) events + endif [EVENTS e_Undead] ON=@EnvironChange Return 0 // Undead weaken in light, strengthen in darkness if () || (& (statf_nightsight|statf_indoors)) // Restore strength in darkness if (!) return 0 endif anim 011 bark 4 str= hits= tag.lightstr= karma= tag.lightkarma= fame= tag.lightfame= flags ^= statf_conjured return 0 endif // Weaken in light anim 014 bark 4 if () return 0 endif if ( &statf_conjured ) remove return 1 endif flags |= statf_conjured tag.lightstr= str=1 hits=1 tag.lightkarma= karma=-2 tag.lightfame= fame=10 return 0 ``` -------------------------------- ### Item Type: Trapped Chest Disarming (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines a trapped chest item. It requires specific items like 'i_gears' or 'i_tinker_tools' to disarm. Failure can result in damage and the creation of an 'i_fire_column' trap. Success depends on player items and random chance, with timers and state changes upon successful disarming. ```scp [TYPEDEF t_chest_trap] // Trapped container requiring tinkering to disarm ON=@DClick IF () SRC.CONSUME 1 i_gears ELSE SRC.MESSAGE You fail to disarm the trap. SRC.DAMAGE= - > SERV.NEWITEM=i_fire_column NEW.ATTR attr_can_decay|attr_move_never NEW.P= NEW.TIMER 2 SRC.SOUND=snd_spell_explosion RETURN 0 ENDIF IF ( >= ) SRC.MESSAGE You attempt to disarm the trap. IF () IF (RAND(2)) SRC.MESSAGE You disarm the trap successfully. TIMER= MOREZ=1 TYPE=t_container RETURN 0 ELSE SRC.MESSAGE You fail to disarm the trap. SRC.DAMAGE= - > SERV.NEWITEM=i_FIRE_COLUMN NEW.ATTR attr_can_decay|attr_move_never NEW.TIMER 2 NEW.P= SRC.UPDATE SRC.SOUND=snd_SPELL_EXPLOSION RETURN 0 ENDIF ELSE IF (RAND(10) == 5) SRC.MESSAGE You disarm the trap successfully. TIMER= MOREZ=1 TYPE=T_CONTAINER RETURN 0 ELSE SRC.MESSAGE You fail to disarm the trap. SRC.DAMAGE= - > SERV.NEWITEM i_fire_column NEW.ATTR attr_can_decay|attr_move_never NEW.TIMER 2 NEW.P= SRC.UPDATE SRC.SOUND snd_spell_explosion RETURN 0 ENDIF ENDIF ENDIF ON=@Timer MOREZ=0 RETURN 1 ``` -------------------------------- ### Define Axe of the Heavens Artifact Item (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines the 'Axe of the Heavens' artifact, enhancing combat capabilities with bonuses to lightning damage, hit chance, defense, and physical damage. It includes rarity and event specifications. ```scp [ITEMDEF i_axe_heavens] ID=i_axe_double NAME=Axe of the Heavens HitLightning=50 IncreaseHitChance=15 IncreaseDefChance=15 IncreaseDam=50 DamPhysical=100 Rarity=11 TEVENTS=ei_equipitem TEVENTS=ei_artifact CATEGORY=Artifacts SUBSECTION=Doom (Gauntlet) DESCRIPTION=Axe of the Heavens ON=@Create COLOR=04d5 ATTR=attr_magic|attr_identified HITPOINTS=255 ``` -------------------------------- ### Define Armor of Fortune Artifact Item (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines the 'Armor of Fortune' artifact, granting bonuses to Luck, defense chance, and reagent costs, along with various resistances. It also specifies rarity and event triggers. ```scp [ITEMDEF i_armor_fortune] ID=i_leather_tunic NAME=Armor of Fortune LUCK=200 IncreaseDefChance=15 LowerReagentCost=40 RESPHYSICAL=2 RESFIRE=4 RESCOLD=3 RESPOISON=3 RESENERGY=4 MageArmor=1 Rarity=11 TEVENTS=ei_equipitem TEVENTS=ei_artifact CATEGORY=Artifacts SUBSECTION=Doom (Gauntlet) DESCRIPTION=Armor of Fortune ON=@Create COLOR=0501 ATTR=attr_magic|attr_identified HITPOINTS=255 ``` -------------------------------- ### Define Blade of Insanity Artifact Item (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines the 'Blade of Insanity' artifact, focusing on life leech, stamina regeneration, and increased attack speed and damage. It details its rarity and event triggers for equipping. ```scp [ITEMDEF i_blade_insanity] ID=i_katana NAME=Blade of Insanity HitLeechStam=100 RegenStam=2 IncreaseSwingSpeed=30 IncreaseDam=50 DamPhysical=100 Rarity=11 ``` -------------------------------- ### Define Arcane Shield Artifact Item (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines the 'Arcane Shield' artifact item with unique properties like SpellChanneling, NightSight, and FasterCasting. It includes visual attributes and event triggers for equipping and artifact identification. ```scp [ITEMDEF i_arcane_shield] ID=i_shield_kite_wood NAME=Arcane Shield // Enhanced properties SpellChanneling=1 NightSight=1 IncreaseDefChance=15 FasterCasting=1 RESENERGY=1 Rarity=11 TEVENTS=ei_equipitem TEVENTS=ei_artifact CATEGORY=Artifacts SUBSECTION=Doom (Gauntlet) DESCRIPTION=Arcane Shield ON=@Create COLOR=0556 ATTR=attr_magic|attr_identified HITPOINTS=255 ``` -------------------------------- ### SCP Character Memory Flag Definitions Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines hexadecimal flags used to store memory states for character AI behavior. These flags track events like witnessing crimes, being a pet, engaging in combat, or being attacked. This allows NPCs to react dynamically based on their past experiences and current situation. ```scp [DEFNAME mem_flags] // Character memory flags for AI behavior memory_sawcrime 00001 // Witnessed crime memory_ipet 00002 // Is pet (master link) memory_fight 00004 // Active combat memory_iaggressor 00008 // Was aggressor memory_harmedby 00010 // Was attacked ``` -------------------------------- ### NPC Event: Lich Death - Skeleton Cleanup (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Removes summoned skeletons when a lich NPC dies. It iterates through tags to find and set the hits of any 'c_skeleton' type NPCs to 0. This ensures that undead minions are properly dismissed upon the lich's demise. ```scp [EVENTS e_lich_death] // Remove summoned skeletons when lich dies ON=@DEATH FOR 0 - 1> LOCAL.UID = .VALUE> IF (>) IF (.DEFNAME> == c_skeleton) UID..HITS = 0 ENDIF ENDIF ENDFOR RETURN 0 ``` -------------------------------- ### NPC Event: Lich Skeleton Summoning Control (SCP) Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Manages skeleton summoning for a lich NPC. It triggers on spell effects like 's_dispel' or 's_mass_dispel' to remove summoned skeletons. Additionally, on the lich's death, it checks follower limits and may trigger a delayed skeleton summoning function if needed. ```scp [EVENTS e_skeleton_summoned_by_lich] ON=@SPELLEFFECT // Dispel spells remove summoned skeletons IF ((.DEFNAME> == s_dispel) || (.DEFNAME> == s_mass_dispel)) I.HITS = 0 ENDIF RETURN 0 ON=@DEATH REF1 = IF (!) RETURN 0 ENDIF // Check if lich needs to summon more skeletons LOCAL.LIMIT = + IF ( > ) REF1.TIMERF ,f_lich_summon_skeletons ``` -------------------------------- ### SCP NPC AI Brain Type Definitions Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Categorizes different types of NPC artificial intelligence brains. Each brain type is assigned a numerical identifier, controlling the behavior and capabilities of Non-Player Characters in the game. This allows for diverse NPC roles, from simple animals to complex monsters and dragons. ```scp [DEFNAME brains] // NPC AI brain types brain_none 0 brain_animal 1 brain_human 2 brain_healer 3 brain_guard 4 brain_banker 5 brain_vendor 6 brain_animal_trainer 7 brain_monster 8 brain_berserk 9 brain_dragon 10 ``` -------------------------------- ### SCP Spell Property Flag Definitions Source: https://context7.com/soulless-1/spherex-scriptpack/llms.txt Defines hexadecimal flags that specify the properties and behaviors of spells. These flags control casting requirements, targeting mechanisms, visual effects, spell types (harmful, beneficial, summon), and resistance. For instance, 'spellflag_harm' indicates a damaging spell, while 'spellflag_targ_item' requires an item target. ```scp [DEFNAME spell_flags] // Spell property flags spellflag_dir_anim 00000001 // Directional cast animation spellflag_targ_item 00000002 // Target item required spellflag_targ_char 00000004 // Target character required spellflag_targ_obj 00000006 // Target item or char spellflag_targ_xyz 00000008 // Target location spellflag_harm 00000010 // Harmful spell spellflag_fx_bolt 00000020 // Bolt visual effect spellflag_fx_targ 00000040 // Target visual effect spellflag_field 00000080 // Creates field (fire/poison/wall) spellflag_summon 00000100 // Summons creature/item spellflag_good 00000200 // Beneficial spell spellflag_resist 00000400 // Can be resisted spellflag_targ_noself 00000800 // Cannot target self spellflag_disabled 00008000 // Spell disabled spellflag_scripted 00010000 // Custom scripted spell spellflag_playeronly 00020000 // NPCs won't cast spellflag_nounparalyze 00040000 // Doesn't break paralyze spellflag_no_castanim 00080000 // No cast animation spellflag_targ_no_player 00100000 // Cannot target players spellflag_targ_no_npc 00200000 // Cannot target NPCs spellflag_damage 08000000 // Deals damage spellflag_heal 040000000 // Heals hitpoints ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.