From 18efdc5573069e7f271384d3f3a904515181a2f6 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:11:58 -0500 Subject: [PATCH 01/19] puzzle chest This was osi Puzzle chest for kahldun. --- data/dfndata/items/containers/metal.dfn | 9 + data/js/item/puzzlechest.js | 444 ++++++++++++++++++++++++ data/js/jse_fileassociations.scp | 1 + 3 files changed, 454 insertions(+) create mode 100644 data/js/item/puzzlechest.js diff --git a/data/dfndata/items/containers/metal.dfn b/data/dfndata/items/containers/metal.dfn index d891d69a2..5b6875213 100644 --- a/data/dfndata/items/containers/metal.dfn +++ b/data/dfndata/items/containers/metal.dfn @@ -134,3 +134,12 @@ maxitems=125 { get=0x0e40 0x0e41 } + +[puzzlechest] +{ +get=base_item +name=metal chest +id=0x0e41 +movable=2 +script=5061 +} diff --git a/data/js/item/puzzlechest.js b/data/js/item/puzzlechest.js new file mode 100644 index 000000000..16ab40d89 --- /dev/null +++ b/data/js/item/puzzlechest.js @@ -0,0 +1,444 @@ +const PuzzleChestCylinder = { + None: 0xE73, + LightBlue: 0x186F, + Blue: 0x186A, + Green: 0x186B, + Orange: 0x186C, + Purple: 0x186D, + Red: 0x186E, + DarkBlue: 0x1869, + Yellow: 0x1870 +}; + +function PuzzleChestSolution( cylinders ) +{ + this.cylinders = cylinders || [ + RandomCylinder(), + RandomCylinder(), + RandomCylinder(), + RandomCylinder(), + RandomCylinder() + ]; +} + +function RandomCylinder() +{ + var randomValue = RandomNumber( 0, 8 ); + switch ( randomValue ) + { + case 0: return PuzzleChestCylinder.LightBlue; + case 1: return PuzzleChestCylinder.Blue; + case 2: return PuzzleChestCylinder.Green; + case 3: return PuzzleChestCylinder.Orange; + case 4: return PuzzleChestCylinder.Purple; + case 5: return PuzzleChestCylinder.Red; + case 6: return PuzzleChestCylinder.DarkBlue; + default: return PuzzleChestCylinder.Yellow; + } +} + +function CompareSolutions( solutionCylinders, guessCylinders ) +{ + var correctCylinders = 0; + var correctColors = 0; + var matchesSrc = [false, false, false, false, false]; + var matchesDst = [false, false, false, false, false]; + + // Check for exact matches ( correct position and color ) + for ( var i = 0; i < solutionCylinders.length; i++ ) + { + if( solutionCylinders[i] == guessCylinders[i] ) + { + correctCylinders++; + matchesSrc[i] = true; + matchesDst[i] = true; + } + } + + // Check for color matches ( wrong position ) + for ( var i = 0; i < solutionCylinders.length; i++ ) + { + if( !matchesSrc[i] ) + { + for ( var j = 0; j < guessCylinders.length; j++ ) + { + if( solutionCylinders[i] == guessCylinders[j] && !matchesDst[j] ) + { + correctColors++; + matchesDst[j] = true; + break; + } + } + } + } + + return { + correctCylinders: correctCylinders, + correctColors: correctColors + }; +} + +function onCreateDFN( objMade, objType ) +{ + if( objType == 0 ) + { + objMade.SetTag( "locked", "true" ); // Lock the chest by default + var solution = new PuzzleChestSolution(); + objMade.SetTag( "solution", SerializeSolution( solution )); // Store the solution as a serialized string + } +} + +function onUseChecked( pUser, pItem ) +{ + var socket = pUser.socket; + socket.tempObj = pItem; + + if( pItem.GetTag( "locked" ) == "true" ) + { + var serializedSolution = pItem.GetTag( "solution" ); + var solution = DeserializeSolution( serializedSolution ); + var lastGuess = pUser.GetTag( "lastGuess" ); + + // Initialize lastGuess if it doesn't exist + if( !lastGuess ) + { + lastGuess = new PuzzleChestSolution(); + pUser.SetTag( "lastGuess", SerializeSolution( lastGuess )); + } + else + { + lastGuess = DeserializeSolution( pUser.GetTag( "lastGuess" )); + } + + // Calculate the number of correct cylinders and colors + var result = CompareSolutions( solution.cylinders, lastGuess.cylinders ); + + // Generate hints based on player's lockpicking skill + var hints = GenerateHints( pUser, result.correctCylinders, result.correctColors ); + + // Show the puzzle gump to the player + ShowPuzzleGump( pUser, pItem, solution, 0 ); // Pass the solution and default check = 0 + } +} + +function onGumpPress( pSock, pButton, gumpData ) +{ + var pUser = pSock.currentChar; + var pItem = pSock.tempObj; // Access the temporary object from the socket + + // Deserialize the puzzle solution and the last guess from the player's tags + var solution = DeserializeSolution( pItem.GetTag( "solution" )); + var lastGuess = DeserializeSolution( pUser.GetTag( "lastGuess" )); + + if( pButton == 1 ) + { + // Submit button ( ID 1 ) + var result = CompareSolutions( solution.cylinders, lastGuess.cylinders ); + if( result.correctCylinders == 5 ) + { + // Unlock the chest ifthe guess is correct + pItem.SetTag( "locked", "false" ); + pUser.SysMessage( "The chest unlocks!" ); + pUser.SoundEffect( 0x241, true ); // Play unlock sound effect + + // Reward the player and clear the puzzle + RewardPlayer( pUser, pItem ); + pUser.SetTag( "lastGuess", null ); + pItem.Delete( ); // Delete the chest after it's unlocked + } + else + { + // Generate hints for incorrect guesses + var hints = GenerateHints( pUser, result.correctCylinders, result.correctColors ); + + // Show a status gump with hints and apply damage for incorrect guess + ShowStatusGump( pUser, result.correctCylinders, result.correctColors, hints.hint1, hints.hint2 ); + DamagePlayer( pUser ); // Apply damage to the player for incorrect guesses + } + } + else if( pButton >= 10 && pButton <= 17 ) + { + // Handle left and right buttons to change cylinder color + var selectedCylinderIndex = gumpData.getButton( 0 ); // Determine which cylinder was selected via radio buttons + + if( selectedCylinderIndex >= 0 && selectedCylinderIndex <= 4 ) + { + // Handle the color change based on which button was pressed ( cylinder color buttons 10-17 ) + switch ( pButton ) + { + case 10: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.LightBlue; + break; + case 11: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.Blue; + break; + case 12: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.Green; + break; + case 13: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.Orange; + break; + case 14: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.Purple; + break; + case 15: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.Red; + break; + case 16: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.DarkBlue; + break; + case 17: + lastGuess.cylinders[selectedCylinderIndex] = PuzzleChestCylinder.Yellow; + break; + } + } + + // Update the player's last guess + pUser.SetTag( "lastGuess", SerializeSolution( lastGuess )); + + // Redraw the puzzle gump to reflect the updated guess + ShowPuzzleGump( pUser, pItem, lastGuess, selectedCylinderIndex ); + } + else if( pButton == 100 ) + { + // OK button in status gump ( ID 100 ) + // Reshow the puzzle gump after closing the status gump + ShowPuzzleGump( pUser, pItem, lastGuess, 0 ); // Reshow the puzzle with the correct solution + } +} + +function ShowPuzzleGump( pUser, pItem, lastGuess, check ) +{ + var myGump = new Gump; + + // Add the main background and title + myGump.AddBackground( 25, 0, 500, 410, 0x53 ); + myGump.AddGump( 62, 20, 0x67, 0 ); // Title image + myGump.AddHTMLGump( 80, 36, 110, 70, false, false, "A Puzzle Lock" ); + + // Instructions + myGump.AddHTMLGump( 214, 26, 270, 90, false, false, + "Correctly choose the sequence of cylinders needed to open the latch. Each cylinder may potentially be used more than once. Beware! A false attempt could be deadly!" ); + + // Left cylinder buttons + AddLeftCylinderButton( myGump, 62, 130, PuzzleChestCylinder.LightBlue, 10 ); + AddLeftCylinderButton( myGump, 62, 180, PuzzleChestCylinder.Blue, 11 ); + AddLeftCylinderButton( myGump, 62, 230, PuzzleChestCylinder.Green, 12 ); + AddLeftCylinderButton( myGump, 62, 280, PuzzleChestCylinder.Orange, 13 ); + + // Right cylinder buttons + AddRightCylinderButton( myGump, 451, 130, PuzzleChestCylinder.Purple, 14 ); + AddRightCylinderButton( myGump, 451, 180, PuzzleChestCylinder.Red, 15 ); + AddRightCylinderButton( myGump, 451, 230, PuzzleChestCylinder.DarkBlue, 16 ); + AddRightCylinderButton( myGump, 451, 280, PuzzleChestCylinder.Yellow, 17 ); + + var solution = DeserializeSolution( pItem.GetTag( "solution" )); + // Call AddLockpickingHints with the solution from the chest + AddLockpickingHints( myGump, pUser, solution ); + + // Previous guess + var lastGuess = DeserializeSolution( pUser.GetTag( "lastGuess" )); + if( lastGuess ) + { + myGump.AddHTMLGump( 127, 249, 170, 20, false, false, "Thy previous guess:" ); + myGump.AddBackground( 290, 247, 115, 25, 0x13EC ); + + // Add each cylinder of the previous guess + for ( var i = 0; i < lastGuess.cylinders.length; i++ ) + { + AddCylinder( myGump, 281 + ( i * 22 ), 254, lastGuess.cylinders[i] ); + } + } + + // Pedestals for current guess + AddPedestal( myGump, 140, 270, lastGuess.cylinders[0], 0, check == 0 ); + AddPedestal( myGump, 195, 270, lastGuess.cylinders[1], 1, check == 1 ); + AddPedestal( myGump, 250, 270, lastGuess.cylinders[2], 2, check == 2 ); + AddPedestal( myGump, 305, 270, lastGuess.cylinders[3], 3, check == 3 ); + AddPedestal( myGump, 360, 270, lastGuess.cylinders[4], 4, check == 4 ); + + // Submit button + myGump.AddButton( 258, 370, 0xFA5, 0xFA7, 1, 0, 1 ); + + // Send the gump to the player + myGump.Send( pUser ); + myGump.Free( ); // Clear this gump from UOX memory +} + +function AddLockpickingHints( myGump, pUser, pChestSolution ) +{ + var lockpickingSkill = pUser.baseskills.lockpicking; // Lockpicking skill in UOX3 + + if( lockpickingSkill >= 600 ) + { + myGump.AddHTMLGump( 160, 125, 230, 24, false, false, "Lockpicking hint:" ); // Display the hint header + myGump.AddBackground( 159, 150, 230, 95, 0x13EC ); // Hint background + + // Add hints based on lockpicking skill thresholds + if( lockpickingSkill >= 800 ) + { + // Show the first correct cylinder from the chest solution + myGump.AddHTMLGump( 165, 157, 200, 40, false, false, "In the first slot:" ); + AddCylinder( myGump, 350, 165, pChestSolution.cylinders[0] ); // Show the first cylinder + + // Indicate that a cylinder is used in an unknown slot + myGump.AddHTMLGump( 165, 197, 200, 40, false, false, "Used in an unknown slot:" ); + AddCylinder( myGump, 350, 200, pChestSolution.cylinders[1] ); // Show the second cylinder as a hint + + if( lockpickingSkill >= 900 ) + { + // Add a hint for the third correct cylinder + AddCylinder( myGump, 350, 212, pChestSolution.cylinders[2] ); // Add third hint + } + if( lockpickingSkill >= 1000 ) + { + // Add a hint for the fourth correct cylinder + AddCylinder( myGump, 350, 224, pChestSolution.cylinders[3] ); // Add fourth hint + } + } + else + { + // Provide a basic hint ifthe player's skill is between 600-799 + myGump.AddHTMLGump( 165, 157, 200, 40, false, false, "Used in an unknown slot:" ); + AddCylinder( myGump, 350, 160, pChestSolution.cylinders[0] ); // Show the first cylinder as a basic hint + + if( lockpickingSkill >= 700 ) + { + // Add a second hint ifthe player's skill is 700-799 + AddCylinder( myGump, 350, 172, pChestSolution.cylinders[1] ); // Add second hint for 700+ skill + } + } + } +} + +function AddLeftCylinderButton( myGump, x, y, cylinder, buttonID ) +{ + myGump.AddBackground( x, y, 30, 30, 0x13EC ); + AddCylinder( myGump, x - 7, y + 10, cylinder ); + myGump.AddButton( x + 38, y + 9, 0x13A8, 0x13A9, 1, 0, buttonID ); +} + +function AddRightCylinderButton( myGump, x, y, cylinder, buttonID ) +{ + myGump.AddBackground( x, y, 30, 30, 0x13EC ); + AddCylinder( myGump, x - 7, y + 10, cylinder ); + myGump.AddButton( x - 26, y + 9, 0x13A8, 0x13A9, 1, 0, buttonID ); +} + +function AddCylinder( myGump, x, y, cylinder ) +{ + if( cylinder != PuzzleChestCylinder.None ) + { + myGump.AddPicture( x, y, cylinder ); + } + else + { + myGump.AddPicture( x + 9, y, cylinder ); + } +} + +function AddPedestal( myGump, x, y, cylinder, switchID, initialState ) +{ + myGump.AddPicture( x, y, 0xB10 ); + myGump.AddPicture( x - 23, y + 12, 0xB12 ); + myGump.AddPicture( x + 23, y + 12, 0xB13 ); + myGump.AddPicture( x, y + 23, 0xB11 ); + + if( cylinder != PuzzleChestCylinder.None ) + { + myGump.AddPicture( x, y + 2, 0x51A ); + AddCylinder( myGump, x - 1, y + 19, cylinder ); + } else { + myGump.AddPicture( x, y + 2, 0x521 ); + } + + // Use AddRadio to allow selection of one cylinder at a time + myGump.AddRadio( x + 7, y + 65, 0x867, initialState ? 1 : 0, switchID ); +} + +function ShowStatusGump( pUser, correctCylinders, correctColors ) +{ + var myGump = new Gump; + + myGump.AddBackground( 50, 50, 300, 200, 0x13BE ); // Add background + myGump.AddHTMLGump( 60, 60, 250, 25, false, false, "
Incorrect Guess!
" ); // Title text + + // Display number of correct guesses + myGump.AddHTMLGump( 60, 90, 250, 25, false, false, "Correct Cylinders: " + correctCylinders ); + myGump.AddHTMLGump( 60, 120, 250, 25, false, false, "Correct Colors ( wrong position ): " + correctColors ); + + // Add OK button + myGump.AddButton( 150, 170, 0xFA5, 0xFA7, 1, 0, 100 ); // OK button + + // Send the gump to the player + myGump.Send( pUser ); + myGump.Free( ); +} + +function RewardPlayer( pUser, pItem ) +{ + pUser.SysMessage( "You find some treasure inside the chest!" ); + CreateDFNItem( pUser.socket, pUser, "0x0eed", 500, "ITEM", true ); // Drop 500 gold +} + +function GenerateHints( pUser, correctCylinders, correctColors ) +{ + var lockpickingSkill = pUser.CheckSkill( 24, 0, 1000 ); + var hint1 = ""; + var hint2 = ""; + + if( RandomNumber( 0, 1000 ) < lockpickingSkill ) + { + if( correctCylinders > 0 ) + { + hint1 = "One of the cylinders is in the first slot."; + } + if( correctColors > 0 ) + { + hint2 = "Some colors are used, but thou art not certain where."; + } + } + + return { hint1: hint1, hint2: hint2 }; +} + +function DamagePlayer( pUser ) +{ + var randomEffect = RandomNumber( 0, 3 ); + switch ( randomEffect ) + { + case 0: + pUser.SysMessage( "A toxic vapor envelops thee." ); + pUser.Damage( RandomNumber( 10, 40 )); + break; + case 1: + pUser.SysMessage( "Searing heat scorches thy skin." ); + pUser.Damage( RandomNumber( 10, 40 )); + break; + case 2: + pUser.SysMessage( "Pain lances through thee from a sharp metal blade." ); + pUser.Damage( RandomNumber( 10, 40 )); + break; + default: + pUser.SysMessage( "Lightning arcs through thy body." ); + pUser.Damage( RandomNumber( 10, 40 )); + break; + } +} + +function SerializeSolution( solution ) +{ + return solution.cylinders.join( "," ); +} + +function DeserializeSolution( data ) +{ + var cylinderStrings = data.split( "," ); + var cylinders = []; + + for ( var i = 0; i < cylinderStrings.length; i++ ) { + cylinders.push( parseInt( cylinderStrings[i], 10 )); + } + + return new PuzzleChestSolution( cylinders ); +} diff --git a/data/js/jse_fileassociations.scp b/data/js/jse_fileassociations.scp index 2cbb8e3d5..63e6837f6 100644 --- a/data/js/jse_fileassociations.scp +++ b/data/js/jse_fileassociations.scp @@ -283,6 +283,7 @@ 5058=item/bagofsending.js 5059=item/powderoftranslocation.js 5060=item/elixirofingots.js +5061=item/puzzlechest.js //------------------------------------------- // treasure maps and chest [5400-5405] From 26ffc40d7c0dd1580fb2d8cf7de1662b6a27bd6f Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:41:29 -0500 Subject: [PATCH 02/19] Small Fix fixed checkbox --- data/js/item/puzzlechest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/js/item/puzzlechest.js b/data/js/item/puzzlechest.js index 16ab40d89..37e2f5fed 100644 --- a/data/js/item/puzzlechest.js +++ b/data/js/item/puzzlechest.js @@ -353,7 +353,7 @@ function AddPedestal( myGump, x, y, cylinder, switchID, initialState ) } // Use AddRadio to allow selection of one cylinder at a time - myGump.AddRadio( x + 7, y + 65, 0x867, initialState ? 1 : 0, switchID ); + myGump.AddRadio( x + 7, y + 65, 0x868, initialState ? 1 : 0, switchID ); } function ShowStatusGump( pUser, correctCylinders, correctColors ) From 4cca79bb8be8b383ccff0e75b78eaedc8c32214e Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 12 Oct 2024 14:58:54 -0500 Subject: [PATCH 03/19] ML House add-ons Added a lot of the ML House Add-ons including deeds and the furniture item its. --- data/dfndata/house/house_ml.dfn | 828 ++++++++++++++++++ .../items/building/furniture/furniture_ml.dfn | 487 ++++++++++ .../items/deeds/houseaddon_deeds_ml.dfn | 191 ++++ 3 files changed, 1506 insertions(+) create mode 100644 data/dfndata/house/house_ml.dfn create mode 100644 data/dfndata/items/building/furniture/furniture_ml.dfn create mode 100644 data/dfndata/items/deeds/houseaddon_deeds_ml.dfn diff --git a/data/dfndata/house/house_ml.dfn b/data/dfndata/house/house_ml.dfn new file mode 100644 index 000000000..57d6fe89d --- /dev/null +++ b/data/dfndata/house/house_ml.dfn @@ -0,0 +1,828 @@ +// House Addon - Alchemist Table (East) +[HOUSE 300] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=alchemisttabledeedeast +HOUSE_ITEM=1000 +HOUSE_ITEM=1001 +} + +// House Addon - Alchemist Table (South) +[HOUSE 301] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=alchemisttablesouthdeed +HOUSE_ITEM=1002 +HOUSE_ITEM=1003 +} + +// House Addon - Elven Bed (East) +[HOUSE 302] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=elvenbedeastdeed +HOUSE_ITEM=1004 +HOUSE_ITEM=1005 +} + +// House Addon - Elven Bed (South) +[HOUSE 303] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=elvenbedsouthdeed +HOUSE_ITEM=1006 +HOUSE_ITEM=1007 +} + +// House Addon - Elven Loveseat (East) +[HOUSE 304] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=elvenloveseateastdeed +HOUSE_ITEM=1008 +HOUSE_ITEM=1009 +} + +// House Addon - Elven Loveseat (South) +[HOUSE 305] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=elvenloveseatsouthdeed +HOUSE_ITEM=1010 +HOUSE_ITEM=1011 +} + +// House Addon - Elven Wash Basin (East) +[HOUSE 306] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=elvenwashbasineastdeed +HOUSE_ITEM=1012 +HOUSE_ITEM=1013 +} + +// House Addon - Elven Wash Basin (South) +[HOUSE 307] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=elvenwashbasinsouthdeed +HOUSE_ITEM=1014 +HOUSE_ITEM=1015 +} + +// House Addon - Fancy Couch (East) +[HOUSE 308] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=3 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancycoucheastdeed +HOUSE_ITEM=1016 +HOUSE_ITEM=1017 +HOUSE_ITEM=1018 +} + +// House Addon - Fancy Couch (North) +[HOUSE 309] +{ +ID=0x14F0 +SPACEX=3 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancycouchnorthdeed +HOUSE_ITEM=1019 +HOUSE_ITEM=1020 +HOUSE_ITEM=1021 +} + +// House Addon - Fancy Couch (South) +[HOUSE 310] +{ +ID=0x14F0 +SPACEX=3 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancycouchsouthdeed +HOUSE_ITEM=1022 +HOUSE_ITEM=1023 +HOUSE_ITEM=1024 +} + +// House Addon - Fancy Couch (West) +[HOUSE 311] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=3 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancycouchwestdeed +HOUSE_ITEM=1025 +HOUSE_ITEM=1026 +HOUSE_ITEM=1027 +} + +// House Addon - Hardwood Table (East) +[HOUSE 312] +{ +ID=0x14F0 +SPACEX=3 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=hardwoodtableeastdeed +HOUSE_ITEM=1028 +HOUSE_ITEM=1029 +HOUSE_ITEM=1030 +} + +// House Addon - Hardwood Table (South) +[HOUSE 313] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=3 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=hardwoodtablesouthdeed +HOUSE_ITEM=1031 +HOUSE_ITEM=1032 +HOUSE_ITEM=1033 +} + +// House Addon - Fancy Loveseat (East) +[HOUSE 314] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancyloveseateastdeed +HOUSE_ITEM=1034 +HOUSE_ITEM=1035 +} + +// House Addon - Fancy Loveseat (North) +[HOUSE 315] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancyloveseatnorthdeed +HOUSE_ITEM=1036 +HOUSE_ITEM=1037 +} + +// House Addon - Fancy Loveseat (South) +[HOUSE 316] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancyloveseatsouthdeed +HOUSE_ITEM=1038 +HOUSE_ITEM=1039 +} + +// House Addon - Fancy Loveseat (West) +[HOUSE 317] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fancyloveseatwestdeed +HOUSE_ITEM=1040 +HOUSE_ITEM=1041 +} + +// House Addon - Ornate Table (East) +[HOUSE 318] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=3 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=ornatetableeastdeed +HOUSE_ITEM=1042 +HOUSE_ITEM=1043 +HOUSE_ITEM=1044 +} + +// House Addon - Ornate Table (South) +[HOUSE 319] +{ +ID=0x14F0 +SPACEX=3 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=ornatetablesouthdeed +HOUSE_ITEM=1045 +HOUSE_ITEM=1046 +HOUSE_ITEM=1047 +} + +// House Addon - Plush Loveseat (East) +[HOUSE 320] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=plushloveseateastdeed +HOUSE_ITEM=1048 +HOUSE_ITEM=1049 +} + +// House Addon - Plush Loveseat (South) +[HOUSE 321] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=plushloveseatsouthdeed +HOUSE_ITEM=1050 +HOUSE_ITEM=1051 +} + +// House Addon - Tall Elven Bed (East) +[HOUSE 322] +{ +ID=0x14F0 +SPACEX=3 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=tallelvenbedeastdeed +HOUSE_ITEM=1052 +HOUSE_ITEM=1053 +HOUSE_ITEM=1054 +HOUSE_ITEM=1055 +} + +// House Addon - Tall Elven Bed (South) +[HOUSE 323] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=3 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=tallelvenbedsouthdeed +HOUSE_ITEM=1056 +HOUSE_ITEM=1057 +HOUSE_ITEM=1058 +HOUSE_ITEM=1059 +} + +[HOUSE ITEM 1000] +{ alchemist table part 1 (east) +ITEM=0x3077 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1001] +{ alchemist table part 2 (east) +ITEM=0x3078 +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1002] +{ alchemist table part 1 (south) +ITEM=0x3079 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1003] +{ alchemist table part 2 (south) +ITEM=0x307A +X=-1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1004] +{ elven bed part 1 (east) +ITEM=0x304D +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1005] +{ elven bed part 2 (east) +ITEM=0x304C +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1006] +{ elven bed part 1 (south) +ITEM=0x3050 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1007] +{ +elven bed part 2 (south) +ITEM=0x3051 +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1008] +{ elven loveseat part 1 (east) +ITEM=0x3089 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1009] +{ elven loveseat part 2 (east) +ITEM=0x3088 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1010] +{ elven loveseat part 1 (south) +ITEM=0x308A +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1011] +{ elven loveseat part 2 (south) +ITEM=0x308B +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1012] +{ elven wash basin part 1 (east) +ITEM=0x30DF +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1013] +{ elven wash basin part 2 (east) +ITEM=0x30E0 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1014] +{ elven wash basin part 1 (south) +ITEM=0x30E1 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1015] +{ elven wash basin part 2 (south) +ITEM=0x30E2 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1016] +{ fancy couch part 1 (east) +ITEM=0x4C8C +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1017] +{ fancy couch part 2 (east) +ITEM=0x4C8A +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1018] +{ fancy couch part 3 (east) +ITEM=0x4C8B +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1019] +{ fancy couch part 1 (north) +ITEM=0x9C62 +X=-1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1020] +{ fancy couch part 2 (north) +ITEM=0x9C61 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1021] +{ fancy couch part 3 (north) +ITEM=0x9C60 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1022] +{ fancy couch part 1 (south) +ITEM=0x4C8D +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1023] +{ fancy couch part 2 (south) +ITEM=0x4C8E +X=-1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1024] +{ fancy couch part 3 (south) +ITEM=0x4C8F +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1025] +{ fancy couch part 1 (west) +ITEM=0x9C5F +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1026] +{ fancy couch part 2 (west) +ITEM=0x9C5E +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1027] +{ fancy couch part 3 (west) +ITEM=0x9C5D +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1028] +{ hardwood table part 1 (east) +ITEM=0x3094 +X=-1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1029] +{ hardwood table part 2 (east) +ITEM=0x3093 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1030] +{ hardwood table part 3 (east) +ITEM=0x3092 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1031] +{ hardwood table part 1 (south) +ITEM=0x3095 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1032] +{ hardwood table part 2 (south) +ITEM=0x3096 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1033] +{ hardwood table part 3 (south) +ITEM=0x3097 +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1034] +{ fancy loveseat part 1 (east) +ITEM=0x4C88 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1035] +{ fancy loveseat part 2 (east) +ITEM=0x4C89 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1036] +{ fancy loveseat part 1 (north) +ITEM=0x9C5A +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1037] +{ fancy loveseat part 2 (north) +ITEM=0x9C59 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1038] +{ fancy loveseat part 1 (south) +ITEM=0x4C87 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1039] +{ fancy loveseat part 2 (south) +ITEM=0x4C86 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1040] +{ fancy loveseat part 1 (west) +ITEM=0x9C58 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1041] +{ fancy loveseat part 2 (west) +ITEM=0x9C57 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1042] +{ ornate table part 1 (east) +ITEM=0x308F +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1043] +{ ornate table part 2 (east) +ITEM=0x3090 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1044] +{ ornate table part 3 (east) +ITEM=0x3091 +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1045] +{ ornate table part 1 (south) +ITEM=0x308E +X=-1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1046] +{ ornate table part 2 (south) +ITEM=0x308D +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1047] +{ ornate table part 3 (south) +ITEM=0x308C +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1048] +{ plush loveseat part 1 (east) +ITEM=0x4C84 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1049] +{ plush loveseat part 2 (east) +ITEM=0x4C85 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1050] +{ plush loveseat part 1 (south) +ITEM=0x4C83 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1051] +{ plush loveseat part 2 (south) +ITEM=0x4C82 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1052] +{ tall elven bed part 1 (east) +ITEM=0x3054 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1053] +{ tall elven bed part 2 (east) +ITEM=0x3053 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1054] +{ tall elven bed part 3 (east) +ITEM=0x3055 +X=2 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1055] +{ tall elven bed part 4 (east) +ITEM=0x3052 +X=2 +Y=0 +Z=0 +} + +[HOUSE ITEM 1056] +{ tall elven bed part 1 (south) +ITEM=0x3058 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1057] +{ tall elven bed part 2 (south) +ITEM=0x3057 +X=-1 +Y=1 +Z=0 +} + +[HOUSE ITEM 1058] +{ tall elven bed part 3 (south) +ITEM=0x3059 +X=0 +Y=-1 +Z=0 +} + +[HOUSE ITEM 1059] +{ tall elven bed part 4 (south) +ITEM=0x3056 +X=0 +Y=1 +Z=0 +} \ No newline at end of file diff --git a/data/dfndata/items/building/furniture/furniture_ml.dfn b/data/dfndata/items/building/furniture/furniture_ml.dfn new file mode 100644 index 000000000..fa2d2a8fe --- /dev/null +++ b/data/dfndata/items/building/furniture/furniture_ml.dfn @@ -0,0 +1,487 @@ +// Elven Bed (East) +[0x304D] +{ +get=base_item +name=Elven Bed (East) Part 1 +id=0x304D +weight=1000 +movable=1 +} + +[0x304C] +{ +get=base_item +name=Elven Bed (East) Part 2 +id=0x304C +weight=1000 +movable=1 +} + +// Elven Bed (South) +[0x3050] +{ +get=base_item +name=Elven Bed (South) Part 1 +id=0x3050 +weight=1000 +movable=1 +} + +[0x3051] +{ +get=base_item +name=Elven Bed (South) Part 2 +id=0x3051 +weight=1000 +movable=1 +} + +// Alchemist Table (East) +[0x3077] +{ +get=base_item +name=Alchemist Table (East) Part 1 +id=0x3077 +weight=1000 +movable=1 +} + +[0x3078] +{ +get=base_item +name=Alchemist Table (East) Part 2 +id=0x3078 +weight=1000 +movable=1 +} + +// Alchemist Table (South) +[0x3079] +{ +get=base_item +name=Alchemist Table (South) Part 1 +id=0x3079 +weight=1000 +movable=1 +} + +[0x307A] +{ +get=base_item +name=Alchemist Table (South) Part 2 +id=0x307A +weight=1000 +movable=1 +} + +// Elven Loveseat (East) +[0x3089] +{ +get=base_item +name=Elven Loveseat (East) Part 1 +id=0x3089 +weight=1000 +movable=1 +} + +[0x3088] +{ +get=base_item +name=Elven Loveseat (East) Part 2 +id=0x3088 +weight=1000 +movable=1 +} + +// Elven Loveseat (South) +[0x308A] +{ +get=base_item +name=Elven Loveseat (South) Part 1 +id=0x308A +weight=1000 +movable=1 +} + +[0x308B] +{ +get=base_item +name=Elven Loveseat (South) Part 2 +id=0x308B +weight=1000 +movable=1 +} + +// Elven Wash Basin (East) +[0x30DF] +{ +get=base_item +name=Elven Wash Basin (East) Part 1 +id=0x30DF +weight=1000 +movable=1 +} + +[0x30E0] +{ +get=base_item +name=Elven Wash Basin (East) Part 2 +id=0x30E0 +weight=1000 +movable=1 +} + +// Elven Wash Basin (South) +[0x30E1] +{ +get=base_item +name=Elven Wash Basin (South) Part 1 +id=0x30E1 +weight=1000 +movable=1 +} + +[0x30E2] +{ +get=base_item +name=Elven Wash Basin (South) Part 2 +id=0x30E2 +weight=1000 +movable=1 +} + +// Fancy Couch (East) +[0x4C8C] +{ +get=base_item +name=Fancy Couch (East) Part 1 +id=0x4C8C +weight=1000 +movable=1 +} + +[0x4C8A] +{ +get=base_item +name=Fancy Couch (East) Part 2 +id=0x4C8A +weight=1000 +movable=1 +} + +[0x4C8B] +{ +get=base_item +name=Fancy Couch (East) Part 3 +id=0x4C8B +weight=1000 +movable=1 +} + +// Fancy Couch (North) +[0x9C62] +{ +get=base_item +name=Fancy Couch (North) Part 1 +id=0x9C62 +weight=1000 +movable=1 +} + +[0x9C61] +{ +get=base_item +name=Fancy Couch (North) Part 2 +id=0x9C61 +weight=1000 +movable=1 +} + +[0x9C60] +{ +get=base_item +name=Fancy Couch (North) Part 3 +id=0x9C60 +weight=1000 +movable=1 +} + +// Fancy Couch (South) +[0x4C8D] +{ +get=base_item +name=Fancy Couch (South) Part 1 +id=0x4C8D +weight=1000 +movable=1 +} + +[0x4C8E] +{ +get=base_item +name=Fancy Couch (South) Part 2 +id=0x4C8E +weight=1000 +movable=1 +} + +[0x4C8F] +{ +get=base_item +name=Fancy Couch (South) Part 3 +id=0x4C8F +weight=1000 +movable=1 +} + +// Fancy Couch (West) +[0x9C5F] +{ +get=base_item +name=Fancy Couch (West) Part 1 +id=0x9C5F +weight=1000 +movable=1 +} + +[0x9C5E] +{ +get=base_item +name=Fancy Couch (West) Part 2 +id=0x9C5E +weight=1000 +movable=1 +} + +[0x9C5D] +{ +get=base_item +name=Fancy Couch (West) Part 3 +id=0x9C5D +weight=1000 +movable=1 +} + +// Hardwood Table (East) +[0x3094] +{ +get=base_item +name=Hardwood Table (East) Part 1 +id=0x3094 +weight=1000 +movable=1 +} + +[0x3093] +{ +get=base_item +name=Hardwood Table (East) Part 2 +id=0x3093 +weight=1000 +movable=1 +} + +[0x3092] +{ +get=base_item +name=Hardwood Table (East) Part 3 +id=0x3092 +weight=1000 +movable=1 +} + +// Hardwood Table (South) +[0x3095] +{ +get=base_item +name=Hardwood Table (South) Part 1 +id=0x3095 +weight=1000 +movable=1 +} + +[0x3096] +{ +get=base_item +name=Hardwood Table (South) Part 2 +id=0x3096 +weight=1000 +movable=1 +} + +[0x3097] +{ +get=base_item +name=Hardwood Table (South) Part 3 +id=0x3097 +weight=1000 +movable=1 +} + +// Ornate Table (East) +[0x308F] +{ +get=base_item +name=Ornate Table (East) Part 1 +id=0x308F +weight=1000 +movable=1 +} + +[0x3090] +{ +get=base_item +name=Ornate Table (East) Part 2 +id=0x3090 +weight=1000 +movable=1 +} + +[0x3091] +{ +get=base_item +name=Ornate Table (East) Part 3 +id=0x3091 +weight=1000 +movable=1 +} + +// Ornate Table (South) +[0x308E] +{ +get=base_item +name=Ornate Table (South) Part 1 +id=0x308E +weight=1000 +movable=1 +} + +[0x308D] +{ +get=base_item +name=Ornate Table (South) Part 2 +id=0x308D +weight=1000 +movable=1 +} + +[0x308C] +{ +get=base_item +name=Ornate Table (South) Part 3 +id=0x308C +weight=1000 +movable=1 +} + +// Plush Loveseat (East) +[0x4C84] +{ +get=base_item +name=Plush Loveseat (East) Part 1 +id=0x4C84 +weight=1000 +movable=1 +} + +[0x4C85] +{ +get=base_item +name=Plush Loveseat (East) Part 2 +id=0x4C85 +weight=1000 +movable=1 +} + +// Plush Loveseat (South) +[0x4C83] +{ +get=base_item +name=Plush Loveseat (South) Part 1 +id=0x4C83 +weight=1000 +movable=1 +} + +[0x4C82] +{ +get=base_item +name=Plush Loveseat (South) Part 2 +id=0x4C82 +weight=1000 +movable=1 +} + +// Tall Elven Bed (East) +[0x3054] +{ +get=base_item +name=Tall Elven Bed (East) Part 1 +id=0x3054 +weight=1000 +movable=1 +} + +[0x3053] +{ +get=base_item +name=Tall Elven Bed (East) Part 2 +id=0x3053 +weight=1000 +movable=1 +} + +[0x3055] +{ +get=base_item +name=Tall Elven Bed (East) Part 3 +id=0x3055 +weight=1000 +movable=1 +} + +[0x3052] +{ +get=base_item +name=Tall Elven Bed (East) Part 4 +id=0x3052 +weight=1000 +movable=1 +} + +// Tall Elven Bed (South) +[0x3058] +{ +get=base_item +name=Tall Elven Bed (South) Part 1 +id=0x3058 +weight=1000 +movable=1 +} + +[0x3057] +{ +get=base_item +name=Tall Elven Bed (South) Part 2 +id=0x3057 +weight=1000 +movable=1 +} + +[0x3059] +{ +get=base_item +name=Tall Elven Bed (South) Part 3 +id=0x3059 +weight=1000 +movable=1 +} + +[0x3056] +{ +get=base_item +name=Tall Elven Bed (South) Part 4 +id=0x3056 +weight=1000 +movable=1 +} \ No newline at end of file diff --git a/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn b/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn new file mode 100644 index 000000000..c366542f4 --- /dev/null +++ b/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn @@ -0,0 +1,191 @@ +// Elven Bed (East) Deed +[elvenbedeastdeed] +{ +name=Elven Bed (East) +id=0x14F0 +morex=300 +} + +// Elven Bed (South) Deed +[elvenbedsouthdeed] +{ +name=Elven Bed (South) +id=0x14F0 +morex=301 +} + +// Alchemist Table (East) Deed +[alchemisttabledeedeast] +{ +name=Alchemist Table (East) +id=0x14F0 +morex=300 +} + +// Alchemist Table (South) Deed +[alchemisttablesouthdeed] +{ +name=Alchemist Table (South) +id=0x14F0 +morex=301 +} + +// Elven Loveseat (East) Deed +[elvenloveseateastdeed] +{ +name=Elven Loveseat (East) +id=0x14F0 +morex=304 +} + +// Elven Loveseat (South) Deed +[elvenloveseatsouthdeed] +{ +name=Elven Loveseat (South) +id=0x14F0 +morex=305 +} + +// Elven Wash Basin (East) Deed +[elvenwashbasineastdeed] +{ +name=Elven Wash Basin (East) +id=0x14F0 +morex=306 +} + +// Elven Wash Basin (South) Deed +[elvenwashbasinsouthdeed] +{ +name=Elven Wash Basin (South) +id=0x14F0 +morex=307 +} + +// Fancy Couch (East) Deed +[fancycoucheastdeed] +{ +name=Fancy Couch (East) +id=0x14F0 +morex=308 +} + +// Fancy Couch (North) Deed +[fancycouchnorthdeed] +{ +name=Fancy Couch (North) +id=0x14F0 +morex=309 +} + +// Fancy Couch (South) Deed +[fancycouchsouthdeed] +{ +name=Fancy Couch (South) +id=0x14F0 +morex=310 +} + +// Fancy Couch (West) Deed +[fancycouchwestdeed] +{ +name=Fancy Couch (West) +id=0x14F0 +morex=311 +} + +// Hardwood Table (East) Deed +[hardwoodtableeastdeed] +{ +name=Hardwood Table (East) +id=0x14F0 +morex=312 +} + +// Hardwood Table (South) Deed +[hardwoodtablesouthdeed] +{ +name=Hardwood Table (South) +id=0x14F0 +morex=313 +} + +// Fancy Loveseat (East) Deed +[fancyloveseateastdeed] +{ +name=Fancy Loveseat (East) +id=0x14F0 +morex=314 +} + +// Fancy Loveseat (North) Deed +[fancyloveseatnorthdeed] +{ +name=Fancy Loveseat (North) +id=0x14F0 +morex=315 +} + +// Fancy Loveseat (South) Deed +[fancyloveseatsouthdeed] +{ +name=Fancy Loveseat (South) +id=0x14F0 +morex=316 +} + +// Fancy Loveseat (West) Deed +[fancyloveseatwestdeed] +{ +name=Fancy Loveseat (West) +id=0x14F0 +morex=317 +} + +// Ornate Table (East) Deed +[ornatetableeastdeed] +{ +name=Ornate Table (East) +id=0x14F0 +morex=318 +} + +// Ornate Table (South) Deed +[ornatetablesouthdeed] +{ +name=Ornate Table (South) +id=0x14F0 +morex=319 +} + +// Plush Loveseat (East) Deed +[plushloveseateastdeed] +{ +name=Plush Loveseat (East) +id=0x14F0 +morex=320 +} + +// Plush Loveseat (South) Deed +[plushloveseatsouthdeed] +{ +name=Plush Loveseat (South) +id=0x14F0 +morex=321 +} + +// Tall Elven Bed (East) Deed +[tallelvenbedeastdeed] +{ +name=Tall Elven Bed (East) +id=0x14F0 +morex=322 +} + +// Tall Elven Bed (South) Deed +[tallelvenbedsouthdeed] +{ +name=Tall Elven Bed (South) +id=0x14F0 +morex=323 +} \ No newline at end of file From 5ffa3c7250779d512c80761bc09171fbc3c52f4d Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 12 Oct 2024 17:25:38 -0500 Subject: [PATCH 04/19] Mini Houses Added in AOS All the Mini House Add-Ons --- data/dfndata/house/house_aos.dfn | 290 ++++++++++++++++++ .../building/furniture/minihouse_parts.dfn | 180 +++++++++++ .../items/deeds/minihouseaddon_deeds.dfn | 79 +++++ 3 files changed, 549 insertions(+) create mode 100644 data/dfndata/house/house_aos.dfn create mode 100644 data/dfndata/items/building/furniture/minihouse_parts.dfn create mode 100644 data/dfndata/items/deeds/minihouseaddon_deeds.dfn diff --git a/data/dfndata/house/house_aos.dfn b/data/dfndata/house/house_aos.dfn new file mode 100644 index 000000000..b601740ca --- /dev/null +++ b/data/dfndata/house/house_aos.dfn @@ -0,0 +1,290 @@ +// House Addon - Mini House: Stone and Plaster +[HOUSE 500] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=stoneandplastermini +HOUSE_ITEM=1500 +} + +// House Addon - Mini House: Field Stone +[HOUSE 501] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=fieldstonemini +HOUSE_ITEM=1501 +} + +// House Addon - Mini House: Small Brick +[HOUSE 502] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=smallbrickmini +HOUSE_ITEM=1502 +} + +// House Addon - Mini House: Wooden +[HOUSE 503] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=woodenmini +HOUSE_ITEM=1503 +} + +// House Addon - Mini House: Wood and Plaster +[HOUSE 504] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=woodandplastermini +HOUSE_ITEM=1504 +} + +// House Addon - Mini House: Thatched-Roof Cottage +[HOUSE 505] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=thatchedroofcottage +HOUSE_ITEM=1505 +} + +// House Addon - Mini House: Brick +[HOUSE 506] +{ +ID=0x14F0 +SPACEX=4 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=brickmini +HOUSE_ITEM=1506 +HOUSE_ITEM=1507 +HOUSE_ITEM=1508 +HOUSE_ITEM=1509 +} + +// House Addon - Mini House: Two-Story Wood and Plaster +[HOUSE 507] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=twostorywoodandplastermini +HOUSE_ITEM=1510 +HOUSE_ITEM=1511 +HOUSE_ITEM=1512 +HOUSE_ITEM=1513 +} + +// House Addon - Mini House: Malas Mountain Pass +[HOUSE 508] +{ +ID=0x14F0 +SPACEX=2 +SPACEY=2 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=malasmountainpassmini +HOUSE_ITEM=1514 +HOUSE_ITEM=1515 +HOUSE_ITEM=1516 +HOUSE_ITEM=1517 +} + +// House Addon - Mini House: Church at Night +[HOUSE 509] +{ +ID=0x14F0 +SPACEX=1 +SPACEY=1 +CHARX=0 +CHARY=0 +CHARZ=0 +HOUSE_DEED=churchatnightmini +HOUSE_ITEM=1518 +} + +[HOUSE ITEM 1500] +{ mini house part 1 (Stone and Plaster) +ITEM=0x22C4 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1501] +{ mini house part 1 (Field Stone) +ITEM=0x22DE +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1502] +{ mini house part 1 (Small Brick) +ITEM=0x22DF +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1503] +{ mini house part 1 (Wooden) +ITEM=0x22C9 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1504] +{ mini house part 1 (Wood and Plaster) +ITEM=0x22E0 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1505] +{ mini house part 1 (Thatched-Roof Cottage) +ITEM=0x22E1 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1506] +{ mini house part 1 (Brick) +ITEM=0x22CD +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1507] +{ mini house part 2 (Brick) +ITEM=0x22CB +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1508] +{ mini house part 3 (Brick) +ITEM=0x22CC +X=2 +Y=0 +Z=0 +} + +[HOUSE ITEM 1509] +{ mini house part 4 (Brick) +ITEM=0x22CA +X=3 +Y=0 +Z=0 +} + +[HOUSE ITEM 1510] +{ mini house part 1 (Two-Story Wood and Plaster) +ITEM=0x2301 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1511] +{ mini house part 2 (Two-Story Wood and Plaster) +ITEM=0x2302 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1512] +{ mini house part 3 (Two-Story Wood and Plaster) +ITEM=0x2304 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1513] +{ mini house part 4 (Two-Story Wood and Plaster) +ITEM=0x2303 +X=1 +Y=1 +Z=0 +} + +[HOUSE ITEM 1514] +{ mini house part 1 (Malas Mountain Pass) +ITEM=0x2316 +X=0 +Y=0 +Z=0 +} + +[HOUSE ITEM 1515] +{ mini house part 2 (Malas Mountain Pass) +ITEM=0x2315 +X=1 +Y=0 +Z=0 +} + +[HOUSE ITEM 1516] +{ mini house part 3 (Malas Mountain Pass) +ITEM=0x2314 +X=0 +Y=1 +Z=0 +} + +[HOUSE ITEM 1517] +{ mini house part 4 (Malas Mountain Pass) +ITEM=0x2313 +X=1 +Y=1 +Z=0 +} + +[HOUSE ITEM 1518] +{ mini house part 1 (Church at Night) +ITEM=0x2318 +X=0 +Y=0 +Z=0 +} \ No newline at end of file diff --git a/data/dfndata/items/building/furniture/minihouse_parts.dfn b/data/dfndata/items/building/furniture/minihouse_parts.dfn new file mode 100644 index 000000000..6e308fa08 --- /dev/null +++ b/data/dfndata/items/building/furniture/minihouse_parts.dfn @@ -0,0 +1,180 @@ +// Base Item for Mini House: Stone and Plaster +[0x22C4] +{ +get=base_item +name=Mini House: Stone and Plaster +id=0x22C4 +weight=1000 +movable=1 +} + +// Base Item for Mini House: Field Stone +[0x22DE] +{ +get=base_item +name=Mini House: Field Stone +id=0x22DE +weight=1000 +movable=1 +} + +// Base Item for Mini House: Small Brick +[0x22DF] +{ +get=base_item +name=Mini House: Small Brick +id=0x22DF +weight=1000 +movable=1 +} + +// Base Item for Mini House: Wooden +[0x22C9] +{ +get=base_item +name=Mini House: Wooden +id=0x22C9 +weight=1000 +movable=1 +} + +// Base Item for Mini House: Wood and Plaster +[0x22E0] +{ +get=base_item +name=Mini House: Wood and Plaster +id=0x22E0 +weight=1000 +movable=1 +} + +// Base Item for Mini House: Thatched-Roof Cottage +[0x22E1] +{ +get=base_item +name=Mini House: Thatched-Roof Cottage +id=0x22E1 +weight=1000 +movable=1 +} + +// Base Items for Mini House: Brick +[0x22CD] +{ +get=base_item +name=Mini House: Brick Part 1 +id=0x22CD +weight=1000 +movable=1 +} + +[0x22CB] +{ +get=base_item +name=Mini House: Brick Part 2 +id=0x22CB +weight=1000 +movable=1 +} + +[0x22CC] +{ +get=base_item +name=Mini House: Brick Part 3 +id=0x22CC +weight=1000 +movable=1 +} + +[0x22CA] +{ +get=base_item +name=Mini House: Brick Part 4 +id=0x22CA +weight=1000 +movable=1 +} + +// Base Items for Mini House: Two-Story Wood and Plaster +[0x2301] +{ +get=base_item +name=Mini House: Two-Story Wood and Plaster Part 1 +id=0x2301 +weight=1000 +movable=1 +} + +[0x2302] +{ +get=base_item +name=Mini House: Two-Story Wood and Plaster Part 2 +id=0x2302 +weight=1000 +movable=1 +} + +[0x2304] +{ +get=base_item +name=Mini House: Two-Story Wood and Plaster Part 3 +id=0x2304 +weight=1000 +movable=1 +} + +[0x2303] +{ +get=base_item +name=Mini House: Two-Story Wood and Plaster Part 4 +id=0x2303 +weight=1000 +movable=1 +} + +// Base Items for Mini House: Malas Mountain Pass +[0x2316] +{ +get=base_item +name=Mini House: Malas Mountain Pass Part 1 +id=0x2316 +weight=1000 +movable=1 +} + +[0x2315] +{ +get=base_item +name=Mini House: Malas Mountain Pass Part 2 +id=0x2315 +weight=1000 +movable=1 +} + +[0x2314] +{ +get=base_item +name=Mini House: Malas Mountain Pass Part 3 +id=0x2314 +weight=1000 +movable=1 +} + +[0x2313] +{ +get=base_item +name=Mini House: Malas Mountain Pass Part 4 +id=0x2313 +weight=1000 +movable=1 +} + +// Base Item for Mini House: Church at Night +[0x2318] +{ +get=base_item +name=Mini House: Church at Night +id=0x2318 +weight=1000 +movable=1 +} \ No newline at end of file diff --git a/data/dfndata/items/deeds/minihouseaddon_deeds.dfn b/data/dfndata/items/deeds/minihouseaddon_deeds.dfn new file mode 100644 index 000000000..0e516c52f --- /dev/null +++ b/data/dfndata/items/deeds/minihouseaddon_deeds.dfn @@ -0,0 +1,79 @@ +// Deed for Stone and Plaster Mini House +[stoneandplastermini] +{ +name=Mini House: Stone and Plaster +id=0x14F0 +morex=500 +} + +// Deed for Field Stone Mini House +[fieldstonemini] +{ +name=Mini House: Field Stone +id=0x14F0 +morex=501 +} + +// Deed for Small Brick Mini House +[smallbrickmini] +{ +name=Mini House: Small Brick +id=0x14F0 +morex=502 +} + +// Deed for Wooden Mini House +[woodenmini] +{ +name=Mini House: Wooden +id=0x14F0 +morex=503 +} + +// Deed for Wood and Plaster Mini House +[woodandplastermini] +{ +name=Mini House: Wood and Plaster +id=0x14F0 +morex=504 +} + +// Deed for Thatched-Roof Cottage Mini House +[thatchedroofcottage] +{ +name=Mini House: Thatched-Roof Cottage +id=0x14F0 +morex=505 +} + +// Deed for Brick Mini House +[brickmini] +{ +name=Mini House: Brick +id=0x14F0 +morex=506 +} + +// Deed for Two-Story Wood and Plaster Mini House +[twostorywoodandplastermini] +{ +name=Mini House: Two-Story Wood and Plaster +id=0x14F0 +morex=507 +} + +// Deed for Malas Mountain Pass Mini House +[malasmountainpassmini] +{ +name=Mini House: Malas Mountain Pass +id=0x14F0 +morex=508 +} + +// Deed for Church at Night Mini House +[churchatnightmini] +{ +name=Mini House: Church at Night +id=0x14F0 +morex=509 +} \ No newline at end of file From 887534411e975a07e370576281fee27e6e12b349 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 12 Oct 2024 23:36:05 -0500 Subject: [PATCH 05/19] Update minihouse_parts.dfn --- .../building/furniture/minihouse_parts.dfn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/data/dfndata/items/building/furniture/minihouse_parts.dfn b/data/dfndata/items/building/furniture/minihouse_parts.dfn index 6e308fa08..9385ee133 100644 --- a/data/dfndata/items/building/furniture/minihouse_parts.dfn +++ b/data/dfndata/items/building/furniture/minihouse_parts.dfn @@ -6,6 +6,7 @@ name=Mini House: Stone and Plaster id=0x22C4 weight=1000 movable=1 +origin=aos } // Base Item for Mini House: Field Stone @@ -16,6 +17,7 @@ name=Mini House: Field Stone id=0x22DE weight=1000 movable=1 +origin=aos } // Base Item for Mini House: Small Brick @@ -26,6 +28,7 @@ name=Mini House: Small Brick id=0x22DF weight=1000 movable=1 +origin=aos } // Base Item for Mini House: Wooden @@ -36,6 +39,7 @@ name=Mini House: Wooden id=0x22C9 weight=1000 movable=1 +origin=aos } // Base Item for Mini House: Wood and Plaster @@ -46,6 +50,7 @@ name=Mini House: Wood and Plaster id=0x22E0 weight=1000 movable=1 +origin=aos } // Base Item for Mini House: Thatched-Roof Cottage @@ -56,6 +61,7 @@ name=Mini House: Thatched-Roof Cottage id=0x22E1 weight=1000 movable=1 +origin=aos } // Base Items for Mini House: Brick @@ -66,6 +72,7 @@ name=Mini House: Brick Part 1 id=0x22CD weight=1000 movable=1 +origin=aos } [0x22CB] @@ -75,6 +82,7 @@ name=Mini House: Brick Part 2 id=0x22CB weight=1000 movable=1 +origin=aos } [0x22CC] @@ -84,6 +92,7 @@ name=Mini House: Brick Part 3 id=0x22CC weight=1000 movable=1 +origin=aos } [0x22CA] @@ -93,6 +102,7 @@ name=Mini House: Brick Part 4 id=0x22CA weight=1000 movable=1 +origin=aos } // Base Items for Mini House: Two-Story Wood and Plaster @@ -103,6 +113,7 @@ name=Mini House: Two-Story Wood and Plaster Part 1 id=0x2301 weight=1000 movable=1 +origin=aos } [0x2302] @@ -112,6 +123,7 @@ name=Mini House: Two-Story Wood and Plaster Part 2 id=0x2302 weight=1000 movable=1 +origin=aos } [0x2304] @@ -121,6 +133,7 @@ name=Mini House: Two-Story Wood and Plaster Part 3 id=0x2304 weight=1000 movable=1 +origin=aos } [0x2303] @@ -130,6 +143,7 @@ name=Mini House: Two-Story Wood and Plaster Part 4 id=0x2303 weight=1000 movable=1 +origin=aos } // Base Items for Mini House: Malas Mountain Pass @@ -140,6 +154,7 @@ name=Mini House: Malas Mountain Pass Part 1 id=0x2316 weight=1000 movable=1 +origin=aos } [0x2315] @@ -149,6 +164,7 @@ name=Mini House: Malas Mountain Pass Part 2 id=0x2315 weight=1000 movable=1 +origin=aos } [0x2314] @@ -158,6 +174,7 @@ name=Mini House: Malas Mountain Pass Part 3 id=0x2314 weight=1000 movable=1 +origin=aos } [0x2313] @@ -167,6 +184,7 @@ name=Mini House: Malas Mountain Pass Part 4 id=0x2313 weight=1000 movable=1 +origin=aos } // Base Item for Mini House: Church at Night @@ -177,4 +195,5 @@ name=Mini House: Church at Night id=0x2318 weight=1000 movable=1 +origin=aos } \ No newline at end of file From afed30f0eadc1b3d98202a6405f52ec8f2459f6b Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 12 Oct 2024 23:38:33 -0500 Subject: [PATCH 06/19] Update furniture_ml.dfn --- .../items/building/furniture/furniture_ml.dfn | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/data/dfndata/items/building/furniture/furniture_ml.dfn b/data/dfndata/items/building/furniture/furniture_ml.dfn index fa2d2a8fe..89bfaff42 100644 --- a/data/dfndata/items/building/furniture/furniture_ml.dfn +++ b/data/dfndata/items/building/furniture/furniture_ml.dfn @@ -6,6 +6,7 @@ name=Elven Bed (East) Part 1 id=0x304D weight=1000 movable=1 +origin=ml } [0x304C] @@ -15,6 +16,7 @@ name=Elven Bed (East) Part 2 id=0x304C weight=1000 movable=1 +origin=ml } // Elven Bed (South) @@ -25,6 +27,7 @@ name=Elven Bed (South) Part 1 id=0x3050 weight=1000 movable=1 +origin=ml } [0x3051] @@ -34,6 +37,7 @@ name=Elven Bed (South) Part 2 id=0x3051 weight=1000 movable=1 +origin=ml } // Alchemist Table (East) @@ -44,6 +48,7 @@ name=Alchemist Table (East) Part 1 id=0x3077 weight=1000 movable=1 +origin=ml } [0x3078] @@ -53,6 +58,7 @@ name=Alchemist Table (East) Part 2 id=0x3078 weight=1000 movable=1 +origin=ml } // Alchemist Table (South) @@ -63,6 +69,7 @@ name=Alchemist Table (South) Part 1 id=0x3079 weight=1000 movable=1 +origin=ml } [0x307A] @@ -72,6 +79,7 @@ name=Alchemist Table (South) Part 2 id=0x307A weight=1000 movable=1 +origin=ml } // Elven Loveseat (East) @@ -82,6 +90,7 @@ name=Elven Loveseat (East) Part 1 id=0x3089 weight=1000 movable=1 +origin=ml } [0x3088] @@ -91,6 +100,7 @@ name=Elven Loveseat (East) Part 2 id=0x3088 weight=1000 movable=1 +origin=ml } // Elven Loveseat (South) @@ -101,6 +111,7 @@ name=Elven Loveseat (South) Part 1 id=0x308A weight=1000 movable=1 +origin=ml } [0x308B] @@ -110,6 +121,7 @@ name=Elven Loveseat (South) Part 2 id=0x308B weight=1000 movable=1 +origin=ml } // Elven Wash Basin (East) @@ -120,6 +132,7 @@ name=Elven Wash Basin (East) Part 1 id=0x30DF weight=1000 movable=1 +origin=ml } [0x30E0] @@ -129,6 +142,7 @@ name=Elven Wash Basin (East) Part 2 id=0x30E0 weight=1000 movable=1 +origin=ml } // Elven Wash Basin (South) @@ -139,6 +153,7 @@ name=Elven Wash Basin (South) Part 1 id=0x30E1 weight=1000 movable=1 +origin=ml } [0x30E2] @@ -148,6 +163,7 @@ name=Elven Wash Basin (South) Part 2 id=0x30E2 weight=1000 movable=1 +origin=ml } // Fancy Couch (East) @@ -158,6 +174,7 @@ name=Fancy Couch (East) Part 1 id=0x4C8C weight=1000 movable=1 +origin=ml } [0x4C8A] @@ -167,6 +184,7 @@ name=Fancy Couch (East) Part 2 id=0x4C8A weight=1000 movable=1 +origin=ml } [0x4C8B] @@ -176,6 +194,7 @@ name=Fancy Couch (East) Part 3 id=0x4C8B weight=1000 movable=1 +origin=ml } // Fancy Couch (North) @@ -186,6 +205,7 @@ name=Fancy Couch (North) Part 1 id=0x9C62 weight=1000 movable=1 +origin=ml } [0x9C61] @@ -195,6 +215,7 @@ name=Fancy Couch (North) Part 2 id=0x9C61 weight=1000 movable=1 +origin=ml } [0x9C60] @@ -204,6 +225,7 @@ name=Fancy Couch (North) Part 3 id=0x9C60 weight=1000 movable=1 +origin=ml } // Fancy Couch (South) @@ -214,6 +236,7 @@ name=Fancy Couch (South) Part 1 id=0x4C8D weight=1000 movable=1 +origin=ml } [0x4C8E] @@ -223,6 +246,7 @@ name=Fancy Couch (South) Part 2 id=0x4C8E weight=1000 movable=1 +origin=ml } [0x4C8F] @@ -232,6 +256,7 @@ name=Fancy Couch (South) Part 3 id=0x4C8F weight=1000 movable=1 +origin=ml } // Fancy Couch (West) @@ -242,6 +267,7 @@ name=Fancy Couch (West) Part 1 id=0x9C5F weight=1000 movable=1 +origin=ml } [0x9C5E] @@ -251,6 +277,7 @@ name=Fancy Couch (West) Part 2 id=0x9C5E weight=1000 movable=1 +origin=ml } [0x9C5D] @@ -260,6 +287,7 @@ name=Fancy Couch (West) Part 3 id=0x9C5D weight=1000 movable=1 +origin=ml } // Hardwood Table (East) @@ -270,6 +298,7 @@ name=Hardwood Table (East) Part 1 id=0x3094 weight=1000 movable=1 +origin=ml } [0x3093] @@ -279,6 +308,7 @@ name=Hardwood Table (East) Part 2 id=0x3093 weight=1000 movable=1 +origin=ml } [0x3092] @@ -288,6 +318,7 @@ name=Hardwood Table (East) Part 3 id=0x3092 weight=1000 movable=1 +origin=ml } // Hardwood Table (South) @@ -298,6 +329,7 @@ name=Hardwood Table (South) Part 1 id=0x3095 weight=1000 movable=1 +origin=ml } [0x3096] @@ -307,6 +339,7 @@ name=Hardwood Table (South) Part 2 id=0x3096 weight=1000 movable=1 +origin=ml } [0x3097] @@ -316,6 +349,7 @@ name=Hardwood Table (South) Part 3 id=0x3097 weight=1000 movable=1 +origin=ml } // Ornate Table (East) @@ -326,6 +360,7 @@ name=Ornate Table (East) Part 1 id=0x308F weight=1000 movable=1 +origin=ml } [0x3090] @@ -335,6 +370,7 @@ name=Ornate Table (East) Part 2 id=0x3090 weight=1000 movable=1 +origin=ml } [0x3091] @@ -344,6 +380,7 @@ name=Ornate Table (East) Part 3 id=0x3091 weight=1000 movable=1 +origin=ml } // Ornate Table (South) @@ -354,6 +391,7 @@ name=Ornate Table (South) Part 1 id=0x308E weight=1000 movable=1 +origin=ml } [0x308D] @@ -363,6 +401,7 @@ name=Ornate Table (South) Part 2 id=0x308D weight=1000 movable=1 +origin=ml } [0x308C] @@ -372,6 +411,7 @@ name=Ornate Table (South) Part 3 id=0x308C weight=1000 movable=1 +origin=ml } // Plush Loveseat (East) @@ -382,6 +422,7 @@ name=Plush Loveseat (East) Part 1 id=0x4C84 weight=1000 movable=1 +origin=ml } [0x4C85] @@ -391,6 +432,7 @@ name=Plush Loveseat (East) Part 2 id=0x4C85 weight=1000 movable=1 +origin=ml } // Plush Loveseat (South) @@ -401,6 +443,7 @@ name=Plush Loveseat (South) Part 1 id=0x4C83 weight=1000 movable=1 +origin=ml } [0x4C82] @@ -410,6 +453,7 @@ name=Plush Loveseat (South) Part 2 id=0x4C82 weight=1000 movable=1 +origin=ml } // Tall Elven Bed (East) @@ -420,6 +464,7 @@ name=Tall Elven Bed (East) Part 1 id=0x3054 weight=1000 movable=1 +origin=ml } [0x3053] @@ -429,6 +474,7 @@ name=Tall Elven Bed (East) Part 2 id=0x3053 weight=1000 movable=1 +origin=ml } [0x3055] @@ -438,6 +484,7 @@ name=Tall Elven Bed (East) Part 3 id=0x3055 weight=1000 movable=1 +origin=ml } [0x3052] @@ -447,6 +494,7 @@ name=Tall Elven Bed (East) Part 4 id=0x3052 weight=1000 movable=1 +origin=ml } // Tall Elven Bed (South) @@ -457,6 +505,7 @@ name=Tall Elven Bed (South) Part 1 id=0x3058 weight=1000 movable=1 +origin=ml } [0x3057] @@ -466,6 +515,7 @@ name=Tall Elven Bed (South) Part 2 id=0x3057 weight=1000 movable=1 +origin=ml } [0x3059] @@ -475,6 +525,7 @@ name=Tall Elven Bed (South) Part 3 id=0x3059 weight=1000 movable=1 +origin=ml } [0x3056] @@ -484,4 +535,5 @@ name=Tall Elven Bed (South) Part 4 id=0x3056 weight=1000 movable=1 +origin=ml } \ No newline at end of file From ad394e1f0ccf7d4038d291d38ec7c322ef39a077 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Mon, 14 Oct 2024 19:54:36 -0500 Subject: [PATCH 07/19] CheckInstaLog Added Added the CheckInstaLog function to check if a specific location is within an instant logout zone (SEFunctions.cpp). --- docs/jsdocs.html | 1167 +++++++++++++++++++++------------------- source/Changelog.txt | 3 + source/SEFunctions.cpp | 40 ++ source/SEFunctions.h | 2 + source/cScript.cpp | 1 + 5 files changed, 648 insertions(+), 565 deletions(-) diff --git a/docs/jsdocs.html b/docs/jsdocs.html index 8dbe347a8..98d42d786 100644 --- a/docs/jsdocs.html +++ b/docs/jsdocs.html @@ -6339,80 +6339,113 @@

January 9th, 2022

  • Miscellaneous Functions
    -
    +
    -
    - - -
    -
    -

    Prototype

    -

    int BASEITEMSERIAL();

    -

    int INVALIDSERIAL();

    -

    int INVALIDID();

    -

    int INVALIDCOLOUR();

    -
    -
    -

    Purpose

    -

    BASEITEMSERIAL() - Gets the constant that defines the base value used as starting point for item serials. If an object serial is lower than this, it probably belongs to a character. If it's higher, it belongs to an item.
    - INVALIDSERIAL() - Gets the constant defining an invalid serial. If an object serial matches this, it's invalid!
    - INVALIDID() - Gets the constant defining an invalid ID. If an object's ID matches this, it's probably not a valid ID!
    - INVALIDCOLOUR() - Gets the constant defining an invalid colour. If an object's colour is equal or higher than this, it's probably not a valid colour!

    -
    -
    -

    Example of usage

    -
    var baseItemSerial = BASEITEMSERIAL();
    +                        
    + + +
    +
    +

    Prototype

    +

    int BASEITEMSERIAL();

    +

    int INVALIDSERIAL();

    +

    int INVALIDID();

    +

    int INVALIDCOLOUR();

    +
    +
    +

    Purpose

    +

    + BASEITEMSERIAL() - Gets the constant that defines the base value used as starting point for item serials. If an object serial is lower than this, it probably belongs to a character. If it's higher, it belongs to an item.
    + INVALIDSERIAL() - Gets the constant defining an invalid serial. If an object serial matches this, it's invalid!
    + INVALIDID() - Gets the constant defining an invalid ID. If an object's ID matches this, it's probably not a valid ID!
    + INVALIDCOLOUR() - Gets the constant defining an invalid colour. If an object's colour is equal or higher than this, it's probably not a valid colour! +

    +
    +
    +

    Example of usage

    +
    var baseItemSerial = BASEITEMSERIAL();
     var invalidSerial = INVALIDSERIAL();
     var invalidID = INVALIDID();
     var invalidColour = INVALIDCOLOUR();
     									
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    PARTY CreateParty( partyleader );

    -
    -
    -

    Purpose

    -

    Create a new party/group with the specified character as leader

    -
    -
    -

    Example of usage

    -
    // Create a new party (myParty) with pUser as the leader
    +                        
    + + +
    +
    +

    Prototype

    +

    PARTY CreateParty( partyleader );

    +
    +
    +

    Purpose

    +

    Create a new party/group with the specified character as leader

    +
    +
    +

    Example of usage

    +
    // Create a new party (myParty) with pUser as the leader
     var myParty = CreateParty( pUser );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int DistanceBetween( x1, y1, x2, y2 );

    -

    int DistanceBetween( x1, y1, z1, x2, y2, z2 );

    -

    int DistanceBetween( objA, objB );

    -

    int DistanceBetween( objA, objB, checkZ );

    -
    -
    -

    Purpose

    -

    Get the distance between two sets of coordinates or objects on either 2D or 3D plane

    -
    -
    -

    Notes

    -

    Parameters: x1, y1, z1, x2, y2, z2 = coordinates
    - checkZ = true if distance between two objects should take into account Z axis

    -
    -
    -

    Example of usage

    -
    // Get distance between two sets of x, y coordinates
    +                        
    + + +
    +
    +

    Prototype

    +

    JSBool CheckInstaLog( x, y, world, instanceID );

    +
    +
    +

    Purpose

    +

    Checks if a specific location ( x, y, world, instanceID ) is within an instant logout zone.

    +
    +
    +

    Example of usage

    +
    // Check if the player is in an instant logout zone
    +var isInstaLog = CheckInstaLog(targX, targY, worldNumber, instanceID);
    +
    +if( isInstaLog )
    +{
    +    // Handle instant logout
    +}
    +else
    +{
    +    // Handle other logout scenarios
    +}
    +
    +
    +
    + +
    + + +
    +
    +

    Prototype

    +

    int DistanceBetween( x1, y1, x2, y2 );

    +

    int DistanceBetween( x1, y1, z1, x2, y2, z2 );

    +

    int DistanceBetween( objA, objB );

    +

    int DistanceBetween( objA, objB, checkZ );

    +
    +
    +

    Purpose

    +

    Get the distance between two sets of coordinates or objects on either 2D or 3D plane

    +
    +
    +

    Notes

    +

    + Parameters: x1, y1, z1, x2, y2, z2 = coordinates
    + checkZ = true if distance between two objects should take into account Z axis +

    +
    +
    +

    Example of usage

    +
    // Get distance between two sets of x, y coordinates
     var distance1 = DistanceBetween( pUser.x, pUser.y, iUsed.x, iUsed.y );
     
     // Get distance between two sets of x, y, z coordinates
    @@ -6423,157 +6456,159 @@ 

    January 9th, 2022

    // Get distance between pUser and iUsed using 3D coordinates var distance2 = DistanceBetween( pUser, iUsed, true );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool DoesEventExist( scriptID, eventToCheck );

    -
    -
    -

    Purpose

    -

    Check for existence of a named JS event/function in another script

    -
    -
    -

    Notes

    -

    Parameters: scriptID = ID of the script to check
    - eventToCheck = name of event/function to look for

    -
    -
    -

    Example of usage

    -
    // Check if a custom function exists in a specific script (0), and trigger it with TriggerEvent() if it does:
    +                        
    + + +
    +
    +

    Prototype

    +

    bool DoesEventExist( scriptID, eventToCheck );

    +
    +
    +

    Purpose

    +

    Check for existence of a named JS event/function in another script

    +
    +
    +

    Notes

    +

    + Parameters: scriptID = ID of the script to check
    + eventToCheck = name of event/function to look for +

    +
    +
    +

    Example of usage

    +
    // Check if a custom function exists in a specific script (0), and trigger it with TriggerEvent() if it does:
     if( DoesEventExist( 0, "MyCustomFunction" ))
     {
     	TriggerEvent( 0, "MyCustomFunction", [additional parameters] );
     }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int GetAccountCount();

    -
    -
    -

    Purpose

    -

    Gets the total amount of accounts on the server

    -
    -
    -

    Example of usage

    -
    var totalAccounts = GetAccountCount();
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    int GetAccountCount();

    +
    +
    +

    Purpose

    +

    Gets the total amount of accounts on the server

    +
    +
    +

    Example of usage

    +
    var totalAccounts = GetAccountCount();
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool GetClientFeature( ClientFeaturesBitNum );

    -
    -
    -

    Purpose

    -

    Check if a specific client features is enabled. For a list of features that can be checked this way, see [settings]->clientFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    -
    -
    -

    Example of usage

    -
    // AoS bit from list of client features
    +                        
    + + +
    +
    +

    Prototype

    +

    bool GetClientFeature( ClientFeaturesBitNum );

    +
    +
    +

    Purpose

    +

    Check if a specific client features is enabled. For a list of features that can be checked this way, see [settings]->clientFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    +
    +
    +

    Example of usage

    +
    // AoS bit from list of client features
     var aosFeaturesEnabled = GetClientFeature( 0x10 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    string GetDictionaryEntry( entryNum [, language ] );

    -
    -
    -

    Purpose

    -

    Pulls entry from the dictionary file based on language (or server default, if no language parameter is ).

    -
    -
    -

    Example of usage

    -
    var textString = GetDictionaryEntry( 1, socket.language );
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    string GetDictionaryEntry( entryNum [, language ] );

    +
    +
    +

    Purpose

    +

    Pulls entry from the dictionary file based on language (or server default, if no language parameter is ).

    +
    +
    +

    Example of usage

    +
    var textString = GetDictionaryEntry( 1, socket.language );
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int GetMurderThreshold();

    -
    -
    -

    Purpose

    -

    Returns the number of kills needed to be branded as a murderer and turn red.

    -
    -
    -

    Notes

    -

    See also: Character .murderCount and .murderer properties

    -
    -
    -

    Example of usage

    -
    if( GetMurderThreshold() > pTalking.murderCount )
    +                        
    + + +
    +
    +

    Prototype

    +

    int GetMurderThreshold();

    +
    +
    +

    Purpose

    +

    Returns the number of kills needed to be branded as a murderer and turn red.

    +
    +
    +

    Notes

    +

    See also: Character .murderCount and .murderer properties

    +
    +
    +

    Example of usage

    +
    if( GetMurderThreshold() > pTalking.murderCount )
     {
     	TextMessage( pTalkingTo, "Surely sir, you must be a murderer.  I bid you adieu" );
     	EmoteMessage( pTalkingTo, "*scampers off*" );
     }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int GetPlayerCount();

    -
    -
    -

    Purpose

    -

    Gets the total amount of players online on the server

    -
    -
    -

    Example of usage

    -
    var totalOnlinePlayers = GetPlayerCount();
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    int GetPlayerCount();

    +
    +
    +

    Purpose

    +

    Gets the total amount of players online on the server

    +
    +
    +

    Example of usage

    +
    var totalOnlinePlayers = GetPlayerCount();
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    SOSObject GetRandomSOSArea( worldNum, instanceID );

    -
    -
    -

    Purpose

    -

    Gets a random SOS area from list of such areas loaded from [SOSAREAS] section of regions.dfn

    -
    -
    -

    Example of usage

    -
    // Fetch reference to a random SOS area
    +                        
    + + +
    +
    +

    Prototype

    +

    SOSObject GetRandomSOSArea( worldNum, instanceID );

    +
    +
    +

    Purpose

    +

    Gets a random SOS area from list of such areas loaded from [SOSAREAS] section of regions.dfn

    +
    +
    +

    Example of usage

    +
    // Fetch reference to a random SOS area
     var sosArea = GetRandomSOSArea( pUser.worldNum, pUser.instanceID );
     
     // Pick a random location within the selected sosArea
    @@ -6587,112 +6622,112 @@ 

    January 9th, 2022

    sosMsg.more = sosMsg.instanceID; // See UOX3/js/item/waterstainedsos.js for full example, including validation for whether the chosen location is suitable, and not blocked by dynamic items, static items or map tiles
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool GetServerFeature( ServerFeaturesBitNum );

    -
    -
    -

    Purpose

    -

    Check if a specific server features is enabled. For a list of features that can be checked this way, see [settings]->serverFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    -
    -
    -

    Example of usage

    -
    // ContextMenus bit from list of server features
    +                        
    + + +
    +
    +

    Prototype

    +

    bool GetServerFeature( ServerFeaturesBitNum );

    +
    +
    +

    Purpose

    +

    Check if a specific server features is enabled. For a list of features that can be checked this way, see [settings]->serverFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    +
    +
    +

    Example of usage

    +
    // ContextMenus bit from list of server features
     var contextMenusEnabled = GetServerFeature( 0x08 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    string GetServerSetting( serverSettingString );

    -
    -
    -

    Purpose

    -

    Fetches the value of a specified server setting and returns it as a string. Wrap in parseInt() if expected value returned is an int.

    -
    -
    -

    Example of usage

    -
    // Returns 1 if GUARDSACTIVE is set to 1 in UOX.INI, or 0 if set to 0.
    +                        
    + + +
    +
    +

    Prototype

    +

    string GetServerSetting( serverSettingString );

    +
    +
    +

    Purpose

    +

    Fetches the value of a specified server setting and returns it as a string. Wrap in parseInt() if expected value returned is an int.

    +
    +
    +

    Example of usage

    +
    // Returns 1 if GUARDSACTIVE is set to 1 in UOX.INI, or 0 if set to 0.
     var guardsActive = GetServerSetting( "GUARDSACTIVE" );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    SOCKET GetSocketFromIndex( socketIndex );

    -
    -
    -

    Purpose

    -

    Create a socket-object based on the specified socketIndex

    -
    -
    -

    Example of usage

    -
    // Fetch whichever socket is connected to the server as socket/connection 0
    +                        
    + + +
    +
    +

    Prototype

    +

    SOCKET GetSocketFromIndex( socketIndex );

    +
    +
    +

    Purpose

    +

    Create a socket-object based on the specified socketIndex

    +
    +
    +

    Example of usage

    +
    // Fetch whichever socket is connected to the server as socket/connection 0
     var socket = GetSocketFromIndex( 0 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool IsInBuilding( x, y, z, world, instance, checkHeight );

    -
    -
    -

    Purpose

    -

    Returns true if specified location is inside a static building (underneath static items), or if player is inside a multi.

    -
    -
    -

    Notes

    -

    If checkHeight argument is true, player is only deemed inside a multi if there are multi-items above the player's head. If player is in a courtyard/on a rooftop, they will be deemed to be NOT in the building. checkHeight is not used for the static part of the function, only for multis.

    -
    -
    -

    Example of usage

    -
    var isCharInBuilding = IsInBuilding( myChar.x, myChar.y, myChar.z, myChar.worldnumber, myChar.instanceID, true );
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    bool IsInBuilding( x, y, z, world, instance, checkHeight );

    +
    +
    +

    Purpose

    +

    Returns true if specified location is inside a static building (underneath static items), or if player is inside a multi.

    +
    +
    +

    Notes

    +

    If checkHeight argument is true, player is only deemed inside a multi if there are multi-items above the player's head. If player is in a courtyard/on a rooftop, they will be deemed to be NOT in the building. checkHeight is not used for the static part of the function, only for multis.

    +
    +
    +

    Example of usage

    +
    var isCharInBuilding = IsInBuilding( myChar.x, myChar.y, myChar.z, myChar.worldnumber, myChar.instanceID, true );
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int IterateOver( objectType );

    -
    -
    -

    Purpose

    -

    Iterates over all objects of specified type in the world.

    -
    -
    -

    Notes

    -

    For every object it comes across, the iterator will call a function onIterate( object ) in the same script. Supported object types: "BASEOBJ", "CHARACTER", "ITEM", "SPAWNER", "MULTI", "BOAT"

    -
    -
    -

    Example of usage

    -
    var itemCount = IterateOver( "ITEM" );
    +                        
    + + +
    +
    +

    Prototype

    +

    int IterateOver( objectType );

    +
    +
    +

    Purpose

    +

    Iterates over all objects of specified type in the world.

    +
    +
    +

    Notes

    +

    For every object it comes across, the iterator will call a function onIterate( object ) in the same script. Supported object types: "BASEOBJ", "CHARACTER", "ITEM", "SPAWNER", "MULTI", "BOAT"

    +
    +
    +

    Example of usage

    +
    var itemCount = IterateOver( "ITEM" );
     Console.log( itemCount + " items found!" );
     ...
     function onIterate( myObject )
    @@ -6701,111 +6736,113 @@ 

    January 9th, 2022

    // ... optionally do something here return true; }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int Moon( moonNum );

    -

    void Moon( moonNum, newVal );

    -
    -
    -

    Purpose

    -

    Get and set the server moon values for the two moons Felucca (0) and Trammel (1)

    -
    -
    -

    Example of usage

    -
    var feluccaMoonphase = Moon( 0 );
    +                        
    + + +
    +
    +

    Prototype

    +

    int Moon( moonNum );

    +

    void Moon( moonNum, newVal );

    +
    +
    +

    Purpose

    +

    Get and set the server moon values for the two moons Felucca (0) and Trammel (1)

    +
    +
    +

    Example of usage

    +
    var feluccaMoonphase = Moon( 0 );
     var TrammelMoonphase = Moon( 1 );
     Moon( 0, 7 ); //Set the moon Felucca to moonphase 7
     Moon( 1, 3 ); //Set the moon Trammel to moonphase 3
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int RandomNumber( loNum, hiNum );

    -
    -
    -

    Purpose

    -

    Returns a random number between loNum (inclusive) and hiNum (inclusive)

    -
    -
    -

    Example of usage

    -
    var iNum = RandomNumber( 0, 10 );
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    int RandomNumber( loNum, hiNum );

    +
    +
    +

    Purpose

    +

    Returns a random number between loNum (inclusive) and hiNum (inclusive)

    +
    +
    +

    Example of usage

    +
    var iNum = RandomNumber( 0, 10 );
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    void Reload( subSystemID );

    -
    -
    -

    Purpose

    -

    Dynamically reloads one (or all) of UOX3's subsystems without having to restart UOX3

    -
    -
    -

    Notes

    -

    Supported subSystemIDs: -

      -
    • 0 - Regions/TeleportLocations
    • -
    • 1 - Spawn Regions
    • -
    • 2 - Spells
    • -
    • 3 - Commands
    • -
    • 4 - DFNs/Skills
    • -
    • 5 - JScripts
    • -
    • 6 - HTML Templates
    • -
    • 7 - INI
    • -
    • 8 - Everything
    • -
    • 9 - Accounts
    • -
    • 10 - Dictionaries
    • -

    -
    -
    -

    Example of usage

    -
    // Reload all DFNs (and Skill system)
    +                        
    + + +
    +
    +

    Prototype

    +

    void Reload( subSystemID );

    +
    +
    +

    Purpose

    +

    Dynamically reloads one (or all) of UOX3's subsystems without having to restart UOX3

    +
    +
    +

    Notes

    +

    + Supported subSystemIDs: +

      +
    • 0 - Regions/TeleportLocations
    • +
    • 1 - Spawn Regions
    • +
    • 2 - Spells
    • +
    • 3 - Commands
    • +
    • 4 - DFNs/Skills
    • +
    • 5 - JScripts
    • +
    • 6 - HTML Templates
    • +
    • 7 - INI
    • +
    • 8 - Everything
    • +
    • 9 - Accounts
    • +
    • 10 - Dictionaries
    • +
    +

    +
    +
    +

    Example of usage

    +
    // Reload all DFNs (and Skill system)
     Reload( 4 );
     
     // Reload INI file
     Reload( 7 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    void ReloadJSFile( scriptID );

    -
    -
    -

    Purpose

    -

    Dynamically reloads script with specified scriptID from jse_fileassociations.scp without having to restart UOX3

    -
    -
    -

    Notes

    -

    Cannot be used to validate sockets

    -
    -
    -

    Example of usage

    -
    // Example of how this is used by 'reloadjsfile command
    +                        
    + + +
    +
    +

    Prototype

    +

    void ReloadJSFile( scriptID );

    +
    +
    +

    Purpose

    +

    Dynamically reloads script with specified scriptID from jse_fileassociations.scp without having to restart UOX3

    +
    +
    +

    Notes

    +

    Cannot be used to validate sockets

    +
    +
    +

    Example of usage

    +
    // Example of how this is used by 'reloadjsfile command
     function CommandRegistration()
     {
     	RegisterCommand( "reloadjsfile", 3, true ); //Reload JavaScript file
    @@ -6818,70 +6855,70 @@ 

    January 9th, 2022

    ReloadJSFile( scriptID ); }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int RollDice( numDie, faces, addition );

    -
    -
    -

    Purpose

    -

    Rolls a faces sided die numDie times and adds addition. The example is for a DnD style dice like: 2d3+1

    -
    -
    -

    Example of usage

    -
    // Roll a DnD style dice of type 2d3+1 (2 dice with 3 faces, add 1 to result)
    +                        
    + + +
    +
    +

    Prototype

    +

    int RollDice( numDie, faces, addition );

    +
    +
    +

    Purpose

    +

    Rolls a faces sided die numDie times and adds addition. The example is for a DnD style dice like: 2d3+1

    +
    +
    +

    Example of usage

    +
    // Roll a DnD style dice of type 2d3+1 (2 dice with 3 faces, add 1 to result)
     var mDie = RollDice( 2, 3, 1 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool/int/string/object TriggerEvent( scriptID, "functionName", argument1, argument2 );

    -
    -
    -

    Purpose

    -

    Calls script with specified scriptID, runs function in said script that matches "functionName", with the defined function arguments. The called upon script can return a value in the form of a boolean, int, string or an object

    -
    -
    -

    Example of usage

    -
    // Calls script with ID 8000 and runs function "onUseChecked" with function parameters pUser and iUsed
    +                        
    + + +
    +
    +

    Prototype

    +

    bool/int/string/object TriggerEvent( scriptID, "functionName", argument1, argument2 );

    +
    +
    +

    Purpose

    +

    Calls script with specified scriptID, runs function in said script that matches "functionName", with the defined function arguments. The called upon script can return a value in the form of a boolean, int, string or an object

    +
    +
    +

    Example of usage

    +
    // Calls script with ID 8000 and runs function "onUseChecked" with function parameters pUser and iUsed
     var returnVal = TriggerEvent( 8000, "onUseChecked", pUser, iUsed );
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    TriggerTrap( pChar/pSock, iTrap );

    -
    -
    -

    Purpose

    -

    pChar/pSock triggers trap on iTrap object (if any trap is present on object)

    -
    -
    -

    Notes

    -

    Trap will only trigger if both first two parts of MOREZ value is set on object; first part needs to be set to 1 to indicate object is trapped, second part needs to specify damage amount to apply.

    -
    -
    -

    Example of usage

    -
    // Setup trap on iTrap object
    +                        
    + + +
    +
    +

    Prototype

    +

    TriggerTrap( pChar/pSock, iTrap );

    +
    +
    +

    Purpose

    +

    pChar/pSock triggers trap on iTrap object (if any trap is present on object)

    +
    +
    +

    Notes

    +

    Trap will only trigger if both first two parts of MOREZ value is set on object; first part needs to be set to 1 to indicate object is trapped, second part needs to specify damage amount to apply.

    +
    +
    +

    Example of usage

    +
    // Setup trap on iTrap object
     // First part of value (01) indicates object is trapped
     // Second part of value (32) defines damage dealt (32 = 0x32 = 50 damage)
     // Third (00) and Fourth (00) parts, unused here, normally indicate the min/max skill required to disarm trap
    @@ -6890,148 +6927,148 @@ 

    January 9th, 2022

    // Trigger the trap TriggerTrap( pChar, iTrap );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    void UseItem( pSock/mChar, iToUse );

    -
    -
    -

    Purpose

    -

    To allow characters (and NPCs in particular) to trigger item-use functionality of items

    -
    -
    -

    Notes

    -

    Either a socket or a character can be passed in as a parameter of the UseItem function. If a socket is passed in, UOX3 will derive the character using the item from said socket.

    -
    -
    -

    Example of usage

    -
    // If an item has type 12, make NPC use the door to open it
    +                        
    + + +
    +
    +

    Prototype

    +

    void UseItem( pSock/mChar, iToUse );

    +
    +
    +

    Purpose

    +

    To allow characters (and NPCs in particular) to trigger item-use functionality of items

    +
    +
    +

    Notes

    +

    Either a socket or a character can be passed in as a parameter of the UseItem function. If a socket is passed in, UOX3 will derive the character using the item from said socket.

    +
    +
    +

    Example of usage

    +
    // If an item has type 12, make NPC use the door to open it
     if( myItem.type == 12 )
     {
     	mChar.TextMessage( "A door! What's on the other side?" );
     	UseItem( mChar, iToUse );
     }
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool ValidateObject( object );

    -
    -
    -

    Purpose

    -

    Returns true if argument is a valid object (Item, Character, Multi, Boat, Spawner)

    -
    -
    -

    Notes

    -

    Cannot be used to validate sockets

    -
    -
    -

    Example of usage

    -
    if( !ValidateObject( iUsed ))
    +                        
    + + +
    +
    +

    Prototype

    +

    bool ValidateObject( object );

    +
    +
    +

    Purpose

    +

    Returns true if argument is a valid object (Item, Character, Multi, Boat, Spawner)

    +
    +
    +

    Notes

    +

    Cannot be used to validate sockets

    +
    +
    +

    Example of usage

    +
    if( !ValidateObject( iUsed ))
     	return;
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    [int] WorldBrightLevel( [lightlevel] );

    -
    -
    -

    Purpose

    -

    Get/Set the "maximum brightness" light-level for daytime across the entire world

    -
    -
    -

    Notes

    -

    If no parameter is provided, function will return current "maximum brightness" light-level for daytime instead.

    -
    -
    -

    Example of usage

    -
    // Set maximum world brightness level to 1
    +                        
    + + +
    +
    +

    Prototype

    +

    [int] WorldBrightLevel( [lightlevel] );

    +
    +
    +

    Purpose

    +

    Get/Set the "maximum brightness" light-level for daytime across the entire world

    +
    +
    +

    Notes

    +

    If no parameter is provided, function will return current "maximum brightness" light-level for daytime instead.

    +
    +
    +

    Example of usage

    +
    // Set maximum world brightness level to 1
     WorldBrightLevel( 1 );
     
     // Get current maximum world brightness level
     var lightLevel = WorldBrightLevel();
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    [int] WorldDarkLevel( [lightlevel] );

    -
    -
    -

    Purpose

    -

    Get/Set the "minimum brightness" light-level for night-time across the entire world

    -
    -
    -

    Notes

    -

    If no parameter is provided, function will return current "minimum brightness" light-level for night-time instead.

    -
    -
    -

    Example of usage

    -
    // Set minimum world brightness level to 15
    +                        
    + + +
    +
    +

    Prototype

    +

    [int] WorldDarkLevel( [lightlevel] );

    +
    +
    +

    Purpose

    +

    Get/Set the "minimum brightness" light-level for night-time across the entire world

    +
    +
    +

    Notes

    +

    If no parameter is provided, function will return current "minimum brightness" light-level for night-time instead.

    +
    +
    +

    Example of usage

    +
    // Set minimum world brightness level to 15
     WorldDarkLevel( 15 );
     
     // Get current maximum world brightness level
     var lightLevel = WorldDarkLevel();
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    [int] WorldDungeonLevel( [lightlevel] );

    -
    -
    -

    Purpose

    -

    Get/Set the fixed light-level for any regions marked as dungeons

    -
    -
    -

    Notes

    -

    If no parameter is provided, function will return current fixed light-level for dungeons instead.

    -
    -
    -

    Example of usage

    -
    // Set fixed dungeon light level to 12
    +                        
    + + +
    +
    +

    Prototype

    +

    [int] WorldDungeonLevel( [lightlevel] );

    +
    +
    +

    Purpose

    +

    Get/Set the fixed light-level for any regions marked as dungeons

    +
    +
    +

    Notes

    +

    If no parameter is provided, function will return current fixed light-level for dungeons instead.

    +
    +
    +

    Example of usage

    +
    // Set fixed dungeon light level to 12
     WorldDungeonLevel( 12 );
     
     // Get current fixed light level of dungeons
     var lightLevel = WorldDungeonLevel();
     
    -
    -
    -
    +
    +
    +
    -
    +
  • diff --git a/source/Changelog.txt b/source/Changelog.txt index f64afbc32..ca281ff53 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,6 @@ +14/10/2024 - Dragon Slayer +    Added the CheckInstaLog function to check if a specific location is within an instant logout zone (SEFunctions.cpp). (thanks, Xuri) + 1/05/2024 - Dragon Slayer/Xuri Fixed AutoUnequipAttempt function in clumsy.js, createfood.js level1target.js, will no longer fail on casting and return to hardcode. Fixed createfood to check for reagents on cast. diff --git a/source/SEFunctions.cpp b/source/SEFunctions.cpp index 1700d8e55..92d74c28b 100644 --- a/source/SEFunctions.cpp +++ b/source/SEFunctions.cpp @@ -287,6 +287,46 @@ JSBool SE_CalcCharFromSer( JSContext *cx, [[maybe_unused]] JSObject *obj, uintN return JS_TRUE; } +//o------------------------------------------------------------------------------------------------o +//| Function - SE_CheckInstaLog() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Checks if a specific location is within an instant logout zone +//o------------------------------------------------------------------------------------------------o +JSBool SE_CheckInstaLog( JSContext *cx, [[maybe_unused]] JSObject *obj, uintN argc, jsval *argv, jsval *rval ) +{ + if( argc != 4 ) + { + ScriptError( cx, "CheckInstaLog: Invalid number of parameters (4)" ); + return JS_FALSE; + } + + SI16 targX = static_cast( JSVAL_TO_INT( argv[0] )); + SI16 targY = static_cast( JSVAL_TO_INT( argv[1] )); + UI08 targWorld = static_cast( JSVAL_TO_INT( argv[2] )); + UI16 targInstanceId = static_cast( JSVAL_TO_INT( argv[3] )); + + auto logLocs = cwmWorldState->logoutLocs; + + *rval = JSVAL_FALSE; + + if( logLocs.size() > 0 ) + { + for( size_t i = 0; i < logLocs.size(); ++i ) + { + if( logLocs[i].worldNum == targWorld && logLocs[i].instanceId == targInstanceId ) + { + if(( targX >= logLocs[i].x1 && targX <= logLocs[i].x2 ) && ( targY >= logLocs[i].y1 && targY <= logLocs[i].y2 )) + { + *rval = JSVAL_TRUE; + return JS_TRUE; + } + } + } + } + + return JS_TRUE; +} + //o------------------------------------------------------------------------------------------------o //| Function - SE_DoMovingEffect() //o------------------------------------------------------------------------------------------------o diff --git a/source/SEFunctions.h b/source/SEFunctions.h index 904a1fabd..adde69ee0 100644 --- a/source/SEFunctions.h +++ b/source/SEFunctions.h @@ -47,6 +47,8 @@ SEngineFunc SE_CalcCharFromSer; // *** SEngineFunc SE_CalcItemFromSer; // *** SEngineFunc SE_CalcMultiFromSer; // *** +SEngineFunc SE_CheckInstaLog; + SEngineFunc SE_MakeItem; // *** SEngineFunc SE_CommandLevelReq; // * diff --git a/source/cScript.cpp b/source/cScript.cpp index 88ef1a0e6..d92186313 100644 --- a/source/cScript.cpp +++ b/source/cScript.cpp @@ -55,6 +55,7 @@ static JSFunctionSpec my_functions[] = { "CalcCharFromSer", SE_CalcCharFromSer, 1, 0, 0 }, { "CalcItemFromSer", SE_CalcItemFromSer, 1, 0, 0 }, { "CalcMultiFromSer", SE_CalcMultiFromSer, 1, 0, 0 }, + { "CheckInstaLog", SE_CheckInstaLog, 4, 0, 0 }, { "GetHour", SE_GetHour, 0, 0, 0 }, { "GetMinute", SE_GetMinute, 0, 0, 0 }, { "GetDay", SE_GetDay, 0, 0, 0 }, From 41f18573df36b92b04ded82dde3f3fc9ce4dc087 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:43:54 -0600 Subject: [PATCH 08/19] Update Changelog.txt --- source/Changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/Changelog.txt b/source/Changelog.txt index b0801d426..b952eead1 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,6 @@ +12/10/2024 - Dragon Slayer + Added Mini-House Addons from ML Expansion. + 13/05/2024 - Dragon Slayer Added New Shield Type 107 so shield ID's no longer have to be in hard code for shields to work properly From 9c4ed84c30911d9779d8fa8191218e8b895735e1 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:45:36 -0600 Subject: [PATCH 09/19] Update Changelog.txt --- source/Changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/Changelog.txt b/source/Changelog.txt index b0801d426..38c2385cc 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,6 @@ +11/10/2024 - Dragon Slayer + Added ML House Addons. + 13/05/2024 - Dragon Slayer Added New Shield Type 107 so shield ID's no longer have to be in hard code for shields to work properly From 39b389d5af14c2a79db15ee903e8140442cf5b8f Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Fri, 24 Jan 2025 19:31:46 -0600 Subject: [PATCH 10/19] Update Changelog.txt --- source/Changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Changelog.txt b/source/Changelog.txt index b952eead1..833910bd3 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,5 +1,5 @@ 12/10/2024 - Dragon Slayer - Added Mini-House Addons from ML Expansion. + Added Mini-House Addons from AOS Expansion. 13/05/2024 - Dragon Slayer Added New Shield Type 107 so shield ID's no longer have to be in hard code for shields to work properly From 7d49d36150e8ddc3ab3973e51db646833115a058 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 25 Jan 2025 22:20:28 -0600 Subject: [PATCH 11/19] tabs --- docs/jsdocs.html | 70 ++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/jsdocs.html b/docs/jsdocs.html index 98d42d786..1f518d527 100644 --- a/docs/jsdocs.html +++ b/docs/jsdocs.html @@ -6372,50 +6372,50 @@

    January 9th, 2022

    -
    - - -
    -
    -

    Prototype

    -

    PARTY CreateParty( partyleader );

    -
    -
    -

    Purpose

    -

    Create a new party/group with the specified character as leader

    -
    -
    -

    Example of usage

    -
    // Create a new party (myParty) with pUser as the leader
    +						
    + + +
    +
    +

    Prototype

    +

    PARTY CreateParty( partyleader );

    +
    +
    +

    Purpose

    +

    Create a new party/group with the specified character as leader

    +
    +
    +

    Example of usage

    +
    // Create a new party (myParty) with pUser as the leader
     var myParty = CreateParty( pUser );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    JSBool CheckInstaLog( x, y, world, instanceID );

    -
    -
    -

    Purpose

    -

    Checks if a specific location ( x, y, world, instanceID ) is within an instant logout zone.

    -
    -
    -

    Example of usage

    -
    // Check if the player is in an instant logout zone
    +						
    + + +
    +
    +

    Prototype

    +

    JSBool CheckInstaLog( x, y, world, instanceID );

    +
    +
    +

    Purpose

    +

    Checks if a specific location ( x, y, world, instanceID ) is within an instant logout zone.

    +
    +
    +

    Example of usage

    +
    // Check if the player is in an instant logout zone
     var isInstaLog = CheckInstaLog(targX, targY, worldNumber, instanceID);
     
     if( isInstaLog )
     {
    -    // Handle instant logout
    +	// Handle instant logout
     }
     else
     {
    -    // Handle other logout scenarios
    +	// Handle other logout scenarios
     }
    From 6c33200e9c8359db05a3e7a2ed42e31c5c328b27 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 25 Jan 2025 22:25:17 -0600 Subject: [PATCH 12/19] Update Changelog.txt --- source/Changelog.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/Changelog.txt b/source/Changelog.txt index 02b53eb87..79ec4f3b6 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,7 @@ +10/09/2024 - Dragon Slayer + Added Puzzle Chest These are the same as the type of traps purchased from the Oddities Trader at the Lycaeum. The more lockpicking skill that you have the better 'hints' you receive. Opening the puzzle lock will unhide you. Answering incorrectly will damage you. These chests can only be unlocked by solving a puzzle. + + 12/08/2024 - Dragon Slayer Fixed an issue where Imbuing and Mysticism skills were listed in wrong order in skills.dfn and enums.h From ce6ed1d0e57710695221cf25eb34b84bfbbd2e67 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sun, 26 Jan 2025 17:41:35 -0600 Subject: [PATCH 13/19] Added puzzle chest to addmenu --- data/dfndata/items/ItemMenu.bulk.dfn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/dfndata/items/ItemMenu.bulk.dfn b/data/dfndata/items/ItemMenu.bulk.dfn index 0da06b87d..440a8d197 100644 --- a/data/dfndata/items/ItemMenu.bulk.dfn +++ b/data/dfndata/items/ItemMenu.bulk.dfn @@ -9097,6 +9097,8 @@ ADDITEM=0x0e7c ADDITEM=0x0e40 0x0e41=metal chest ADDITEM=0x0e41 +0x0e41=Puzzle Chest +ADDITEM=puzzlechest <=Previous Menu ITEMMENU=3 } From 19ba341b89fe4cc495d76fdcaa7123a729228a0b Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sun, 26 Jan 2025 20:06:11 -0600 Subject: [PATCH 14/19] update added to addmneu added origin tag --- .../{house_ml.dfn => house_addons_ml.dfn} | 0 data/dfndata/items/ItemMenu.bulk.dfn | 55 +++++++++++++++++++ data/dfndata/items/ItemMenu.dfn | 2 + .../items/deeds/houseaddon_deeds_ml.dfn | 24 ++++++++ 4 files changed, 81 insertions(+) rename data/dfndata/house/{house_ml.dfn => house_addons_ml.dfn} (100%) diff --git a/data/dfndata/house/house_ml.dfn b/data/dfndata/house/house_addons_ml.dfn similarity index 100% rename from data/dfndata/house/house_ml.dfn rename to data/dfndata/house/house_addons_ml.dfn diff --git a/data/dfndata/items/ItemMenu.bulk.dfn b/data/dfndata/items/ItemMenu.bulk.dfn index 0da06b87d..9f314dd23 100644 --- a/data/dfndata/items/ItemMenu.bulk.dfn +++ b/data/dfndata/items/ItemMenu.bulk.dfn @@ -14253,3 +14253,58 @@ ADDITEM=mapmakerspen <=Previous Menu ITEMMENU=127 } + +[ITEMMENU 260] +{ +Houseaddon_ML_Deeds.dfn +0x14F0=Elven Bed (East) +ADDITEM=elvenbedeastdeed +0x14F0=Elven Bed (South) +ADDITEM=elvenbedsouthdeed +0x14F0=Alchemist Table (East) +ADDITEM=alchemisttabledeedeast +0x14F0=Alchemist Table (South) +ADDITEM=alchemisttablesouthdeed +0x14F0=Elven Loveseat (East) +ADDITEM=elvenloveseateastdeed +0x14F0=Elven Loveseat (South) +ADDITEM=elvenloveseatsouthdeed +0x14F0=Elven Wash Basin (East) +ADDITEM=elvenwashbasineastdeed +0x14F0=Elven Wash Basin (South) +ADDITEM=elvenwashbasinsouthdeed +0x14F0=Fancy Couch (East) +ADDITEM=fancycoucheastdeed +0x14F0=Fancy Couch (North) +ADDITEM=fancycouchnorthdeed +0x14F0=Fancy Couch (South) +ADDITEM=fancycouchsouthdeed +0x14F0=Fancy Couch (West) +ADDITEM=fancycouchwestdeed +0x14F0=Hardwood Table (East) +ADDITEM=hardwoodtableeastdeed +0x14F0=Hardwood Table (South) +ADDITEM=hardwoodtablesouthdeed +0x14F0=Fancy Loveseat (East) +ADDITEM=fancyloveseateastdeed +0x14F0=Fancy Loveseat (North) +ADDITEM=fancyloveseatnorthdeed +0x14F0=Fancy Loveseat (South) +ADDITEM=fancyloveseatsouthdeed +0x14F0=Fancy Loveseat (West) +ADDITEM=fancyloveseatwestdeed +0x14F0=Ornate Table (East) +ADDITEM=ornatetableeastdeed +0x14F0=Ornate Table (South) +ADDITEM=ornatetablesouthdeed +0x14F0=Plush Loveseat (East) +ADDITEM=plushloveseateastdeed +0x14F0=Plush Loveseat (South) +ADDITEM=plushloveseatsouthdeed +0x14F0=Tall Elven Bed (East) +ADDITEM=tallelvenbedeastdeed +0x14F0=Tall Elven Bed (South) +ADDITEM=tallelvenbedsouthdeed +<=Previous Menu +ITEMMENU=4 +} diff --git a/data/dfndata/items/ItemMenu.dfn b/data/dfndata/items/ItemMenu.dfn index 7815ab7f7..4709bd0a3 100644 --- a/data/dfndata/items/ItemMenu.dfn +++ b/data/dfndata/items/ItemMenu.dfn @@ -303,6 +303,8 @@ ITEMMENU=68 ITEMMENU=69 <=Houseaddon Deeds ITEMMENU=71 +<=Houseaddon ML Deeds +ITEMMENU=260 <=Misc Deeds ITEMMENU=70 <=Previous Menu diff --git a/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn b/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn index c366542f4..59ffb2c8e 100644 --- a/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn +++ b/data/dfndata/items/deeds/houseaddon_deeds_ml.dfn @@ -4,6 +4,7 @@ name=Elven Bed (East) id=0x14F0 morex=300 +origin=ml } // Elven Bed (South) Deed @@ -12,6 +13,7 @@ morex=300 name=Elven Bed (South) id=0x14F0 morex=301 +origin=ml } // Alchemist Table (East) Deed @@ -20,6 +22,7 @@ morex=301 name=Alchemist Table (East) id=0x14F0 morex=300 +origin=ml } // Alchemist Table (South) Deed @@ -28,6 +31,7 @@ morex=300 name=Alchemist Table (South) id=0x14F0 morex=301 +origin=ml } // Elven Loveseat (East) Deed @@ -36,6 +40,7 @@ morex=301 name=Elven Loveseat (East) id=0x14F0 morex=304 +origin=ml } // Elven Loveseat (South) Deed @@ -44,6 +49,7 @@ morex=304 name=Elven Loveseat (South) id=0x14F0 morex=305 +origin=ml } // Elven Wash Basin (East) Deed @@ -52,6 +58,7 @@ morex=305 name=Elven Wash Basin (East) id=0x14F0 morex=306 +origin=ml } // Elven Wash Basin (South) Deed @@ -60,6 +67,7 @@ morex=306 name=Elven Wash Basin (South) id=0x14F0 morex=307 +origin=ml } // Fancy Couch (East) Deed @@ -68,6 +76,7 @@ morex=307 name=Fancy Couch (East) id=0x14F0 morex=308 +origin=ml } // Fancy Couch (North) Deed @@ -76,6 +85,7 @@ morex=308 name=Fancy Couch (North) id=0x14F0 morex=309 +origin=ml } // Fancy Couch (South) Deed @@ -84,6 +94,7 @@ morex=309 name=Fancy Couch (South) id=0x14F0 morex=310 +origin=ml } // Fancy Couch (West) Deed @@ -92,6 +103,7 @@ morex=310 name=Fancy Couch (West) id=0x14F0 morex=311 +origin=ml } // Hardwood Table (East) Deed @@ -100,6 +112,7 @@ morex=311 name=Hardwood Table (East) id=0x14F0 morex=312 +origin=ml } // Hardwood Table (South) Deed @@ -108,6 +121,7 @@ morex=312 name=Hardwood Table (South) id=0x14F0 morex=313 +origin=ml } // Fancy Loveseat (East) Deed @@ -116,6 +130,7 @@ morex=313 name=Fancy Loveseat (East) id=0x14F0 morex=314 +origin=ml } // Fancy Loveseat (North) Deed @@ -124,6 +139,7 @@ morex=314 name=Fancy Loveseat (North) id=0x14F0 morex=315 +origin=ml } // Fancy Loveseat (South) Deed @@ -132,6 +148,7 @@ morex=315 name=Fancy Loveseat (South) id=0x14F0 morex=316 +origin=ml } // Fancy Loveseat (West) Deed @@ -140,6 +157,7 @@ morex=316 name=Fancy Loveseat (West) id=0x14F0 morex=317 +origin=ml } // Ornate Table (East) Deed @@ -148,6 +166,7 @@ morex=317 name=Ornate Table (East) id=0x14F0 morex=318 +origin=ml } // Ornate Table (South) Deed @@ -156,6 +175,7 @@ morex=318 name=Ornate Table (South) id=0x14F0 morex=319 +origin=ml } // Plush Loveseat (East) Deed @@ -164,6 +184,7 @@ morex=319 name=Plush Loveseat (East) id=0x14F0 morex=320 +origin=ml } // Plush Loveseat (South) Deed @@ -172,6 +193,7 @@ morex=320 name=Plush Loveseat (South) id=0x14F0 morex=321 +origin=ml } // Tall Elven Bed (East) Deed @@ -180,6 +202,7 @@ morex=321 name=Tall Elven Bed (East) id=0x14F0 morex=322 +origin=ml } // Tall Elven Bed (South) Deed @@ -188,4 +211,5 @@ morex=322 name=Tall Elven Bed (South) id=0x14F0 morex=323 +origin=ml } \ No newline at end of file From 5ef75a2564906f769208aa34a5e0c3770a95af25 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:00:15 -0600 Subject: [PATCH 15/19] update added to addmenu added origin tag to the deeds. --- data/dfndata/items/ItemMenu.bulk.dfn | 27 +++++++++++++++++++ data/dfndata/items/ItemMenu.dfn | 2 ++ .../items/deeds/minihouseaddon_deeds.dfn | 10 +++++++ 3 files changed, 39 insertions(+) diff --git a/data/dfndata/items/ItemMenu.bulk.dfn b/data/dfndata/items/ItemMenu.bulk.dfn index 0da06b87d..5dd66821c 100644 --- a/data/dfndata/items/ItemMenu.bulk.dfn +++ b/data/dfndata/items/ItemMenu.bulk.dfn @@ -14253,3 +14253,30 @@ ADDITEM=mapmakerspen <=Previous Menu ITEMMENU=127 } + +[ITEMMENU 261] +{ +minihouseaddon_deeds.dfn +0x14F0=Mini House: Stone and Plaster +ADDITEM=stoneandplastermini +0x14F0=Mini House: Field Stone +ADDITEM=fieldstonemini +0x14F0=Mini House: Small Brick +ADDITEM=smallbrickmini +0x14F0=Mini House: Wooden +ADDITEM=woodenmini +0x14F0=Mini House: Wood and Plaster +ADDITEM=woodandplastermini +0x14F0=Mini House: Thatched-Roof Cottage +ADDITEM=thatchedroofcottage +0x14F0=Mini House: Brick +ADDITEM=brickmini +0x14F0=Mini House: Two-Story Wood and Plaster +ADDITEM=twostorywoodandplastermini +0x14F0=Mini House: Malas Mountain Pass +ADDITEM=malasmountainpassmini +0x14F0=Mini House: Church at Night +ADDITEM=churchatnightmini +<=Previous Menu +ITEMMENU=4 +} diff --git a/data/dfndata/items/ItemMenu.dfn b/data/dfndata/items/ItemMenu.dfn index 7815ab7f7..3c5863682 100644 --- a/data/dfndata/items/ItemMenu.dfn +++ b/data/dfndata/items/ItemMenu.dfn @@ -303,6 +303,8 @@ ITEMMENU=68 ITEMMENU=69 <=Houseaddon Deeds ITEMMENU=71 +<=Mini Houseaddon Deeds +ITEMMENU=261 <=Misc Deeds ITEMMENU=70 <=Previous Menu diff --git a/data/dfndata/items/deeds/minihouseaddon_deeds.dfn b/data/dfndata/items/deeds/minihouseaddon_deeds.dfn index 0e516c52f..e9fa79f11 100644 --- a/data/dfndata/items/deeds/minihouseaddon_deeds.dfn +++ b/data/dfndata/items/deeds/minihouseaddon_deeds.dfn @@ -4,6 +4,7 @@ name=Mini House: Stone and Plaster id=0x14F0 morex=500 +origin=aos } // Deed for Field Stone Mini House @@ -12,6 +13,7 @@ morex=500 name=Mini House: Field Stone id=0x14F0 morex=501 +origin=aos } // Deed for Small Brick Mini House @@ -20,6 +22,7 @@ morex=501 name=Mini House: Small Brick id=0x14F0 morex=502 +origin=aos } // Deed for Wooden Mini House @@ -28,6 +31,7 @@ morex=502 name=Mini House: Wooden id=0x14F0 morex=503 +origin=aos } // Deed for Wood and Plaster Mini House @@ -36,6 +40,7 @@ morex=503 name=Mini House: Wood and Plaster id=0x14F0 morex=504 +origin=aos } // Deed for Thatched-Roof Cottage Mini House @@ -44,6 +49,7 @@ morex=504 name=Mini House: Thatched-Roof Cottage id=0x14F0 morex=505 +origin=aos } // Deed for Brick Mini House @@ -52,6 +58,7 @@ morex=505 name=Mini House: Brick id=0x14F0 morex=506 +origin=aos } // Deed for Two-Story Wood and Plaster Mini House @@ -60,6 +67,7 @@ morex=506 name=Mini House: Two-Story Wood and Plaster id=0x14F0 morex=507 +origin=aos } // Deed for Malas Mountain Pass Mini House @@ -68,6 +76,7 @@ morex=507 name=Mini House: Malas Mountain Pass id=0x14F0 morex=508 +origin=aos } // Deed for Church at Night Mini House @@ -76,4 +85,5 @@ morex=508 name=Mini House: Church at Night id=0x14F0 morex=509 +origin=aos } \ No newline at end of file From 3211f67bbf77fdb8d2914b47d7126ed590051492 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:28:05 -0600 Subject: [PATCH 16/19] Update jsdocs.html --- docs/jsdocs.html | 1113 ++++++++++++++++++++++------------------------ 1 file changed, 538 insertions(+), 575 deletions(-) diff --git a/docs/jsdocs.html b/docs/jsdocs.html index b3b18a7e1..17aff972f 100644 --- a/docs/jsdocs.html +++ b/docs/jsdocs.html @@ -6351,41 +6351,39 @@

    January 9th, 2022

  • Miscellaneous Functions
    -
    +
    -
    - - -
    -
    -

    Prototype

    -

    int BASEITEMSERIAL();

    -

    int INVALIDSERIAL();

    -

    int INVALIDID();

    -

    int INVALIDCOLOUR();

    -
    -
    -

    Purpose

    -

    - BASEITEMSERIAL() - Gets the constant that defines the base value used as starting point for item serials. If an object serial is lower than this, it probably belongs to a character. If it's higher, it belongs to an item.
    - INVALIDSERIAL() - Gets the constant defining an invalid serial. If an object serial matches this, it's invalid!
    - INVALIDID() - Gets the constant defining an invalid ID. If an object's ID matches this, it's probably not a valid ID!
    - INVALIDCOLOUR() - Gets the constant defining an invalid colour. If an object's colour is equal or higher than this, it's probably not a valid colour! -

    -
    -
    -

    Example of usage

    -
    var baseItemSerial = BASEITEMSERIAL();
    +						
    + + +
    +
    +

    Prototype

    +

    int BASEITEMSERIAL();

    +

    int INVALIDSERIAL();

    +

    int INVALIDID();

    +

    int INVALIDCOLOUR();

    +
    +
    +

    Purpose

    +

    BASEITEMSERIAL() - Gets the constant that defines the base value used as starting point for item serials. If an object serial is lower than this, it probably belongs to a character. If it's higher, it belongs to an item.
    + INVALIDSERIAL() - Gets the constant defining an invalid serial. If an object serial matches this, it's invalid!
    + INVALIDID() - Gets the constant defining an invalid ID. If an object's ID matches this, it's probably not a valid ID!
    + INVALIDCOLOUR() - Gets the constant defining an invalid colour. If an object's colour is equal or higher than this, it's probably not a valid colour!

    +
    +
    +

    Example of usage

    +
    var baseItemSerial = BASEITEMSERIAL();
     var invalidSerial = INVALIDSERIAL();
     var invalidID = INVALIDID();
     var invalidColour = INVALIDCOLOUR();
     									
    -
    -
    -
    +
    +
    +
    - +
    @@ -6405,59 +6403,28 @@

    January 9th, 2022

    - - + +

    Prototype

    -

    JSBool CheckInstaLog( x, y, world, instanceID );

    +

    int DistanceBetween( x1, y1, x2, y2 );

    +

    int DistanceBetween( x1, y1, z1, x2, y2, z2 );

    +

    int DistanceBetween( objA, objB );

    +

    int DistanceBetween( objA, objB, checkZ );

    Purpose

    -

    Checks if a specific location ( x, y, world, instanceID ) is within an instant logout zone.

    +

    Get the distance between two sets of coordinates or objects on either 2D or 3D plane

    +
    +
    +

    Notes

    +

    Parameters: x1, y1, z1, x2, y2, z2 = coordinates
    + checkZ = true if distance between two objects should take into account Z axis

    Example of usage

    -
    // Check if the player is in an instant logout zone
    -var isInstaLog = CheckInstaLog(targX, targY, worldNumber, instanceID);
    -
    -if( isInstaLog )
    -{
    -	// Handle instant logout
    -}
    -else
    -{
    -	// Handle other logout scenarios
    -}
    -
    -
    -
    - -
    - - -
    -
    -

    Prototype

    -

    int DistanceBetween( x1, y1, x2, y2 );

    -

    int DistanceBetween( x1, y1, z1, x2, y2, z2 );

    -

    int DistanceBetween( objA, objB );

    -

    int DistanceBetween( objA, objB, checkZ );

    -
    -
    -

    Purpose

    -

    Get the distance between two sets of coordinates or objects on either 2D or 3D plane

    -
    -
    -

    Notes

    -

    - Parameters: x1, y1, z1, x2, y2, z2 = coordinates
    - checkZ = true if distance between two objects should take into account Z axis -

    -
    -
    -

    Example of usage

    -
    // Get distance between two sets of x, y coordinates
    +									
    // Get distance between two sets of x, y coordinates
     var distance1 = DistanceBetween( pUser.x, pUser.y, iUsed.x, iUsed.y );
     
     // Get distance between two sets of x, y, z coordinates
    @@ -6468,159 +6435,157 @@ 

    January 9th, 2022

    // Get distance between pUser and iUsed using 3D coordinates var distance2 = DistanceBetween( pUser, iUsed, true );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool DoesEventExist( scriptID, eventToCheck );

    -
    -
    -

    Purpose

    -

    Check for existence of a named JS event/function in another script

    -
    -
    -

    Notes

    -

    - Parameters: scriptID = ID of the script to check
    - eventToCheck = name of event/function to look for -

    -
    -
    -

    Example of usage

    -
    // Check if a custom function exists in a specific script (0), and trigger it with TriggerEvent() if it does:
    +						
    + + +
    +
    +

    Prototype

    +

    bool DoesEventExist( scriptID, eventToCheck );

    +
    +
    +

    Purpose

    +

    Check for existence of a named JS event/function in another script

    +
    +
    +

    Notes

    +

    Parameters: scriptID = ID of the script to check
    + eventToCheck = name of event/function to look for

    +
    +
    +

    Example of usage

    +
    // Check if a custom function exists in a specific script (0), and trigger it with TriggerEvent() if it does:
     if( DoesEventExist( 0, "MyCustomFunction" ))
     {
     	TriggerEvent( 0, "MyCustomFunction", [additional parameters] );
     }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int GetAccountCount();

    -
    -
    -

    Purpose

    -

    Gets the total amount of accounts on the server

    -
    -
    -

    Example of usage

    -
    var totalAccounts = GetAccountCount();
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    int GetAccountCount();

    +
    +
    +

    Purpose

    +

    Gets the total amount of accounts on the server

    +
    +
    +

    Example of usage

    +
    var totalAccounts = GetAccountCount();
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool GetClientFeature( ClientFeaturesBitNum );

    -
    -
    -

    Purpose

    -

    Check if a specific client features is enabled. For a list of features that can be checked this way, see [settings]->clientFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    -
    -
    -

    Example of usage

    -
    // AoS bit from list of client features
    +						
    + + +
    +
    +

    Prototype

    +

    bool GetClientFeature( ClientFeaturesBitNum );

    +
    +
    +

    Purpose

    +

    Check if a specific client features is enabled. For a list of features that can be checked this way, see [settings]->clientFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    +
    +
    +

    Example of usage

    +
    // AoS bit from list of client features
     var aosFeaturesEnabled = GetClientFeature( 0x10 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    string GetDictionaryEntry( entryNum [, language ] );

    -
    -
    -

    Purpose

    -

    Pulls entry from the dictionary file based on language (or server default, if no language parameter is ).

    -
    -
    -

    Example of usage

    -
    var textString = GetDictionaryEntry( 1, socket.language );
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    string GetDictionaryEntry( entryNum [, language ] );

    +
    +
    +

    Purpose

    +

    Pulls entry from the dictionary file based on language (or server default, if no language parameter is ).

    +
    +
    +

    Example of usage

    +
    var textString = GetDictionaryEntry( 1, socket.language );
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int GetMurderThreshold();

    -
    -
    -

    Purpose

    -

    Returns the number of kills needed to be branded as a murderer and turn red.

    -
    -
    -

    Notes

    -

    See also: Character .murderCount and .murderer properties

    -
    -
    -

    Example of usage

    -
    if( GetMurderThreshold() > pTalking.murderCount )
    +						
    + + +
    +
    +

    Prototype

    +

    int GetMurderThreshold();

    +
    +
    +

    Purpose

    +

    Returns the number of kills needed to be branded as a murderer and turn red.

    +
    +
    +

    Notes

    +

    See also: Character .murderCount and .murderer properties

    +
    +
    +

    Example of usage

    +
    if( GetMurderThreshold() > pTalking.murderCount )
     {
     	TextMessage( pTalkingTo, "Surely sir, you must be a murderer.  I bid you adieu" );
     	EmoteMessage( pTalkingTo, "*scampers off*" );
     }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int GetPlayerCount();

    -
    -
    -

    Purpose

    -

    Gets the total amount of players online on the server

    -
    -
    -

    Example of usage

    -
    var totalOnlinePlayers = GetPlayerCount();
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    int GetPlayerCount();

    +
    +
    +

    Purpose

    +

    Gets the total amount of players online on the server

    +
    +
    +

    Example of usage

    +
    var totalOnlinePlayers = GetPlayerCount();
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    SOSObject GetRandomSOSArea( worldNum, instanceID );

    -
    -
    -

    Purpose

    -

    Gets a random SOS area from list of such areas loaded from [SOSAREAS] section of regions.dfn

    -
    -
    -

    Example of usage

    -
    // Fetch reference to a random SOS area
    +						
    + + +
    +
    +

    Prototype

    +

    SOSObject GetRandomSOSArea( worldNum, instanceID );

    +
    +
    +

    Purpose

    +

    Gets a random SOS area from list of such areas loaded from [SOSAREAS] section of regions.dfn

    +
    +
    +

    Example of usage

    +
    // Fetch reference to a random SOS area
     var sosArea = GetRandomSOSArea( pUser.worldNum, pUser.instanceID );
     
     // Pick a random location within the selected sosArea
    @@ -6634,112 +6599,112 @@ 

    January 9th, 2022

    sosMsg.more = sosMsg.instanceID; // See UOX3/js/item/waterstainedsos.js for full example, including validation for whether the chosen location is suitable, and not blocked by dynamic items, static items or map tiles
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool GetServerFeature( ServerFeaturesBitNum );

    -
    -
    -

    Purpose

    -

    Check if a specific server features is enabled. For a list of features that can be checked this way, see [settings]->serverFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    -
    -
    -

    Example of usage

    -
    // ContextMenus bit from list of server features
    +						
    + + +
    +
    +

    Prototype

    +

    bool GetServerFeature( ServerFeaturesBitNum );

    +
    +
    +

    Purpose

    +

    Check if a specific server features is enabled. For a list of features that can be checked this way, see [settings]->serverFeatures List in the UOX.INI Settings section of the UOX3 Documentation.

    +
    +
    +

    Example of usage

    +
    // ContextMenus bit from list of server features
     var contextMenusEnabled = GetServerFeature( 0x08 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    string GetServerSetting( serverSettingString );

    -
    -
    -

    Purpose

    -

    Fetches the value of a specified server setting and returns it as a string. Wrap in parseInt() if expected value returned is an int.

    -
    -
    -

    Example of usage

    -
    // Returns 1 if GUARDSACTIVE is set to 1 in UOX.INI, or 0 if set to 0.
    +						
    + + +
    +
    +

    Prototype

    +

    string GetServerSetting( serverSettingString );

    +
    +
    +

    Purpose

    +

    Fetches the value of a specified server setting and returns it as a string. Wrap in parseInt() if expected value returned is an int.

    +
    +
    +

    Example of usage

    +
    // Returns 1 if GUARDSACTIVE is set to 1 in UOX.INI, or 0 if set to 0.
     var guardsActive = GetServerSetting( "GUARDSACTIVE" );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    SOCKET GetSocketFromIndex( socketIndex );

    -
    -
    -

    Purpose

    -

    Create a socket-object based on the specified socketIndex

    -
    -
    -

    Example of usage

    -
    // Fetch whichever socket is connected to the server as socket/connection 0
    +						
    + + +
    +
    +

    Prototype

    +

    SOCKET GetSocketFromIndex( socketIndex );

    +
    +
    +

    Purpose

    +

    Create a socket-object based on the specified socketIndex

    +
    +
    +

    Example of usage

    +
    // Fetch whichever socket is connected to the server as socket/connection 0
     var socket = GetSocketFromIndex( 0 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool IsInBuilding( x, y, z, world, instance, checkHeight );

    -
    -
    -

    Purpose

    -

    Returns true if specified location is inside a static building (underneath static items), or if player is inside a multi.

    -
    -
    -

    Notes

    -

    If checkHeight argument is true, player is only deemed inside a multi if there are multi-items above the player's head. If player is in a courtyard/on a rooftop, they will be deemed to be NOT in the building. checkHeight is not used for the static part of the function, only for multis.

    -
    -
    -

    Example of usage

    -
    var isCharInBuilding = IsInBuilding( myChar.x, myChar.y, myChar.z, myChar.worldnumber, myChar.instanceID, true );
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    bool IsInBuilding( x, y, z, world, instance, checkHeight );

    +
    +
    +

    Purpose

    +

    Returns true if specified location is inside a static building (underneath static items), or if player is inside a multi.

    +
    +
    +

    Notes

    +

    If checkHeight argument is true, player is only deemed inside a multi if there are multi-items above the player's head. If player is in a courtyard/on a rooftop, they will be deemed to be NOT in the building. checkHeight is not used for the static part of the function, only for multis.

    +
    +
    +

    Example of usage

    +
    var isCharInBuilding = IsInBuilding( myChar.x, myChar.y, myChar.z, myChar.worldnumber, myChar.instanceID, true );
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int IterateOver( objectType );

    -
    -
    -

    Purpose

    -

    Iterates over all objects of specified type in the world.

    -
    -
    -

    Notes

    -

    For every object it comes across, the iterator will call a function onIterate( object ) in the same script. Supported object types: "BASEOBJ", "CHARACTER", "ITEM", "SPAWNER", "MULTI", "BOAT"

    -
    -
    -

    Example of usage

    -
    var itemCount = IterateOver( "ITEM" );
    +						
    + + +
    +
    +

    Prototype

    +

    int IterateOver( objectType );

    +
    +
    +

    Purpose

    +

    Iterates over all objects of specified type in the world.

    +
    +
    +

    Notes

    +

    For every object it comes across, the iterator will call a function onIterate( object ) in the same script. Supported object types: "BASEOBJ", "CHARACTER", "ITEM", "SPAWNER", "MULTI", "BOAT"

    +
    +
    +

    Example of usage

    +
    var itemCount = IterateOver( "ITEM" );
     Console.log( itemCount + " items found!" );
     ...
     function onIterate( myObject )
    @@ -6748,113 +6713,111 @@ 

    January 9th, 2022

    // ... optionally do something here return true; }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int Moon( moonNum );

    -

    void Moon( moonNum, newVal );

    -
    -
    -

    Purpose

    -

    Get and set the server moon values for the two moons Felucca (0) and Trammel (1)

    -
    -
    -

    Example of usage

    -
    var feluccaMoonphase = Moon( 0 );
    +						
    + + +
    +
    +

    Prototype

    +

    int Moon( moonNum );

    +

    void Moon( moonNum, newVal );

    +
    +
    +

    Purpose

    +

    Get and set the server moon values for the two moons Felucca (0) and Trammel (1)

    +
    +
    +

    Example of usage

    +
    var feluccaMoonphase = Moon( 0 );
     var TrammelMoonphase = Moon( 1 );
     Moon( 0, 7 ); //Set the moon Felucca to moonphase 7
     Moon( 1, 3 ); //Set the moon Trammel to moonphase 3
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int RandomNumber( loNum, hiNum );

    -
    -
    -

    Purpose

    -

    Returns a random number between loNum (inclusive) and hiNum (inclusive)

    -
    -
    -

    Example of usage

    -
    var iNum = RandomNumber( 0, 10 );
    -
    -
    -
    +
    + + +
    +
    +

    Prototype

    +

    int RandomNumber( loNum, hiNum );

    +
    +
    +

    Purpose

    +

    Returns a random number between loNum (inclusive) and hiNum (inclusive)

    +
    +
    +

    Example of usage

    +
    var iNum = RandomNumber( 0, 10 );
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    void Reload( subSystemID );

    -
    -
    -

    Purpose

    -

    Dynamically reloads one (or all) of UOX3's subsystems without having to restart UOX3

    -
    -
    -

    Notes

    -

    - Supported subSystemIDs: -

      -
    • 0 - Regions/TeleportLocations
    • -
    • 1 - Spawn Regions
    • -
    • 2 - Spells
    • -
    • 3 - Commands
    • -
    • 4 - DFNs/Skills
    • -
    • 5 - JScripts
    • -
    • 6 - HTML Templates
    • -
    • 7 - INI
    • -
    • 8 - Everything
    • -
    • 9 - Accounts
    • -
    • 10 - Dictionaries
    • -
    -

    -
    -
    -

    Example of usage

    -
    // Reload all DFNs (and Skill system)
    +						
    + + +
    +
    +

    Prototype

    +

    void Reload( subSystemID );

    +
    +
    +

    Purpose

    +

    Dynamically reloads one (or all) of UOX3's subsystems without having to restart UOX3

    +
    +
    +

    Notes

    +

    Supported subSystemIDs: +

      +
    • 0 - Regions/TeleportLocations
    • +
    • 1 - Spawn Regions
    • +
    • 2 - Spells
    • +
    • 3 - Commands
    • +
    • 4 - DFNs/Skills
    • +
    • 5 - JScripts
    • +
    • 6 - HTML Templates
    • +
    • 7 - INI
    • +
    • 8 - Everything
    • +
    • 9 - Accounts
    • +
    • 10 - Dictionaries
    • +

    +
    +
    +

    Example of usage

    +
    // Reload all DFNs (and Skill system)
     Reload( 4 );
     
     // Reload INI file
     Reload( 7 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    void ReloadJSFile( scriptID );

    -
    -
    -

    Purpose

    -

    Dynamically reloads script with specified scriptID from jse_fileassociations.scp without having to restart UOX3

    -
    -
    -

    Notes

    -

    Cannot be used to validate sockets

    -
    -
    -

    Example of usage

    -
    // Example of how this is used by 'reloadjsfile command
    +						
    + + +
    +
    +

    Prototype

    +

    void ReloadJSFile( scriptID );

    +
    +
    +

    Purpose

    +

    Dynamically reloads script with specified scriptID from jse_fileassociations.scp without having to restart UOX3

    +
    +
    +

    Notes

    +

    Cannot be used to validate sockets

    +
    +
    +

    Example of usage

    +
    // Example of how this is used by 'reloadjsfile command
     function CommandRegistration()
     {
     	RegisterCommand( "reloadjsfile", 3, true ); //Reload JavaScript file
    @@ -6867,70 +6830,70 @@ 

    January 9th, 2022

    ReloadJSFile( scriptID ); }
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    int RollDice( numDie, faces, addition );

    -
    -
    -

    Purpose

    -

    Rolls a faces sided die numDie times and adds addition. The example is for a DnD style dice like: 2d3+1

    -
    -
    -

    Example of usage

    -
    // Roll a DnD style dice of type 2d3+1 (2 dice with 3 faces, add 1 to result)
    +						
    + + +
    +
    +

    Prototype

    +

    int RollDice( numDie, faces, addition );

    +
    +
    +

    Purpose

    +

    Rolls a faces sided die numDie times and adds addition. The example is for a DnD style dice like: 2d3+1

    +
    +
    +

    Example of usage

    +
    // Roll a DnD style dice of type 2d3+1 (2 dice with 3 faces, add 1 to result)
     var mDie = RollDice( 2, 3, 1 );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool/int/string/object TriggerEvent( scriptID, "functionName", argument1, argument2 );

    -
    -
    -

    Purpose

    -

    Calls script with specified scriptID, runs function in said script that matches "functionName", with the defined function arguments. The called upon script can return a value in the form of a boolean, int, string or an object

    -
    -
    -

    Example of usage

    -
    // Calls script with ID 8000 and runs function "onUseChecked" with function parameters pUser and iUsed
    +						
    + + +
    +
    +

    Prototype

    +

    bool/int/string/object TriggerEvent( scriptID, "functionName", argument1, argument2 );

    +
    +
    +

    Purpose

    +

    Calls script with specified scriptID, runs function in said script that matches "functionName", with the defined function arguments. The called upon script can return a value in the form of a boolean, int, string or an object

    +
    +
    +

    Example of usage

    +
    // Calls script with ID 8000 and runs function "onUseChecked" with function parameters pUser and iUsed
     var returnVal = TriggerEvent( 8000, "onUseChecked", pUser, iUsed );
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    TriggerTrap( pChar/pSock, iTrap );

    -
    -
    -

    Purpose

    -

    pChar/pSock triggers trap on iTrap object (if any trap is present on object)

    -
    -
    -

    Notes

    -

    Trap will only trigger if both first two parts of MOREZ value is set on object; first part needs to be set to 1 to indicate object is trapped, second part needs to specify damage amount to apply.

    -
    -
    -

    Example of usage

    -
    // Setup trap on iTrap object
    +						
    + + +
    +
    +

    Prototype

    +

    TriggerTrap( pChar/pSock, iTrap );

    +
    +
    +

    Purpose

    +

    pChar/pSock triggers trap on iTrap object (if any trap is present on object)

    +
    +
    +

    Notes

    +

    Trap will only trigger if both first two parts of MOREZ value is set on object; first part needs to be set to 1 to indicate object is trapped, second part needs to specify damage amount to apply.

    +
    +
    +

    Example of usage

    +
    // Setup trap on iTrap object
     // First part of value (01) indicates object is trapped
     // Second part of value (32) defines damage dealt (32 = 0x32 = 50 damage)
     // Third (00) and Fourth (00) parts, unused here, normally indicate the min/max skill required to disarm trap
    @@ -6939,148 +6902,148 @@ 

    January 9th, 2022

    // Trigger the trap TriggerTrap( pChar, iTrap );
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    void UseItem( pSock/mChar, iToUse );

    -
    -
    -

    Purpose

    -

    To allow characters (and NPCs in particular) to trigger item-use functionality of items

    -
    -
    -

    Notes

    -

    Either a socket or a character can be passed in as a parameter of the UseItem function. If a socket is passed in, UOX3 will derive the character using the item from said socket.

    -
    -
    -

    Example of usage

    -
    // If an item has type 12, make NPC use the door to open it
    +						
    + + +
    +
    +

    Prototype

    +

    void UseItem( pSock/mChar, iToUse );

    +
    +
    +

    Purpose

    +

    To allow characters (and NPCs in particular) to trigger item-use functionality of items

    +
    +
    +

    Notes

    +

    Either a socket or a character can be passed in as a parameter of the UseItem function. If a socket is passed in, UOX3 will derive the character using the item from said socket.

    +
    +
    +

    Example of usage

    +
    // If an item has type 12, make NPC use the door to open it
     if( myItem.type == 12 )
     {
     	mChar.TextMessage( "A door! What's on the other side?" );
     	UseItem( mChar, iToUse );
     }
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    bool ValidateObject( object );

    -
    -
    -

    Purpose

    -

    Returns true if argument is a valid object (Item, Character, Multi, Boat, Spawner)

    -
    -
    -

    Notes

    -

    Cannot be used to validate sockets

    -
    -
    -

    Example of usage

    -
    if( !ValidateObject( iUsed ))
    +						
    + + +
    +
    +

    Prototype

    +

    bool ValidateObject( object );

    +
    +
    +

    Purpose

    +

    Returns true if argument is a valid object (Item, Character, Multi, Boat, Spawner)

    +
    +
    +

    Notes

    +

    Cannot be used to validate sockets

    +
    +
    +

    Example of usage

    +
    if( !ValidateObject( iUsed ))
     	return;
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    [int] WorldBrightLevel( [lightlevel] );

    -
    -
    -

    Purpose

    -

    Get/Set the "maximum brightness" light-level for daytime across the entire world

    -
    -
    -

    Notes

    -

    If no parameter is provided, function will return current "maximum brightness" light-level for daytime instead.

    -
    -
    -

    Example of usage

    -
    // Set maximum world brightness level to 1
    +						
    + + +
    +
    +

    Prototype

    +

    [int] WorldBrightLevel( [lightlevel] );

    +
    +
    +

    Purpose

    +

    Get/Set the "maximum brightness" light-level for daytime across the entire world

    +
    +
    +

    Notes

    +

    If no parameter is provided, function will return current "maximum brightness" light-level for daytime instead.

    +
    +
    +

    Example of usage

    +
    // Set maximum world brightness level to 1
     WorldBrightLevel( 1 );
     
     // Get current maximum world brightness level
     var lightLevel = WorldBrightLevel();
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    [int] WorldDarkLevel( [lightlevel] );

    -
    -
    -

    Purpose

    -

    Get/Set the "minimum brightness" light-level for night-time across the entire world

    -
    -
    -

    Notes

    -

    If no parameter is provided, function will return current "minimum brightness" light-level for night-time instead.

    -
    -
    -

    Example of usage

    -
    // Set minimum world brightness level to 15
    +						
    + + +
    +
    +

    Prototype

    +

    [int] WorldDarkLevel( [lightlevel] );

    +
    +
    +

    Purpose

    +

    Get/Set the "minimum brightness" light-level for night-time across the entire world

    +
    +
    +

    Notes

    +

    If no parameter is provided, function will return current "minimum brightness" light-level for night-time instead.

    +
    +
    +

    Example of usage

    +
    // Set minimum world brightness level to 15
     WorldDarkLevel( 15 );
     
     // Get current maximum world brightness level
     var lightLevel = WorldDarkLevel();
     
    -
    -
    -
    +
    +
    +
    -
    - - -
    -
    -

    Prototype

    -

    [int] WorldDungeonLevel( [lightlevel] );

    -
    -
    -

    Purpose

    -

    Get/Set the fixed light-level for any regions marked as dungeons

    -
    -
    -

    Notes

    -

    If no parameter is provided, function will return current fixed light-level for dungeons instead.

    -
    -
    -

    Example of usage

    -
    // Set fixed dungeon light level to 12
    +						
    + + +
    +
    +

    Prototype

    +

    [int] WorldDungeonLevel( [lightlevel] );

    +
    +
    +

    Purpose

    +

    Get/Set the fixed light-level for any regions marked as dungeons

    +
    +
    +

    Notes

    +

    If no parameter is provided, function will return current fixed light-level for dungeons instead.

    +
    +
    +

    Example of usage

    +
    // Set fixed dungeon light level to 12
     WorldDungeonLevel( 12 );
     
     // Get current fixed light level of dungeons
     var lightLevel = WorldDungeonLevel();
     
    -
    -
    -
    +
    +
    +
    -
    +
  • From 3058c01a30242c7037714dbece1baf094ab1d6c6 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:29:31 -0600 Subject: [PATCH 17/19] Update jsdocs.html --- docs/jsdocs.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/jsdocs.html b/docs/jsdocs.html index 17aff972f..5cb3e2c3b 100644 --- a/docs/jsdocs.html +++ b/docs/jsdocs.html @@ -5564,6 +5564,35 @@

    January 9th, 2022

    +
    + + +
    +
    +

    Prototype

    +

    JSBool CheckInstaLog( x, y, world, instanceID );

    +
    +
    +

    Purpose

    +

    Checks if a specific location ( x, y, world, instanceID ) is within an instant logout zone.

    +
    +
    +

    Example of usage

    +
    // Check if the player is in an instant logout zone
    +var isInstaLog = CheckInstaLog(targX, targY, worldNumber, instanceID);
    +
    +if( isInstaLog )
    +{
    +	// Handle instant logout
    +}
    +else
    +{
    +	// Handle other logout scenarios
    +}
    +
    +
    +
    +
    From 5eb3134bd40564d374d7e6c1fc045fccdeaeddd3 Mon Sep 17 00:00:00 2001 From: Geir Ove Alnes Date: Tue, 28 Jan 2025 15:36:34 +0800 Subject: [PATCH 18/19] Update metal.dfn --- data/dfndata/items/containers/metal.dfn | 1 + 1 file changed, 1 insertion(+) diff --git a/data/dfndata/items/containers/metal.dfn b/data/dfndata/items/containers/metal.dfn index 5b6875213..e4309af33 100644 --- a/data/dfndata/items/containers/metal.dfn +++ b/data/dfndata/items/containers/metal.dfn @@ -142,4 +142,5 @@ name=metal chest id=0x0e41 movable=2 script=5061 +origin=uor } From c63670d51fb5e3a05cdb421e71f909b44d3b151c Mon Sep 17 00:00:00 2001 From: Geir Ove Alnes Date: Tue, 28 Jan 2025 16:32:35 +0800 Subject: [PATCH 19/19] Update Changelog.txt --- source/Changelog.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/Changelog.txt b/source/Changelog.txt index 95b1d815c..cd419a108 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,8 +1,3 @@ -14/10/2024 - Dragon Slayer -    Added the CheckInstaLog function to check if a specific location is within an instant logout zone (SEFunctions.cpp). (thanks, Xuri) - -1/05/2024 - Dragon Slayer/Xuri - 21/01/2025 - Dragon Slayer Fixed damage dealt in combat was incorrectly modified while applying defense modifiers. (combat.cpp) @@ -19,6 +14,9 @@ Corrected a misspelling of IsBoat in magic.js. Added support for iterating through items in boats using FirstItem(), NextItem() and FinishedItems() methods +14/10/2024 - Dragon Slayer +    Added the CheckInstaLog JS function to allow checking if a specific location is within an instant logout zone (SEFunctions.cpp). (thanks, Xuri) + 12/10/2024 - Dragon Slayer Added Mini-House Addons from AOS Expansion.