### Dialog System SCP Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Defines interactive dialog boxes (gumps) for player interfaces, including layout, text, and button actions. This example creates a welcome message and handles first-time login interactions. ```scp [DIALOG d_entrada] 0,0 nomove noclose page 0 resizepic 92 61 9200 455 442 gumppictiled 101 69 436 425 2624 checkertrans 101 69 436 425 resizepic 124 85 9200 392 388 text 200 106 100 0 htmlgump 160 158 328 276 1 1 1 button 307 447 4023 4025 1 0 0 [DIALOG d_entrada text] Seja Bem Vindo ao "Dragon Shard - The Second Age" Muito obrigado por escolher o Dragon Shard... [DIALOG d_entrada button] ON=0 src.message @3,1 Seja Bem Vindo ao IF <1 src.tag.firstlogin=1 DIALOG d_entrada endif ``` -------------------------------- ### SCP: SQLite Database Integration for Item Management Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Connects to an SQLite database to manage item definitions. It dynamically creates an 'items' table if it doesn't exist and populates it by iterating through server item definitions. Requires an active SQLite connection and server environment. ```scp [DEFNAME adddef] DB_File = scripts/adddialog.db Item_DB = sphere_items Char_DB = sphere_chars [function f_add_rebuild] f_add_clear f_add_setup [function f_add_setup] if !() ldb.connect "" endif if () ldb.execute CREATE TABLE '' ( 'id' TEXT PRIMARY KEY NOT NULL, 'defname' TEXT, 'name' TEXT, 'category' TEXT, 'subsection' TEXT, 'description' TEXT ) local.hour= LDB.EXECUTE BEGIN for 0 -1> local.item=> if () local.name=.name> local.defname=.defname> local.category=.category>>?Uncategorized:.category>> ldb.QUERY INSERT INTO '' ('id','defname','name','category','subsection','description') VALUES ("","","", "","","") endif endfor LDB.EXECUTE COMMIT endif ``` -------------------------------- ### SCP: Mount System Definitions Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Defines associations between character display IDs (in hexadecimal) and their corresponding mount memory IDs for various creature types. This script is used to configure rideable mounts within the game. ```scp [DEFNAME mount_items] // Syntax: mount_0x // Pre-T2A mounts mount_0xc8 i_mt_horse_tan mount_0xcc i_mt_horse_brown_dk mount_0xe2 i_mt_horse_gray mount_0xe4 i_mt_horse_brown_lt // T2A mounts mount_0xd2 i_mt_ostard_desert mount_0xda i_mt_ostard_frenzied mount_0xdb i_mt_ostard_forest mount_0xdc i_mt_llama // LBR special mounts mount_0xb1 i_mt_warhorse_dread mount_0xbc i_mt_savage_ridgeback mount_0xbe i_mt_steed_fire mount_0x74 i_mt_nightmare mount_0x7a i_mt_unicorn mount_0x84 i_mt_kirin // Advanced mounts mount_0x317 i_mt_giant_beetle mount_0x31a i_mt_swamp_dragon mount_0x31f i_mt_armored_swamp_dragon mount_0xf3 i_mt_hiryu mount_0x114 i_mt_reptalon ``` -------------------------------- ### SCP: Hardcoded Defaults Configuration Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Sets system-wide default definitions for various game elements including default items, characters, seeds, messages, guards, and food types. Also configures guard call keywords and color mappings for text. ```scp [DEFNAME HARDCODED] defaultitem i_gold // Default item on creation failure defaultchar c_man // Default character on creation failure defaultseed i_gold // 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 i_muffin 1 } // Guard call keywords guardcall GUARD,GUARDS [DEFNAME hues] color_text -1 color_none 0 color_red1 32 color_red2 33 color_cyan 88 color_gray_dk 802 color_gray_lt 904 color_dye_high 1000 color_ice 1152 color_snow 1153 color_rock 1154 ``` -------------------------------- ### AOS House System Configuration SCP Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Configures the housing system, including ownership rules, decay timers, storage limits, and vendor integration. It uses specific SCP directives to define system parameters and a function to identify vendor NPCs. ```scp [DEFNAME HOUSE_SYSTEM] HOUSE_USE_DEEDS 0 // 0=Gold on demolish, 1=Deed HOUSE_DECAY_TIMER 30 // Days until decay (0=off) MAX_ACCOUNT_HOUSES 2 // Houses per account ACCOUNT_OWNERSHIP 1 // Account-wide owner access HOUSE_USE_TRASHBARREL 1 // Enable trash barrel // Placement Settings PLACEMENT_MIN_DIST_AREA 1 // Minimum area distance PLACEMENT_MIN_DIST_FRONT 5 // Minimum front distance // Storage Settings USE_GLOBAL_STORAGE 0 // 0=Calculate by area, 1=Global GLOBAL_SECURE_STORAGE 600 // Max secured items GLOBAL_LOCKDOWNS 100 // Max locked items // Access Settings MAX_HOUSE_COOWNERS 15 // Max co-owners MAX_HOUSE_FRIENDS 50 // Max friends MAX_HOUSE_BANS 50 // Max banned players HOUSE_USE_BAN_ENGINE 1 // Enable ban system // Features ALLOW_BANKING 1 // Bank from house sign HOUSE_AOS_CUSTOMIZATION 1 // Enable customization HOUSE_COMPONENT_PRICE 500 // Cost per component (gp) // Vendors HOUSE_USE_VENDORS 1 // Enable vendors HOUSE_GLOBAL_MAXVENDORS 5 // Max vendors per house [FUNCTION IsHouseVendor] IF ((==brain_human) || (==brain_vendor)) return 1 ELSE return 0 ENDIF ``` -------------------------------- ### NPC Event System SCP Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Handles NPC events based on triggers like clicks, creation, and combat interactions. It manages NPC messages, item creation, positioning, damage calculation, and spell effects using SCP scripting. ```scp [EVENTS e_npcs] ON=@CLICK IF (=c_h_traveller) MESSAGE @00785 O Viajante Return 1 ELSEIF (=3) || (=4) MESSAGE @035 [] MESSAGE @035 Return 1 ENDIF ON=@Create if ( == 1) serv.newitem i_restock_delay,1,,1 return 0 endif tag0.lastattackdistance 10 tag0.lastpotion // Remove items not allowed if () FORCONTTYPE t_scroll if ( > 64) remove endif ENDFOR endif // Calculate silver coins if ( == 0) local.sc = /100)> if ( > 0) serv.newitem i_coin_silver new.amount {/2> >} new.cont endif endif // Set damage based on strength if ( >= 1000) dam 30,60 else db.query "SELECT ROUND((/10) * 0.30) as min, ROUND((/10) * 0.50) as max" local.min = > local.max = > dam , endif ON=@SpellSuccess mana -= >.MANAUSE>> tag0.casting 0 ``` -------------------------------- ### Player Event Handlers SCP Source: https://context7.com/joaoescribano/dragonshardscripts/llms.txt Manages player-specific events such as spell casting, combat initiation, logging out, and party kills. It includes anti-FPS measures, party forgiveness systems, and criminal flag management. ```scp [EVENTS e_player] on=@SpellSuccess // Auto-attack after spell cast IF (=) SRC.TIMERF 1,SRC.ATTACK ENDIF ON=@HitTry // Anti-FPS patch - Check line of sight IF (>) // Valid attack ELSE ACTION=-1 Return 1 ENDIF ON=@Logout timerf clear if findid.i_timer_movement_analyse.remove endif db_logout ON=@KILL // Party kill forgiveness system if ( == 1) && ( == 1) if (>) if ( > 0) kills = -1> endif argo.timerf 1,f_party_criminal_remove IF () argo.memoryfindtype.memory_fight.remove argo.memoryfindtype.memory_sawcrime.remove argo.memoryfindtype.memory_harmedby.remove ENDIF if (&statf_criminal) argo.flags = - statf_criminal endif endif endif ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.