From f2e69dbea0b0c980e29001381359bf2a38ae5faa Mon Sep 17 00:00:00 2001 From: Denys Zhyhulin Date: Thu, 31 Oct 2024 23:27:05 +0400 Subject: [PATCH 1/8] feat(infra): update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e69de29b..1297ff30 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +Backups +Data/Logs +Saves \ No newline at end of file From 053626c6d9cba93e147d2d6ecb0eeac4208a6cc6 Mon Sep 17 00:00:00 2001 From: Denys Zhyhulin Date: Thu, 31 Oct 2024 23:30:36 +0400 Subject: [PATCH 2/8] feat(code): containerization support --- .dockerignore | 6 ++++++ .gitignore | 1 - Data/Scripts/System/Misc/ServerList.cs | 19 ++++++++++++++----- Dockerfile | 15 +++++++++++++++ Info/Scripts/Settings.cs | 25 +++++++++++++++---------- README.md | 12 ++++++++++++ docker-compose.yaml | 11 +++++++++++ 7 files changed, 73 insertions(+), 16 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..649dab03 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +Saves +*.pdf +Data/Files +.git +Backups +Data/Logs \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1297ff30..fb060310 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ Backups Data/Logs -Saves \ No newline at end of file diff --git a/Data/Scripts/System/Misc/ServerList.cs b/Data/Scripts/System/Misc/ServerList.cs index 78b5d019..d9b76085 100644 --- a/Data/Scripts/System/Misc/ServerList.cs +++ b/Data/Scripts/System/Misc/ServerList.cs @@ -10,18 +10,18 @@ namespace Server.Misc { public class ServerList { - /* + /* * The default setting for Address, a value of 'null', will use your local IP address. If all of your local IP addresses * are private network addresses and AutoDetect is 'true' then RunUO will attempt to discover your public IP address * for you automatically. * * If you do not plan on allowing clients outside of your LAN to connect, you can set AutoDetect to 'false' and leave * Address set to 'null'. - * + * * If your public IP address cannot be determined, you must change the value of Address to your public IP address * manually to allow clients outside of your LAN to connect to your server. Address can be either an IP address or * a hostname that will be resolved when RunUO starts. - * + * * If you want players outside your LAN to be able to connect to your server and you are behind a router, you must also * forward TCP port 2593 to your private IP address. The procedure for doing this varies by manufacturer but generally * involves configuration of the router through your web browser. @@ -33,12 +33,14 @@ public class ServerList * properly and fully supports listening on multiple ports. If a client with a public IP address is connecting to a * locally private address, the server will direct the client to either the AutoDetected IP address or the manually entered * IP address or hostname, whichever is applicable. Loopback clients will be directed to loopback. - * + * * If you would like to listen on additional ports (i.e. 22, 23, 80, for clients behind highly restrictive egress * firewalls) or specific IP adddresses you can do so by modifying the file SocketOptions.cs found in this directory. */ public static readonly string Address = MySettings.S_Address; + public static readonly bool EnforceAddress = MySettings.S_EnforceAddress; + public static readonly string ServerName = MySettings.S_ServerName; public static readonly bool AutoDetect = MySettings.S_AutoDetect; @@ -71,10 +73,17 @@ private static void EventSink_ServerList( ServerListEventArgs e ) if ( IsPrivateNetwork( localAddress ) ) { ipep = (IPEndPoint)s.RemoteEndPoint; - if ( !IsPrivateNetwork( ipep.Address ) && m_PublicAddress != null ) + if (!IsPrivateNetwork( ipep.Address ) && m_PublicAddress != null ) localAddress = m_PublicAddress; } + if ( EnforceAddress ) { + Console.WriteLine("ServerList: EnforceAddress is set to true, overriding the detected IP"); + localAddress = m_PublicAddress; + } + + Console.WriteLine("ServerList: Serving the Game Server at {0}", localAddress.ToString()); + e.AddServer( ServerName, new IPEndPoint( localAddress, localPort ) ); } catch diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..32ceaa2a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM mono@sha256:34d816779b1248b5cfd095770b64ecbaf1798e2aca693a91c11a018dce9c7ad5 AS base +WORKDIR /app +COPY . . + +FROM base as builder +WORKDIR /app/Data/System + +RUN mcs -optimize+ \ + -unsafe -t:exe -out:WorldLinux.exe \ + -win32icon:Source/icon.ico -nowarn:219,414 \ + -d:NEWTIMERS -d:NEWPARENT -d:MONO '-recurse:Source/*.cs' + +FROM base as runtime +COPY --from=builder /app/Data/System/WorldLinux.exe . +ENTRYPOINT [ "mono", "/app/WorldLinux.exe" ] \ No newline at end of file diff --git a/Info/Scripts/Settings.cs b/Info/Scripts/Settings.cs index 176bfacc..721ea81d 100644 --- a/Info/Scripts/Settings.cs +++ b/Info/Scripts/Settings.cs @@ -17,7 +17,7 @@ public static class MySettings public static bool ConsoleLog = false; - // These settings will create a button on the Message of the Day. If you do not fill in a website name, the text next to the + // These settings will create a button on the Message of the Day. If you do not fill in a website name, the text next to the // button will simply say Website. When players select the button, it should open their browser to that site. // EXAMPLE: https://google.com @@ -59,7 +59,12 @@ public static class MySettings public static string S_Address = null; - // Here you can enter the name of your server/world + // Skip server address detection and enforce the S_Address value for the game server + // That's useful when your server is behind the NAT or runs in a container + // As an example of a container setup, set S_Address to "127.0.0.1" and S_EnforceAddress to true + public static bool S_EnforceAddress = false; + + // Here you can enter the name of your server/world public static string S_ServerName = "Secrets of Sosaria"; @@ -88,7 +93,7 @@ public static class MySettings // If true, then dungeon environments will have random sounds as you traverse the corridors. - public static bool S_EnableDungeonSoundEffects = true; + public static bool S_EnableDungeonSoundEffects = true; // If true, then the strange portals that lead to deep and dangerous dungeons will have an exit portal. @@ -447,11 +452,11 @@ public static class MySettings public static int S_SpawnMax = 60; - // This settings controls the limit in seconds by which you can be paralyzed by a monster. + // This settings controls the limit in seconds by which you can be paralyzed by a monster. // The default is 10 seconds. It mainly affects mummies, ants, plants and spiders. Setting it to a - // value higher than 10 could mean that the paralyze cooldown is lower than its duration, - // which can lead to frustrating fights as enemies can flee and chain-paralyze a character until they heal - // enough to get back into the fight. + // value higher than 10 could mean that the paralyze cooldown is lower than its duration, + // which can lead to frustrating fights as enemies can flee and chain-paralyze a character until they heal + // enough to get back into the fight. public static double S_paralyzeDuration = 10.0; /////////////////////////////////////////////////////////////////////////////////////////////// @@ -535,7 +540,7 @@ public static class MySettings // If true, then some vendors will have a black market option in their context menus. When used, a different // purchasing screen will be presented to the player. They can see the special crafted items they have in // stock. They will only have one of such item at a time and they will restock the black market during the - // regular stocking schedule. The resources items are made of will be land specific. EXAMPLE: If you can only + // regular stocking schedule. The resources items are made of will be land specific. EXAMPLE: If you can only // get obsidian metal in the Serpent Island, then you will may only find obsidian items in that land. public static bool S_BlackMarket = false; @@ -687,8 +692,8 @@ public static class MySettings /////////////////////////////////////////////////////////////////////////////////////////////// // If true, guards will instantly kill criminal and murderer characters. Otherwise, they will chase - // them in town where any player characters that get hit by the guards will be sent to prison and - // lose some equipment which is limited to stackable items like: potions, bandages, arrows, bolts, + // them in town where any player characters that get hit by the guards will be sent to prison and + // lose some equipment which is limited to stackable items like: potions, bandages, arrows, bolts, // gems, coins, jewels, crystals, reagents, bottles, food, and water. public static bool S_GuardsSentenceDeath = true; diff --git a/README.md b/README.md index 43f4881a..d290cd25 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ # Secrets of Sosaria For instructions, see [Manual.pdf](Manual.pdf). + + +## Running in Docker +When the server is running in a container, we need to enforce the IP of a Game Server to be `127.0.0.1`. To do this, edit the `Info/Scripts/Settings.cs` file and set: +``` +public static string S_Address = "127.0.0.1"; +public static bool S_EnforceAddress = true; +``` +Then, use the `docker compose` to run the server: +``` +docker compose up -d +``` \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..28a1a8b3 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + uo: + image: uo + build: . + ports: + - 2593:2593 + volumes: + - ./Saves:/app/Saves + - ./Data/Files:/app/Data/Files + - ./Backups:/app/Backups + - ./Data/Logs:/app/Data/Logs From 53c7ad4bf0f48cfdead1f4d73f4a7eaa2e53e5ac Mon Sep 17 00:00:00 2001 From: Denys Zhyhulin Date: Fri, 1 Nov 2024 00:11:18 +0400 Subject: [PATCH 3/8] feat(infra): zlib as a dependency for the runtime --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 32ceaa2a..392ad686 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,6 @@ RUN mcs -optimize+ \ -d:NEWTIMERS -d:NEWPARENT -d:MONO '-recurse:Source/*.cs' FROM base as runtime +RUN apt update && apt install -y zlib1g zlib1g-dev COPY --from=builder /app/Data/System/WorldLinux.exe . ENTRYPOINT [ "mono", "/app/WorldLinux.exe" ] \ No newline at end of file From 984445f680a147d01e948f0fdcb80eb5dc27f7cb Mon Sep 17 00:00:00 2001 From: Denys Zhyhulin Date: Fri, 1 Nov 2024 01:41:58 +0400 Subject: [PATCH 4/8] feat(misc): remove .gitgnore --- .gitignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fb060310..00000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Backups -Data/Logs From 7fe7662fca2f70eff8ba09f520687429ba26027d Mon Sep 17 00:00:00 2001 From: devOwlish <132713822+devOwlish@users.noreply.github.com> Date: Fri, 1 Nov 2024 02:15:29 +0400 Subject: [PATCH 5/8] feat(docs): extend README.md --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d290cd25..df382887 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ For instructions, see [Manual.pdf](Manual.pdf). ## Running in Docker -When the server is running in a container, we need to enforce the IP of a Game Server to be `127.0.0.1`. To do this, edit the `Info/Scripts/Settings.cs` file and set: +When the server is running in a container, we need to enforce the IP of a Game Server to be `127.0.0.1` ( for local development ), or a public IP while running on a VPS. +### Running locally +Edit the `Info/Scripts/Settings.cs` file and set: ``` public static string S_Address = "127.0.0.1"; public static bool S_EnforceAddress = true; @@ -12,4 +14,14 @@ public static bool S_EnforceAddress = true; Then, use the `docker compose` to run the server: ``` docker compose up -d -``` \ No newline at end of file +``` +### Running on a VPS/VDS +Edit the `Info/Scripts/Settings.cs` file and set: +``` +public static string S_Address = ""; +public static bool S_EnforceAddress = true; +``` +Then, use the `docker compose` to run the server: +``` +docker compose up -d +``` From b4597b51da1c6e655f10e89da76f0f85fcea53ad Mon Sep 17 00:00:00 2001 From: Owlish <132713822+devOwlish@users.noreply.github.com> Date: Fri, 13 Dec 2024 20:33:48 +0400 Subject: [PATCH 6/8] Sync (#7) --- .../Custom/animal broker/AnimalBroker.cs | 336 ++++++++++++++ .../Book/MonsterContractBook.cs | 130 ++++++ .../Book/MonsterContractBookGump.cs | 136 ++++++ .../Book/MonsterContractEntry.cs | 81 ++++ .../Monster Contract/MonsterContract.cs | 400 ++++++++++++++++ .../Monster Contract/MonsterContractGump.cs | 121 +++++ .../Monster Contract/MonsterContractType.cs | 259 +++++++++++ .../Rewards/Advanced Colors/BlackPetDye.cs | 110 +++++ .../Rewards/Advanced Colors/BlazePetDye.cs | 110 +++++ .../Rewards/Advanced Colors/BloodPetDye.cs | 110 +++++ .../Rewards/Advanced Colors/GoldPetDye.cs | 110 +++++ .../Rewards/Advanced Colors/IceBluePetDye.cs | 110 +++++ .../Rewards/Advanced Colors/IceGreenPetDye.cs | 110 +++++ .../Advanced Colors/MossGreenPetDye.cs | 110 +++++ .../Rewards/Advanced Colors/PinkPetDye.cs | 110 +++++ .../Rewards/Advanced Colors/WhitePetDye.cs | 110 +++++ .../Rewards/Basic Colors/BluePetDye.cs | 110 +++++ .../Rewards/Basic Colors/GreenPetDye.cs | 110 +++++ .../Rewards/Basic Colors/OrangePetDye.cs | 110 +++++ .../Rewards/Basic Colors/PurplePetDye.cs | 110 +++++ .../Rewards/Basic Colors/RedPetDye.cs | 110 +++++ .../Rewards/Basic Colors/YellowPetDye.cs | 110 +++++ .../animal broker/Rewards/ParagonDeed.cs | 101 ++++ .../animal broker/Rewards/PetBondDeed.cs | 136 ++++++ .../animal broker/Rewards/PetControlDeed.cs | 106 +++++ .../Custom/animal broker/Rewards/PetDyeTub.cs | 114 +++++ .../animal broker/Rewards/PetEasingDeed.cs | 103 +++++ .../animal broker/Rewards/PetGrowthDeedMid.cs | 180 ++++++++ .../Rewards/PetGrowthDeedStrong.cs | 180 ++++++++ .../Rewards/PetGrowthDeedWeak.cs | 187 ++++++++ .../animal broker/Rewards/PetTrainer.cs | 277 +++++++++++ .../Polyjuice/Low/BodyChangeBlackBear.cs | 98 ++++ .../Polyjuice/Low/BodyChangeBrownBear.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeCat.cs | 98 ++++ .../Polyjuice/Low/BodyChangeChicken.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeCow.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeDog.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeEagle.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeFox.cs | 98 ++++ .../Polyjuice/Low/BodyChangeGiantRat.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeGoat.cs | 98 ++++ .../Polyjuice/Low/BodyChangeGorilla.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeHind.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeLizard.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeLlama.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeOstard.cs | 98 ++++ .../Polyjuice/Low/BodyChangePanther.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangePig.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeRabbit.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeRat.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeSheep.cs | 98 ++++ .../Polyjuice/Low/BodyChangeSquirrel.cs | 98 ++++ .../Rewards/Polyjuice/Low/BodyChangeStag.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeCerberus.cs | 98 ++++ .../Megarare/BodyChangeDepthsBeast.cs | 98 ++++ .../Megarare/BodyChangeFlyingFangs.cs | 98 ++++ .../Megarare/BodyChangeGlassSpider.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeGryphon.cs | 98 ++++ .../Megarare/BodyChangeHornedBeetle.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeKong.cs | 98 ++++ .../Megarare/BodyChangeMagmaHound.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeMockabo.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeRaptor.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeRuneBear.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeStalker.cs | 98 ++++ .../Megarare/BodyChangeVerminBeast.cs | 98 ++++ .../Polyjuice/Megarare/BodyChangeWeaver.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeCrane.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeFerret.cs | 98 ++++ .../Polyjuice/Mid/BodyChangeGiantSnake.cs | 98 ++++ .../Polyjuice/Mid/BodyChangeGiantToad.cs | 98 ++++ .../Polyjuice/Mid/BodyChangeHellHound.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeKirin.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeLion.cs | 98 ++++ .../Polyjuice/Mid/BodyChangePolarBear.cs | 98 ++++ .../Polyjuice/Mid/BodyChangeScorpion.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeSlime.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeSnake.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeSpider.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeToad.cs | 98 ++++ .../Rewards/Polyjuice/Mid/BodyChangeTurtle.cs | 98 ++++ .../Rare/BodyChangeFrenziedOstard.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeFrostSpider.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeGazerHound.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeGremlin.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeMysticalFox.cs | 98 ++++ .../Polyjuice/Rare/BodyChangePlainsBeast.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeRockLobster.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeShadowLion.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeTigerBeetle.cs | 98 ++++ .../Polyjuice/Rare/BodyChangeWidowSpider.cs | 98 ++++ .../Rewards/Polyjuice/Rare/BodyScorpoid.cs | 98 ++++ .../Rewards/Rare Colors/FrostBluePetDye.cs | 110 +++++ .../Rewards/Rare Colors/IceWhitePetDye.cs | 110 +++++ .../TamingBOD/Book/TamingBODBook.cs | 129 ++++++ .../TamingBOD/Book/TamingBODBookGump.cs | 136 ++++++ .../TamingBOD/Book/TamingBODEntry.cs | 73 +++ .../animal broker/TamingBOD/TamingBOD.cs | 371 +++++++++++++++ .../animal broker/TamingBOD/TamingBODGump.cs | 121 +++++ .../Items/Containers/TreasureMapChest.cs | 47 +- .../Trades/Cartography/Maps/TreasureMap.cs | 56 +-- Data/Scripts/Items/Weapons/Bows/BaseRanged.cs | 7 + Data/Scripts/Items/Weapons/Maces/BaseWhip.cs | 2 +- .../Mobiles/Civilized/Citizens/Citizens.cs | 10 +- Data/Scripts/Mobiles/Demons/Archfiend.cs | 3 + Data/Scripts/Mobiles/Demons/Fiend.cs | 3 + Data/Scripts/Mobiles/Demons/FireDemon.cs | 3 + .../Mobiles/Goliaths/Ettins/ArcticEttin.cs | 3 + .../Mobiles/Goliaths/Ogres/ArcticOgreLord.cs | 3 + Data/Scripts/Mobiles/Humanoids/MindFlayer.cs | 3 + .../Mobiles/Humanoids/Serpents/FireNaga.cs | 3 + .../Mobiles/Insects/Spiders/DreadSpider.cs | 3 + .../Mobiles/Insects/Spiders/GiantSpider.cs | 3 + .../Mobiles/Insects/Spiders/Tarantula.cs | 3 + Data/Scripts/Mobiles/Mystical/Angel.cs | 3 + Data/Scripts/Mobiles/Mystical/Archangel.cs | 3 + Data/Scripts/Mobiles/Unique/SerpentOfChaos.cs | 3 +- Data/Scripts/Mobiles/Unique/SerpentOfOrder.cs | 3 +- Data/Scripts/Mobiles/Unusual/Beholder.cs | 3 + .../Quests/Serpents/BlackrockSerpents.cs | 52 +++ .../Quests/Serpents/SerpentSpawners.cs | 8 +- Data/Scripts/Quests/SomeRandomNote.cs | 3 +- Data/Scripts/System/Misc/Build.cs | 2 +- Data/Scripts/System/Misc/ChangeLog.cs | 39 ++ Data/Scripts/System/Misc/Players.cs | 433 +++++++++++++++++- Data/Scripts/System/Misc/Talk.cs | 1 + Info/Spawns/Spawns.map | 15 + README.md | 28 ++ 128 files changed, 12194 insertions(+), 79 deletions(-) create mode 100644 Data/Scripts/Custom/animal broker/AnimalBroker.cs create mode 100644 Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBook.cs create mode 100644 Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBookGump.cs create mode 100644 Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractEntry.cs create mode 100644 Data/Scripts/Custom/animal broker/Monster Contract/MonsterContract.cs create mode 100644 Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractGump.cs create mode 100644 Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractType.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlackPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlazePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BloodPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/GoldPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceBluePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceGreenPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/MossGreenPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/PinkPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/WhitePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Basic Colors/BluePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Basic Colors/GreenPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Basic Colors/OrangePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Basic Colors/PurplePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Basic Colors/RedPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Basic Colors/YellowPetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/ParagonDeed.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetBondDeed.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetControlDeed.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetDyeTub.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetEasingDeed.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedMid.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedStrong.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedWeak.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/PetTrainer.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBlackBear.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBrownBear.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCat.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeChicken.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCow.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeDog.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeEagle.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeFox.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGiantRat.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGoat.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGorilla.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeHind.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLizard.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLlama.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeOstard.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePanther.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePig.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRabbit.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRat.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSheep.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSquirrel.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeStag.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeCerberus.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeDepthsBeast.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeFlyingFangs.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGlassSpider.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGryphon.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeHornedBeetle.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeKong.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMagmaHound.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMockabo.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRaptor.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRuneBear.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeStalker.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeVerminBeast.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeWeaver.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeCrane.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeFerret.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantSnake.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantToad.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeHellHound.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeKirin.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeLion.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangePolarBear.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeScorpion.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSlime.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSnake.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSpider.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeToad.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeTurtle.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrenziedOstard.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrostSpider.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGazerHound.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGremlin.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeMysticalFox.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangePlainsBeast.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeRockLobster.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeShadowLion.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeTigerBeetle.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeWidowSpider.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyScorpoid.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Rare Colors/FrostBluePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/Rewards/Rare Colors/IceWhitePetDye.cs create mode 100644 Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBook.cs create mode 100644 Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBookGump.cs create mode 100644 Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODEntry.cs create mode 100644 Data/Scripts/Custom/animal broker/TamingBOD/TamingBOD.cs create mode 100644 Data/Scripts/Custom/animal broker/TamingBOD/TamingBODGump.cs diff --git a/Data/Scripts/Custom/animal broker/AnimalBroker.cs b/Data/Scripts/Custom/animal broker/AnimalBroker.cs new file mode 100644 index 00000000..c800906b --- /dev/null +++ b/Data/Scripts/Custom/animal broker/AnimalBroker.cs @@ -0,0 +1,336 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Server; +using Server.Misc; +using Server.Gumps; +using Server.Items; +using Server.Network; +using Server.Targeting; +using Server.ContextMenus; + + +namespace Server.Mobiles +{ + public class AnimalTrainerLord : BaseCreature//was BaseVendor + { + + private bool AppraiseMode = false; + + [Constructable] + public AnimalTrainerLord() : base(AIType.AI_Thief, FightMode.None, 10, 1, 0.4, 1.6 ) + + { + InitStats( 85, 75, 65 ); + Name = this.Female ? NameList.RandomName( "female" ) : NameList.RandomName( "male" ); + Title = "the animal broker"; + + Body = 0x191; + Hue = Utility.RandomSkinHue(); + + AddItem( new Boots( Utility.RandomBirdHue() ) ); + AddItem( new ShepherdsCrook() ); + AddItem( new Cloak( Utility.RandomBirdHue() ) ); + AddItem( new FancyShirt( Utility.RandomBirdHue() ) ); + AddItem( new Kilt( Utility.RandomBirdHue() ) ); + AddItem( new BodySash( Utility.RandomBirdHue() ) ); + + HairItemID = 0x203C; // The ItemID of the hair you want + HairHue = 1175; + + } + + public override void GetContextMenuEntries( Mobile from, List list ) + { + base.GetContextMenuEntries( from, list ); + list.Add( new TamingBODDealerEntry( from, this ) ); + } + + public override void OnMovement( Mobile m, Point3D oldLocation ) + { + if ( InRange( m, 4 ) && !InRange( oldLocation, 4 ) ) + { + if ( m is PlayerMobile && !m.Hidden ) + { + switch (Utility.Random(10)) + { + case 0: Say("Pet Collector here, just tell me you want to sell!"); break; + case 1: Say("Buying rare animals of all kind, simply tell me you want to sell one"); break; + case 2: Say("Sell me your tamed pets, will pay well!"); break; + case 3: Say("If you'd like a price estimate on a pet, just tell me to appraise one"); break; + case 4: Say("I can appraise an animal for you, just ask me to."); break; + case 5: Say("I am in need of help with contracts... "); break; + } + + } + } + + } + + private class PetSaleTarget : Target + { + private AnimalTrainerLord m_Trainer; + + public PetSaleTarget( AnimalTrainerLord trainer ) : base( 12, false, TargetFlags.None ) + { + m_Trainer = trainer; + } + + protected override void OnTarget( Mobile from, object targeted ) + { + if ( targeted is BaseCreature ) + m_Trainer.EndPetSale( from, (BaseCreature)targeted ); + else if ( targeted == from ) + m_Trainer.SayTo( from, 502672 ); // HA HA HA! Sorry, I am not an inn. + } + } + + public void BeginPetSale( Mobile from, bool appraise ) + { + if ( Deleted || !from.CheckAlive() ) + return; + + AppraiseMode = appraise; + + if (appraise) + SayTo( from, "Which beast would you like to appraise?" ); + else + SayTo( from, "Which beast are you selling?" ); + + from.Target = new PetSaleTarget( this ); + } + + //RUFO beginfunction + private void SellPetForGold(Mobile from, BaseCreature pet, int goldamount) + { + + double chance = pet.MinTameSkill/150; + + Item gold = null; + if (goldamount < 60000) + gold = new Gold(goldamount); + else + gold = new BankCheck(goldamount); + + pet.ControlTarget = null; + pet.ControlOrder = OrderType.None; + pet.Internalize(); + pet.SetControlMaster( null ); + pet.SummonMaster = null; + pet.Delete(); + + Container backpack = from.Backpack; + if ( backpack == null || !backpack.TryDropItem( from, gold, false ) ) + { + gold.MoveToWorld( from.Location, from.Map ); + } + + } + //RUFO endfunction + + public static int ValuatePet(BaseCreature pet, Mobile broker) + { + + double basevalue = pet.MinTameSkill; + if (basevalue >= 125) + { + pet.MinTameSkill = 124;//divide by 0 check + basevalue = 124; + } + + if (!pet.CanAngerOnTame) // easier tames are worth less this way + basevalue /= 1.15; + + double final = 0; + double step = 10; + double factorial = 1/ ((125-basevalue)/(pet.MinTameSkill*15)); + + if (basevalue < step) + final = basevalue * factorial; + else + { + while ( basevalue > 0 ) + { + if (basevalue > step) + { + basevalue -= step; + final += step * factorial; + + } + else + { + final += basevalue * factorial; + basevalue = 0; + } + } + } + + double petprice = final; + int petpriceint = Convert.ToInt32(petprice); + + if (petpriceint <= 10) + petpriceint = 10; + + return petpriceint; + + } + public void EndPetSale( Mobile from, BaseCreature pet ) + { + if ( Deleted || !from.CheckAlive() ) + return; + + if ( !pet.Controlled || pet.ControlMaster != from ) + SayTo( from, 1042562 ); // You do not own that pet! + else if ( pet.IsDeadPet ) + SayTo( from, 1049668 ); // Living pets only, please. + else if ( pet.Summoned ) + SayTo( from, 502673 ); // I can not PetSale summoned creatures. + else if ( pet.Body.IsHuman ) + SayTo( from, 502672 ); // HA HA HA! Sorry, I am not an inn. + else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) ) + SayTo( from, 1042563 ); // You need to unload your pet. + else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map ) + SayTo( from, 1042564 ); // I'm sorry. Your pet seems to be busy. + else + { + + double oldvalue = pet.MinTameSkill; + int petpriceint = ValuatePet(pet, this); + + if (AppraiseMode) + { + this.Say("I can pay you " + petpriceint + " for this pet."); + pet.MinTameSkill = oldvalue; // resets the value to what it was; + return; + } + + SellPetForGold(from, pet, petpriceint); + Titles.AwardFame( from, (pet.Fame / 100), true ); + + if (petpriceint <= 400) + this.Say( "I have plenty of " + pet.Name + " so I'll give you " + petpriceint + " gold"); + + else if (petpriceint <= 1000) + this.Say( "Thank you {0}, I will add this " + pet.Name + " to my collection! Here is " + petpriceint + " for your troubles",from.Name ); + + else if (petpriceint <= 5000) + this.Say( "A Rare find!!! Thank you for " + pet.Name + " it's worth " + petpriceint + " to the right buyer.."); + + else if (petpriceint <= 10001) + this.Say( "What an amazing Specimen! I will pay you " + petpriceint + " for it! " ); + + else if (petpriceint >= 40001) + this.Say( "I'll pay " + petpriceint + "! I've always wanted one of these!!! " ); + + + } + } + + public override bool HandlesOnSpeech( Mobile from ) + { + return true; + } + + public override void OnSpeech( SpeechEventArgs e ) + { + if( e.Mobile.InRange( this, 4 )) + { + if ( ( e.Speech.ToLower() == "sell" ) )//was sellpet + { + BeginPetSale( e.Mobile, false ); + } + else if ( ( e.Speech.ToLower() == "appraise" ) ) + { + BeginPetSale( e.Mobile, true ); + } + else + { + base.OnSpeech( e ); + } + } + + } + + public AnimalTrainerLord( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + } + + public class TamingBODDealerEntry : ContextMenuEntry + { + private static TimeSpan Delay = TimeSpan.FromHours(6); + + private static Dictionary LastUsers = new Dictionary();//pas sérialisé car c'est pas si important + + private Mobile m_Mobile; + private Mobile m_Giver; + + public TamingBODDealerEntry( Mobile from, Mobile giver ) : base( 6146, 3 ) + { + m_Mobile = from; + m_Giver = giver; + } + + public override void OnClick() + { + if( !( m_Mobile is PlayerMobile ) ) + return; + + PlayerMobile mobile = (PlayerMobile) m_Mobile; + + if(mobile.Skills[SkillName.Taming].Base < 25.0 || mobile.Skills[SkillName.Druidism].Base < 25.0) + { + m_Giver.Say( "Sorry, I don't think you have the skills to help me. Come back when you have learned more about the art of animal taming!" ); + } + else if(CanGetContract(mobile)) + { + mobile.SendGump(new SpeechGump( mobile, "The Animal Broker", SpeechFunctions.SpeechText( m_Giver, m_Mobile, "Animal Broker" ) )); + mobile.AddToBackpack( new TamingBOD() ); + } + else + { + m_Giver.Say( "Sorry, I don't have a contract available for you yet." ); + } + } + + private bool CanGetContract(PlayerMobile asker) + { + //if(asker.AccessLevel > AccessLevel.Player)return true; + + if(!LastUsers.ContainsKey(asker)) + { + LastUsers.Add(asker,DateTime.UtcNow); + return true; + } + else + { + if(DateTime.UtcNow-LastUsers[asker] < Delay) + { + return false; + } + else + { + LastUsers[asker]=DateTime.UtcNow; + return true; + } + } + } + } + } + + + diff --git a/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBook.cs b/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBook.cs new file mode 100644 index 00000000..72402373 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBook.cs @@ -0,0 +1,130 @@ +//#01 ordre alphabétique + +using System; +using System.Collections; +using Server; +using Server.Gumps; +using Server.Multis; +using Server.Prompts; +using Server.Mobiles; +using Server.ContextMenus; + +namespace Server.Items +{ + public class MonsterContractBook : Item + { + private ArrayList m_Entries; + + public ArrayList Entries + { + get{ return m_Entries; } + } + + [Constructable] + public MonsterContractBook() : base( 0x2259 ) + { + Weight = 1.0; + //LootType = LootType.Blessed; + Hue = 1204; + Name= "Taming Bod Book"; + m_Entries = new ArrayList(); + } + + public override void OnDoubleClick( Mobile from ) + { + if ( !from.InRange( GetWorldLocation(), 2 ) ) + from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. + else if ( m_Entries.Count == 0 ) + from.SendLocalizedMessage( 1062381 ); // The book is empty. + else if ( from is PlayerMobile ) + from.SendGump( new MonsterContractBookGump( (PlayerMobile)from, this ) ); + } + + public override bool OnDragDrop( Mobile from, Item dropped ) + { + if ( dropped is MonsterContract ) + { + MonsterContract MC = dropped as MonsterContract; + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1062385 ); // You must have the book in your backpack to add deeds to it. + return false; + } + else if ( m_Entries.Count < 20 ) + { + m_Entries.Add( new MonsterContractEntry( MC.Monster, MC.AmountTamed, MC.AmountToTame, MC.Reward ) ); + + m_Entries.Sort();//#01 + + InvalidateProperties(); + + from.SendLocalizedMessage( 1062386 ); // Deed added to book. + + if ( from is PlayerMobile ) + from.SendGump( new MonsterContractBookGump( (PlayerMobile)from, this ) ); + + dropped.Delete(); + return true; + } + else + { + from.SendLocalizedMessage( 1062387 ); // The book is full of deeds. + return false; + } + } + + from.SendMessage( "This is not a valid contract."); + return false; + } + + public MonsterContractBook( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + + writer.WriteEncodedInt( (int) m_Entries.Count ); + + for ( int i = 0; i < m_Entries.Count; ++i ) + { + MonsterContractEntry obj = m_Entries[i] as MonsterContractEntry; + + if( obj != null ) + obj.Serialize( writer ); + } + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + + switch ( version ) + { + case 0: + { + int count = reader.ReadEncodedInt(); + + m_Entries = new ArrayList( count ); + + for ( int i = 0; i < count; ++i ) + m_Entries.Add( new MonsterContractEntry( reader ) ); + break; + } + } + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + list.Add( 1062344, m_Entries.Count.ToString() ); // Deeds in book: ~1_val~ + + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBookGump.cs b/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBookGump.cs new file mode 100644 index 00000000..c07285bd --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractBookGump.cs @@ -0,0 +1,136 @@ +using System; +using Server; +using Server.Items; +using Server.Network; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Gumps +{ + public class MonsterContractBookGump : Gump + { + private Mobile m; + private MonsterContractBook b; + + public MonsterContractBookGump( Mobile from, MonsterContractBook book ) : base( 0, 0 ) + { + from.CloseGump( typeof( MonsterContractBookGump ) ); + + this.Closable=true; + this.Disposable=true; + this.Dragable=true; + this.Resizable=false; + + m = from; + b = book; + + this.AddPage(0); + + this.AddBackground(8, 10, 700, 80+(book.Entries.Count*30), 9200); + + this.AddAlphaRegion(142, 21, 201, 20); + this.AddLabel(158, 22, 50, @"MONSTER TAMING BOOK"); + + this.AddAlphaRegion(28, 52, 150, 15); + this.AddAlphaRegion(180, 52, 70, 15); + this.AddAlphaRegion(252, 52, 70, 15); + this.AddAlphaRegion(324, 52, 100, 15); + this.AddLabel(30, 51, 50, @"Name"); + this.AddLabel(182, 51, 50, @"Tamed"); + this.AddLabel(254, 51, 50, @"To Tame"); + this.AddLabel(326, 51, 50, @"Reward"); + + for( int i = 0; i < book.Entries.Count; ++i) + { + MonsterContractEntry MCE = book.Entries[i] as MonsterContractEntry; + this.AddAlphaRegion(28, 71+(i*30), 150, 15); + this.AddAlphaRegion(180, 71+(i*30), 70, 15); + this.AddAlphaRegion(252, 71+(i*30), 70, 15); + this.AddAlphaRegion(324, 71+(i*30), 100, 15); + this.AddLabel(29, 70+(i*30), 50, ""+MonsterContractType.Get[MCE.Monster].Name); + this.AddLabel(182, 70+(i*30), 50, ""+MCE.AmountTamed); + this.AddLabel(254, 70+(i*30), 50, ""+MCE.AmountToTame); + this.AddLabel(326, 70+(i*30), 50, ""+MCE.Reward); + this.AddButton(429, 73+(i*30), 2362, 2362, 200+i, GumpButtonType.Reply, 0); + this.AddButton(444, 73+(i*30), 2360, 2360, 100+i, GumpButtonType.Reply, 0); + } + } + + public override void OnResponse( NetState state, RelayInfo info ) + { + if ( info.ButtonID > 0 ) + { + if( info.ButtonID >= 200 )// Add Corpse + { + MonsterContractEntry MCE = b.Entries[ info.ButtonID % 100 ] as MonsterContractEntry; + if (MCE.AmountToTame >= MCE.AmountTamed) + { + m.SendMessage("You can't add another pet to this contract."); + return; + } + m.SendMessage("Choose the Tamable to add."); + m.Target = new MonsterCorpseBookTarget( b,info.ButtonID % 100 ); + } + else if ( info.ButtonID >= 100 ) // One removes the deed book. + { + MonsterContractEntry MCE = b.Entries[ info.ButtonID % 100 ] as MonsterContractEntry; + MonsterContract MC = new MonsterContract( MCE.Monster, MCE.AmountTamed, MCE.AmountToTame, MCE.Reward ); + m.AddToBackpack( MC ); + b.Entries.RemoveAt( info.ButtonID % 100 ); + } + + m.SendGump( new MonsterContractBookGump( (PlayerMobile) m, b ) );//#01 + } + } + } + public class MonsterCorpseBookTarget : Target + { + private MonsterContractEntry MCE; + private MonsterContractBook b; + + public MonsterCorpseBookTarget( MonsterContractBook book, int i ) : base( -1, true, TargetFlags.None ) + { + MCE = book.Entries[i] as MonsterContractEntry; + b = book; + } + + protected override void OnTarget( Mobile from, object o ) + { + if ( o is BaseCreature ) + { + BaseCreature pet = (BaseCreature)o; + + if ( !pet.Controlled || pet.ControlMaster != from ) + from.SendLocalizedMessage( 1042562 ); // You do not own that pet! + else if ( pet.IsDeadPet ) + from.SendLocalizedMessage( 1049668 ); // Living pets only, please. + else if ( pet.Summoned ) + from.SendMessage( "This creature was summoned." ); // I can not PetSale summoned creatures. + else if ( pet.Body.IsHuman ) + from.SendMessage( "This won't work on humans." ); // HA HA HA! Sorry, I am not an inn. + else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) ) + from.SendLocalizedMessage( 1042563 ); // You need to unload your pet. + else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map ) + from.SendLocalizedMessage( 1042564 ); // I'm sorry. Your pet seems to be busy. + else if ( pet.GetType() == MonsterContractType.Get[MCE.Monster].Type ) + { + MCE.Reward += (int)((double)Server.Mobiles.AnimalTrainerLord.ValuatePet( pet, from ) * (1+(Utility.RandomMinMax(15,35)/100))); + MCE.AmountTamed += 1; + pet.ControlTarget = null; + pet.ControlOrder = OrderType.None; + pet.Internalize(); + pet.SetControlMaster( null ); + pet.SummonMaster = null; + pet.Delete(); + from.CloseGump( typeof( MonsterContractBookGump ) ); + from.SendGump( new MonsterContractBookGump( (PlayerMobile)from, b ) ); + } + else + from.SendMessage("This pet won't work."); + } + else + from.SendMessage("This is not a tamable pet."); + } + + } +} diff --git a/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractEntry.cs b/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractEntry.cs new file mode 100644 index 00000000..faabffa6 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Monster Contract/Book/MonsterContractEntry.cs @@ -0,0 +1,81 @@ +using System; +using Server; +using Server.Gumps; +using Server.Mobiles; + +namespace Server.Items +{ + public class MonsterContractEntry : IComparable //#01 + { + public int CompareTo( object obj ) + { + return MonsterContractType.Get[Monster].Name.CompareTo( MonsterContractType.Get[((MonsterContractEntry)obj).Monster].Name); + } + + private int m_monster; + private int reward; + private int m_amount; + private int m_tamed; + + public int Monster + { + get{ return m_monster; } + set{ m_monster = value; } + } + + public int Reward + { + get{ return reward; } + set{ reward = value; } + } + + public int AmountToTame + { + get{ return m_amount; } + set{ m_amount = value; } + } + + public int AmountTamed + { + get{ return m_tamed; } + set{ m_tamed = value; } + } + + public MonsterContractEntry( int monster, int ak, int atk, int gpreward ) + { + Monster = monster; + AmountToTame = atk; + AmountTamed = ak; + Reward = gpreward; + } + + + public MonsterContractEntry( GenericReader reader ) + { + Deserialize( reader ); + } + + public void Serialize( GenericWriter writer ) + { + writer.Write( (int) 0 ); // version + + writer.Write( m_monster ); + writer.Write( reward ); + writer.Write( m_amount ); + writer.Write( m_tamed ); + } + + public void Deserialize( GenericReader reader ) + { + int version = reader.ReadInt(); + + m_monster = reader.ReadInt(); + reward = reader.ReadInt(); + m_amount = reader.ReadInt(); + m_tamed = reader.ReadInt(); + + if ( m_tamed > m_amount ) + m_tamed = m_amount; + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContract.cs b/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContract.cs new file mode 100644 index 00000000..2b1f5693 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContract.cs @@ -0,0 +1,400 @@ +using System; +using Server; +using Server.Gumps; +using Server.Mobiles; + +namespace Server.Items +{ + [Flipable( 0x14EF, 0x14F0 )] + public class MonsterContract : Item + { + private int m_monster; + private int reward; + private int m_amount; + private int m_tamed; + + [CommandProperty( AccessLevel.GameMaster )] + public int Monster + { + get{ return m_monster; } + set{ m_monster = value; } + } + + [CommandProperty( AccessLevel.GameMaster )] + public int Reward + { + get{ return reward; } + set{ reward = value; } + } + + [CommandProperty( AccessLevel.GameMaster )] + public int AmountToTame + { + get{ return m_amount; } + set{ m_amount = value; } + } + + [CommandProperty( AccessLevel.GameMaster )] + public int AmountTamed + { + get{ return m_tamed; } + set{ m_tamed = value; } + } + + [Constructable] + public MonsterContract() : base( 0x14EF ) + { + Weight = 1; + Movable = true; + Monster = MonsterContractType.Random(); + int price = MonsterContractType.Get[Monster].Rarety ; + if (price <= 25) + AmountToTame = Utility.RandomMinMax( 15, 30 ); + else if (price <= 50) + AmountToTame = Utility.RandomMinMax( 10, 25 ); + else if (price <= 75) + AmountToTame = Utility.RandomMinMax( 7, 20 ); + else if (price <= 75) + AmountToTame = Utility.RandomMinMax( 5, 15 ); + else if (price <= 100) + AmountToTame = Utility.RandomMinMax( 4, 10 ); + else if (price >= 100) + AmountToTame = Utility.RandomMinMax( 2, 8 ); + Reward = 0; + Name = "Contract: " + AmountToTame + " " + MonsterContractType.Get[Monster].Name; + AmountTamed = 0; + } + + [Constructable] + public MonsterContract( int monster, int atk, int gpreward ) : base( 0x14F0 ) + { + Weight = 1; + Movable = true; + Monster = monster; + AmountToTame = atk; + Reward = gpreward; + Name = "Contract: " + AmountToTame + " " + MonsterContractType.Get[Monster].Name; + AmountTamed = 0; + } + + [Constructable] + public MonsterContract( int monster, int ak, int atk, int gpreward ) : this( monster,atk,gpreward ) + { + AmountTamed = ak; + } + + public override void AddNameProperties( ObjectPropertyList list ) + { + + base.AddNameProperties( list ); + + list.Add( "This deed is currently worth " + Reward + " gold." ); + list.Add( "Add more creatures to increase the payout." ); + } + + public override void OnDoubleClick( Mobile from ) + { + if( IsChildOf( from.Backpack ) ) + { + from.SendGump( new MonsterContractGump( from, this ) ); + } + else + { + from.SendLocalizedMessage( 1047012 ); // This contract must be in your backpack to use it + } + } + + public static bool PayRewardTo( Mobile m_from, MonsterContract MCparent ) + { + + if ( MCparent.AmountTamed >= MCparent.AmountToTame) + { + + Item shelf = null; + int reward = 0; + + if (MCparent.Reward <1250) + reward = Utility.RandomMinMax(0, 60); // 84% nothing // 16% easy + else if (MCparent.Reward <2500) + reward = Utility.RandomMinMax(50, 250); // 100% easy + else if (MCparent.Reward <5000) + reward = Utility.RandomMinMax(100, 350); // 60% easy // 40% medium + else if (MCparent.Reward <10000) + reward = Utility.RandomMinMax(200, 400); // 25% easy // 62% medium // 13% rare + else if (MCparent.Reward <20000) + reward = Utility.RandomMinMax(300, 500); // 37% medium // 48% rare // 15% impossible + else if (MCparent.Reward < 50000) + reward = Utility.RandomMinMax(400, 510); // 70% rare // 30% impossible + else if (MCparent.Reward < 90000) + reward = Utility.RandomMinMax(450, 525); // 40% rare // 60% impossible + else if (MCparent.Reward < 159999) + reward = Utility.RandomMinMax(490, 600); // 40% rare // 60% impossible + else if (MCparent.Reward < 249999) + reward = Utility.RandomMinMax(600, 1000); // 40% rare // 60% impossible + else if (MCparent.Reward >= 250000) + reward = Utility.RandomMinMax(800, 1500); // 40% rare // 60% impossible + + if (reward >= 1000) // top top top tier + { + switch ( Utility.Random( 33 ) ) // 10% + { + case 0: shelf = new ParagonPetDeed(); break; + case 1: shelf = new PowerScroll( SkillName.Druidism, 25); break; + case 2: shelf = new PowerScroll( SkillName.Taming, 25); break; + case 3: shelf = Construct( m_MegaRareMorph ) as Item; break; + } + } + + if (reward >= 600) // top top top tier + { + switch ( Utility.Random( 71 ) ) // 7% + { + case 0: shelf = new ParagonPetDeed(); break; + case 1: shelf = new PowerScroll( SkillName.Druidism, 20); break; + case 2: shelf = new PowerScroll( SkillName.Taming, 20); break; + case 3: shelf = Construct( m_MegaRareMorph ) as Item; break; + } + } + if (reward >= 500 && shelf == null) // impossible finds + { + switch ( Utility.Random( 100 ) ) // 5% + { + case 0: shelf = new ParagonPetDeed(); break; + case 1: shelf = new PowerScroll( SkillName.Druidism, 20); break; + case 2: shelf = new PowerScroll( SkillName.Taming, 20); break; + case 3: shelf = Construct( m_MegaRareMorph ) as Item; break; + case 4: shelf = Construct( m_RareMorph ) as Item; break; + } + } + if (reward >= 470 && shelf == null) // impossible finds + { + switch ( Utility.Random( 87 ) ) // 8% + { + case 0: shelf = new ParagonPetDeed(); break; + case 1: shelf = new PetDyeTub(); break; + case 2: shelf = new PowerScroll( SkillName.Druidism, 15); break; + case 3: shelf = new PowerScroll( SkillName.Taming, 15); break; + case 4: shelf = new PetGrowthDeedStrong( ); break; + case 5: shelf = Construct( m_RareMorph ) as Item; break; + case 6: shelf = Construct( m_MidMorph ) as Item; break; + } + } + if (reward >= 375 && shelf == null) // rare finds + { + switch ( Utility.Random( 100 ) ) // 15% + { + case 0: shelf = new PetEasingDeed(); break; + case 1: shelf = new PetBondDeed(); break; + case 2: shelf = new BallOfSummoning(); break; + case 3: shelf = new BraceletOfBinding(); break; + case 4: shelf = new PowerScroll( SkillName.Druidism, 10); break; + case 5: shelf = new PowerScroll( SkillName.Taming, 10); break; + case 6: shelf = new AlienEgg( ); break; + case 8: shelf = new DragonEgg( ); break; + case 9: shelf = new PetGrowthDeedMid( ); break; + case 10: shelf = Construct( m_MidMorph ) as Item; break; + case 11: shelf = Construct( m_RareMorph ) as Item; break; + + } + } + if (reward >=250 && shelf == null) // medium finds + { + switch ( Utility.Random( 56 ) ) // 25% + { + case 0: shelf = new PetTrainer(); break; + case 1: shelf = new MossGreenPetDye(); break; + case 2: shelf = new FrostBluePetDye(); break; + case 3: shelf = new BlazePetDye(); break; + case 4: shelf = new IceWhitePetDye(); break; + case 5: shelf = new IceBluePetDye(); break; + case 6: shelf = new IceGreenPetDye(); break; + case 7: shelf = new PetControlDeed(); break; + case 8: shelf = new PowerScroll( SkillName.Druidism, 5); break; + case 9: shelf = new PowerScroll( SkillName.Taming, 5); break; + case 10: shelf = new PetGrowthDeedWeak( ); break; + case 11: shelf = Construct( m_LowMorph ) as Item; break; + case 12: shelf = Construct( m_MidMorph ) as Item; break; + + } + } + + if (reward >= 50 && shelf == null)// easy finds + { + switch ( Utility.Random( 30 ) ) // 50% chance + { + case 0: shelf = new BluePetDye(); break; + case 1: shelf = new GreenPetDye(); break; + case 2: shelf = new OrangePetDye(); break; + case 3: shelf = new PurplePetDye(); break; + case 4: shelf = new RedPetDye(); break; + case 5: shelf = new YellowPetDye(); break; + case 6: shelf = new BlackPetDye(); break; + case 7: shelf = new WhitePetDye(); break; + case 8: shelf = new BloodPetDye(); break; + case 9: shelf = new GoldPetDye(); break; + case 10: shelf = new PinkPetDye(); break; + case 11: shelf = new PowderOfTranslocation(10); break; + case 12: shelf = new PetGrowthDeedWeak( ); break; + case 13: shelf = Construct( m_LowMorph ) as Item; break; + case 14: shelf = Construct( m_LowMorph ) as Item; break; + } + } + + + Container backpack = m_from.Backpack; + if (shelf != null) + { + backpack.DropItem( shelf ); + m_from.SendMessage("You got a special drop!"); + } + backpack.DropItem( new BankCheck( MCparent.Reward ) ); + m_from.SendMessage("Your reward was placed in your bag."); + return true; + } + else + { + m_from.SendMessage("There is something wrong with this deed."); + + } + return false; + + } + + private static Type[] m_LowMorph = new Type[] + { + + typeof( BodyChangeBlackBearStatue), + typeof( BodyChangeBrownBearStatue), + typeof( BodyChangeCatStatue), + typeof( BodyChangeChickenStatue), + typeof( BodyChangeCowStatue), + typeof( BodyChangeDogStatue), + typeof( BodyChangeEagleStatue), + typeof( BodyChangeFoxStatue), + typeof( BodyChangeGiantRatStatue), + typeof( BodyChangeGoatStatue), + typeof( BodyChangeGorillaStatue), + typeof( BodyChangeHindStatue), + typeof( BodyChangeLlamaStatue), + typeof( BodyChangeOstardStatue), + typeof( BodyChangePantherStatue), + typeof( BodyChangePigStatue), + typeof( BodyChangeRabbitStatue), + typeof( BodyChangeRatStatue), + typeof( BodyChangeSheepStatue), + typeof( BodyChangeSquirrelStatue), + typeof( BodyChangeStagStatue), + typeof( BodyChangeLizardStatue) + }; + + private static Type[] m_MidMorph = new Type[] + { + + typeof( BodyChangeCraneStatue), + typeof( BodyChangeFerretStatue), + typeof( BodyChangeGiantSnakeStatue), + typeof( BodyChangeGiantToadStatue), + typeof( BodyChangeHellHoundStatue), + typeof( BodyChangeKirinStatue), + typeof( BodyChangeLionStatue), + typeof( BodyChangePolarBearStatue), + typeof( BodyChangeScorpionStatue), + typeof( BodyChangeSlimeStatue), + typeof( BodyChangeSnakeStatue), + typeof( BodyChangeSpiderStatue), + typeof( BodyChangeToadStatue), + typeof( BodyChangeKongStatue), + typeof( BodyChangeTurtleStatue) + }; + + private static Type[] m_RareMorph = new Type[] + { + + typeof( BodyChangeFrenziedOstardStatue), + typeof( BodyChangeFrostSpiderStatue), + typeof( BodyChangeGremlinStatue), + typeof( BodyChangeMysticalFoxStatue), + typeof( BodyChangePlainsBeastStatue), + typeof( BodyChangeRockLobsterStatue), + typeof( BodyChangeShadowLionStatue), + typeof( BodyChangeTigerBeetleStatue), + typeof( BodyChangeWidowSpiderStatue), + typeof( BodyChangeScorpoidStatue), + typeof( BodyChangeFlyingFangsStatue), + typeof(BodyChangeGryphonStatue) + }; + + private static Type[] m_MegaRareMorph = new Type[] + { + + typeof( BodyChangeCerberusStatue), + typeof( BodyChangeDepthsBeastStatue), + typeof( BodyChangeGazerHoundStatue), + typeof( BodyChangeGlassSpiderStatue), + typeof( BodyChangeHornedBeetleStatue), + typeof( BodyChangeMagmaHoundStatue), + typeof( BodyChangeRaptorStatue), + typeof( BodyChangeRuneBearStatue), + typeof( BodyChangeStalkerStatue), + typeof( BodyChangeVerminBeastStatue), + typeof( BodyChangeWeaver ) + }; + + public static Item Construct( Type[] types ) + { + if ( types.Length > 0 ) + return Construct( types, Utility.Random( types.Length ) ); + + return null; + } + + public static Item Construct( Type[] types, int index ) + { + if ( index >= 0 && index < types.Length ) + return Construct( types[index] ); + + return null; + } + + public static Item Construct( Type type ) + { + try + { + return Activator.CreateInstance( type ) as Item; + } + catch + { + return null; + } + } + + + public MonsterContract( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + + writer.Write( m_monster ); + writer.Write( reward ); + writer.Write( m_amount ); + writer.Write( m_tamed ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + + m_monster = reader.ReadInt(); + reward = reader.ReadInt(); + m_amount = reader.ReadInt(); + m_tamed = reader.ReadInt(); + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractGump.cs b/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractGump.cs new file mode 100644 index 00000000..df644304 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractGump.cs @@ -0,0 +1,121 @@ + +using System; +using Server; +using Server.Items; +using Server.Network; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Gumps +{ + public class MonsterContractGump : Gump + { + private MonsterContract MCparent; + + public MonsterContractGump( Mobile from, MonsterContract parentMC ) : base( 0, 0 ) + { + if(from != null)from.CloseGump( typeof( MonsterContractGump ) ); + + if(parentMC != null) + { + + MCparent = parentMC; + + this.Closable=true; + this.Disposable=true; + this.Dragable=true; + this.Resizable=false; + + this.AddPage(0); + this.AddBackground(0, 0, 300, 170, 5170); + this.AddLabel(40, 40, 0, @"Contract For: " + parentMC.AmountToTame + " " + MonsterContractType.Get[parentMC.Monster].Name); + this.AddLabel(40, 60, 0, @"Quantity Tamed: " + parentMC.AmountTamed); + this.AddLabel(40, 80, 0, @"Reward: " + parentMC.Reward); + if ( parentMC.AmountTamed < parentMC.AmountToTame ) + { + this.AddButton(90, 110, 2061, 2062, 1, GumpButtonType.Reply, 0); + this.AddLabel(104, 108, 0, @"Add Pet"); + } + else + { + this.AddButton(90, 110, 2061, 2062, 2, GumpButtonType.Reply, 0); + this.AddLabel(104, 108, 0, @"Reward"); + } + } + } + + public override void OnResponse( NetState state, RelayInfo info ) + { + Mobile m_from = state.Mobile; + + if(m_from != null && MCparent != null) + { + if ( info.ButtonID == 1 ) + { + m_from.SendMessage("Choose the tamed animal to add."); + m_from.Target = new MonsterCorpseTarget( MCparent ); + } + if ( info.ButtonID == 2 ) + { + if (MonsterContract.PayRewardTo(m_from, MCparent)) + MCparent.Delete(); + } + } + } + } + + public class MonsterCorpseTarget : Target + { + private MonsterContract MCparent; + + public MonsterCorpseTarget( MonsterContract parentMC ) : base( -1, true, TargetFlags.None ) + { + MCparent = parentMC; + } + + protected override void OnTarget( Mobile from, object o ) + { + if ( MCparent == null || from == null || o == null || MCparent.Monster == null) + { + Console.WriteLine( "MonsterContract: Sa bug !! Mais o�, on sait pas :p" ); + return; + } + + + if ( o is BaseCreature ) + { + BaseCreature pet = (BaseCreature)o; + + if ( !pet.Controlled || pet.ControlMaster != from ) + from.SendLocalizedMessage( 1042562 ); // You do not own that pet! + else if ( pet.IsDeadPet ) + from.SendLocalizedMessage( 1049668 ); // Living pets only, please. + else if ( pet.Summoned ) + from.SendMessage( "This creature was summoned." ); // I can not PetSale summoned creatures. + else if ( pet.Body.IsHuman ) + from.SendMessage( "This won't work on humans." ); // HA HA HA! Sorry, I am not an inn. + else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) ) + from.SendLocalizedMessage( 1042563 ); // You need to unload your pet. + else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map ) + from.SendLocalizedMessage( 1042564 ); // I'm sorry. Your pet seems to be busy. + else if ( pet.GetType() == MonsterContractType.Get[MCparent.Monster].Type ) + { + MCparent.Reward += (int)((double)Server.Mobiles.AnimalTrainerLord.ValuatePet( pet, from ) * (1+(Utility.RandomMinMax(15,35)/100))); + MCparent.AmountTamed += 1; + MCparent.InvalidateProperties(); + pet.ControlTarget = null; + pet.ControlOrder = OrderType.None; + pet.Internalize(); + pet.SetControlMaster( null ); + pet.SummonMaster = null; + pet.Delete(); + } + else + from.SendMessage("This pet won't work."); + } + else + from.SendMessage("This is not a tamable pet."); + } + + } +} diff --git a/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractType.cs b/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractType.cs new file mode 100644 index 00000000..8b66a6e1 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Monster Contract/MonsterContractType.cs @@ -0,0 +1,259 @@ +using System; +using Server; +using Server.Gumps; +using Server.Mobiles; + +namespace Server.Items +{ + public class MonsterContractType + { + public static MonsterContractType[] Get = new MonsterContractType[] + { + new MonsterContractType (typeof(Bird), "Forest Birds", 29), + new MonsterContractType (typeof(AbysmalDrake), "Abysmal Drakes", 104), + new MonsterContractType (typeof(Alien), "Aliens", 111), + new MonsterContractType (typeof(AlienSmall), "Alien Hatchlings", 81), + new MonsterContractType (typeof(AlienSpider), "Alien Spiders", 91), + new MonsterContractType (typeof(Alligator), "Alligators", 57), + new MonsterContractType (typeof(AncientDrake), "Ancient Drakes", 114), + new MonsterContractType (typeof(AncientNightmareRiding), "Ancient Nightmares", 121), + new MonsterContractType (typeof(AncientWyvern), "Ancient Wyverns", 113), + new MonsterContractType (typeof(Anhkheg), "Anhkhegs", 61), + new MonsterContractType (typeof(Antelope), "Antelopes", 79), + new MonsterContractType (typeof(BabyDragon), "Baby Dragons", 95), + new MonsterContractType (typeof(Beetle), "Beetles", 49), + new MonsterContractType (typeof(Bird), "Forest Birds", 14), + new MonsterContractType (typeof(BlackBear), "Black Bears", 35), + new MonsterContractType (typeof(BlackWolf), "Black Wolves", 65), + new MonsterContractType (typeof(BloodSnake), "Blood Snakes", 73), + new MonsterContractType (typeof(Boar), "Boars", 39), + new MonsterContractType (typeof(Bobcat), "Bobcats", 71), + new MonsterContractType (typeof(BrownBear), "Brown Bears", 45), + new MonsterContractType (typeof(Bull), "Bulls", 60), + new MonsterContractType (typeof(BullFrog), "Bullfrogs", 33), + new MonsterContractType (typeof(BullradonRiding), "Bullradons", 83), + new MonsterContractType (typeof(Cat), "Cats", 10), + new MonsterContractType (typeof(CaveBearRiding), "Cave Bears", 89), + new MonsterContractType (typeof(Cerberus), "Cerberuses", 125), + new MonsterContractType (typeof(Chicken), "Chickens", 10), + new MonsterContractType (typeof(Cougar), "Cougars", 41), + new MonsterContractType (typeof(Cow), "Cows", 21), + new MonsterContractType (typeof(CragCat), "Crag Cats", 110), + new MonsterContractType (typeof(CuSidhe), "Cu Sidhes", 121), + new MonsterContractType (typeof(DarkUnicornRiding), "Dark Unicorns", 125), + new MonsterContractType (typeof(DeadlyScorpion), "Deadly Scorpions", 87), + new MonsterContractType (typeof(DeathwatchBeetle), "Deathwatch Beetles", 61), + new MonsterContractType (typeof(DeepSeaSerpent), "Deep Sea Serpents", 83), + new MonsterContractType (typeof(DemonDog), "Demon Dogs", 115), + new MonsterContractType (typeof(DesertBird), "Desert Birds", 14), + new MonsterContractType (typeof(DesertOstard), "Desert Ostards", 49), + new MonsterContractType (typeof(DireBear), "Dire Bears", 89), + new MonsterContractType (typeof(DireBoar), "Dire Boards", 69), + new MonsterContractType (typeof(DiseasedRat), "Diseased Rats", 52), + new MonsterContractType (typeof(Dog), "Dogs", 10), + new MonsterContractType (typeof(Dragons), "Dragons", 104), + new MonsterContractType (typeof(DragonTurtle), "Dragon Turtles", 119), + new MonsterContractType (typeof(Drake), "Drakes", 104), + new MonsterContractType (typeof(Dreadhorn), "Dreadhorns", 115), + new MonsterContractType (typeof(Eagle), "Eagles", 37), + new MonsterContractType (typeof(ElderBlackBearRiding), "Elder Black Bears", 89), + new MonsterContractType (typeof(ElderBrownBearRiding), "Elder Brown Bears", 89), + new MonsterContractType (typeof(ElderPolarBearRiding), "Elder Polar Bears", 89), + new MonsterContractType (typeof(Elephant), "Elephants", 50), + new MonsterContractType (typeof(Ferret), "Ferrets", 10), + new MonsterContractType (typeof(FireBeetle), "Fire Beetles", 113), + new MonsterContractType (typeof(FireMephit), "Fire Mephits", 103), + new MonsterContractType (typeof(FireSteed), "Imps", 80), + new MonsterContractType (typeof(FireWyrmling), "Fire Wyrmlings", 50), + new MonsterContractType (typeof(ForestOstard), "Forest Ostards", 49), + new MonsterContractType (typeof(Fox), "Foxes", 15), + new MonsterContractType (typeof(FrenziedOstard), "Frenzied Ostards", 105), + new MonsterContractType (typeof(Frog), "Frogs", 33), + new MonsterContractType (typeof(FrostSpider), "Frost Spiders", 104), + new MonsterContractType (typeof(GemDragon), "Dragyns", 113), + new MonsterContractType (typeof(GiantAdder), "Giant Adders", 83), + new MonsterContractType (typeof(GiantCrab), "Giant Crabs", 79), + new MonsterContractType (typeof(GiantHawk), "Giant Hawks", 79), + new MonsterContractType (typeof(GiantIceWorm), "Giant Ice Worms", 101), + new MonsterContractType (typeof(GiantRat), "Giant Rats", 39), + new MonsterContractType (typeof(GiantRaven), "Giant Ravens", 79), + new MonsterContractType (typeof(GiantSerpent), "Giant Serpents", 83), + new MonsterContractType (typeof(GiantSnake), "Giant Snakes", 79), + new MonsterContractType (typeof(GiantSpider), "Giant Spiders", 79), + new MonsterContractType (typeof(GiantToad), "Giant Toads", 97), + new MonsterContractType (typeof(GlowBeetleRiding), "Glow Beetles", 59), + new MonsterContractType (typeof(Goat), "Goats", 30), + new MonsterContractType (typeof(GoldenSerpent), "Golden Serpents", 83), + new MonsterContractType (typeof(GorceratopsRiding), "Gorceratopses", 83), + new MonsterContractType (typeof(GorgonRiding), "Gorgons", 93), + new MonsterContractType (typeof(Gorilla), "Gorillas", 12), + new MonsterContractType (typeof(GreatBear), "Great Bears", 89), + new MonsterContractType (typeof(GreatHart), "Great Hearts", 59), + new MonsterContractType (typeof(GreyWolf), "Grey Wolves", 73), + new MonsterContractType (typeof(GriffonRiding), "Griffons", 69), + new MonsterContractType (typeof(GrizzlyBearRiding), "Grizzly Bears", 69), + new MonsterContractType (typeof(Grum), "Grums", 101), + new MonsterContractType (typeof(Hawk), "Hawks", 37), + new MonsterContractType (typeof(HellBeast), "Hell Beasts", 104), + new MonsterContractType (typeof(HellCat), "Hell Cats", 91), + new MonsterContractType (typeof(HellHound), "Hell Hounds", 105), + new MonsterContractType (typeof(HellSteed), "Hell Steeds", 126), + new MonsterContractType (typeof(Hind), "Hinds", 33), + new MonsterContractType (typeof(HippogriffRiding), "Hippogriffs", 79), + new MonsterContractType (typeof(Horse), "Horses", 29), + new MonsterContractType (typeof(HugeLizard), "Huge Lizards", 80), + new MonsterContractType (typeof(Hydra), "Hydras", 99), + new MonsterContractType (typeof(IceSerpent), "Ice Serpents", 83), + new MonsterContractType (typeof(IceSnake), "Ice Snakes", 83), + new MonsterContractType (typeof(IceSteed), "Ice Steeds", 126), + new MonsterContractType (typeof(IceToad), "Ice Toads", 99), + new MonsterContractType (typeof(Iguana), "Iguanas", 100), + new MonsterContractType (typeof(Iguanodon), "Iguanadons", 113), + new MonsterContractType (typeof(Imp), "Imps", 103), + new MonsterContractType (typeof(Jackal), "Jackals", 23), + new MonsterContractType (typeof(JackRabbit), "Jack Rabbits", 10), + new MonsterContractType (typeof(JadeSerpent), "Jade Serpents", 83), + new MonsterContractType (typeof(Jaguar), "Jaguars", 81), + new MonsterContractType (typeof(JungleViper), "Jungle Vipers", 83), + new MonsterContractType (typeof(Kirin), "Kirins", 115), + new MonsterContractType (typeof(KodiakBear), "Kodiak Bears", 89), + new MonsterContractType (typeof(LargeSnake), "Large Snakes", 29), + new MonsterContractType (typeof(LargeSpider), "Large Spiders", 29), + new MonsterContractType (typeof(LavaLizard), "Lava Lizards", 80), + new MonsterContractType (typeof(LavaSerpent), "Lava Serpents", 63), + new MonsterContractType (typeof(LavaSnake), "Lava Snakes", 63), + new MonsterContractType (typeof(LesserSeaSnake), "Lesser Sea Snakes", 63), + new MonsterContractType (typeof(LionRiding), "Lions", 40), + new MonsterContractType (typeof(Llama), "Llamas", 35), + new MonsterContractType (typeof(MadDog), "Mad Dogs", 53), + new MonsterContractType (typeof(Mantis), "Mantis", 51), + new MonsterContractType (typeof(Meglasaur), "Meglasaurs", 104), + new MonsterContractType (typeof(Mongbat), "Mongbats", 10), + new MonsterContractType (typeof(MountainGoat), "Mountain Goats", 20), + new MonsterContractType (typeof(Mouse), "Mice", 20), + new MonsterContractType (typeof(MysticalFox), "Mystical Foxes", 100), + new MonsterContractType (typeof(Nightmare), "Nightmares", 115), + new MonsterContractType (typeof(PandaRiding), "Pandas", 51), + new MonsterContractType (typeof(Panther), "Panthers", 53), + new MonsterContractType (typeof(Phoenix), "Phoenixes", 115), + new MonsterContractType (typeof(Pig), "Pigs", 31), + new MonsterContractType (typeof(PoisonBeetleRiding), "Poison Beetles", 59), + new MonsterContractType (typeof(PolarBear), "Polar Bears", 55), + new MonsterContractType (typeof(PrimevalAbysmalDragon), "Primeval Abysmal Dragons", 119), + new MonsterContractType (typeof(PrimevalAmberDragon), "Primeval Amber Dragons", 119), + new MonsterContractType (typeof(PrimevalBlackDragon), "Primeval Black Dragons", 119), + new MonsterContractType (typeof(PrimevalDragon), "Primeval Dragons", 119), + new MonsterContractType (typeof(PrimevalFireDragon), "Primeval Fire Dragons", 119), + new MonsterContractType (typeof(PrimevalGreenDragon), "Primeval Green Dragons", 119), + new MonsterContractType (typeof(PrimevalNightDragon), "Primeval Night Dragons", 119), + new MonsterContractType (typeof(PrimevalRedDragon), "Primeval Red Dragons", 119), + new MonsterContractType (typeof(PrimevalRoyalDragon), "Primeval Royal Dragons", 119), + new MonsterContractType (typeof(PrimevalRunicDragon), "Primeval Runic Dragons", 119), + new MonsterContractType (typeof(PrimevalSeaDragon), "Primeval Sea Dragons", 119), + new MonsterContractType (typeof(PrimevalSilverDragon), "Primeval Silver Dragons", 119), + new MonsterContractType (typeof(PrimevalStygianDragon), "Primeval Stygian Dragons", 119), + new MonsterContractType (typeof(PrimevalVolcanicDragon), "Primeval Volcanic Dragons", 119), + new MonsterContractType (typeof(Rabbit), "Rabbits", 10), + new MonsterContractType (typeof(Ramadon), "Ramadons", 87), + new MonsterContractType (typeof(RaptorRiding), "Raptors", 100), + new MonsterContractType (typeof(Rat), "Rats", 20), + new MonsterContractType (typeof(RavenousRiding), "Ravenouses", 110), + new MonsterContractType (typeof(ReanimatedDragon), "Reanimated Dragons", 119), + new MonsterContractType (typeof(Reptalon), "Reptalons", 121), + new MonsterContractType (typeof(RidableLlama), "Rideable Llamas", 49), + new MonsterContractType (typeof(Ridgeback), "Ridgebacks", 43), + new MonsterContractType (typeof(Roc), "Rocs", 118), + new MonsterContractType (typeof(RuneBeetle), "Rune Beetles", 113), + new MonsterContractType (typeof(SabreclawCub), "Sabreclaw Cubs", 79), + new MonsterContractType (typeof(SabretoothBearRiding), "Sabretooth Bears", 89), + new MonsterContractType (typeof(SabretoothCub), "Sabretooth Cubs", 79), + new MonsterContractType (typeof(SavageRidgeback), "Savage Ridgebacks", 43), + new MonsterContractType (typeof(Scorpion), "Scorpions", 67), + new MonsterContractType (typeof(SeaDragon), "Sea Dragons", 113), + new MonsterContractType (typeof(SeaDrake), "Sea Drakes", 104), + new MonsterContractType (typeof(SeaSnake), "Sea Snakes", 83), + new MonsterContractType (typeof(Sewerrat), "Sewer Rats", 20), + new MonsterContractType (typeof(Sheep), "Sheep", 31), + new MonsterContractType (typeof(SilverSerpent), "Silver Serpents", 83), + new MonsterContractType (typeof(SilverSteed), "Silver Steeds", 123), + new MonsterContractType (typeof(Slime), "Slimes", 43), + new MonsterContractType (typeof(Snake), "Snakes", 49), + new MonsterContractType (typeof(SnowLeopard), "Snow Leopards", 73), + new MonsterContractType (typeof(SnowLion), "Snow Lions", 60), + new MonsterContractType (typeof(SnowOstard), "Snow Ostards", 49), + new MonsterContractType (typeof(Squirrel), "Squirrels", 10), + new MonsterContractType (typeof(Stegosaurus), "Stegosauruses", 104), + new MonsterContractType (typeof(Styguana), "Styguanas", 104), + new MonsterContractType (typeof(SwampBird), "Swamp Birds", 14), + new MonsterContractType (typeof(SwampDragon), "Swamp Dragons", 113), + new MonsterContractType (typeof(SwampDrakeRiding), "Swamp Drakes", 104), + new MonsterContractType (typeof(SwampGator), "Swamp Gators", 79), + new MonsterContractType (typeof(Tarantula), "Tarantuals", 104), + new MonsterContractType (typeof(Teradactyl), "Teradactyls", 103), + new MonsterContractType (typeof(TigerBeetleRiding), "Tiger Beetles", 59), + new MonsterContractType (typeof(TimberWolf), "Timber Wolves", 43), + new MonsterContractType (typeof(Toad), "Toads", 43), + new MonsterContractType (typeof(Toraxen), "Toraxen", 77), + new MonsterContractType (typeof(TropicalBird), "Tropical Birds", 14), + new MonsterContractType (typeof(Tuskadon), "Tuskadons", 105), + new MonsterContractType (typeof(Tyranasaur), "Tyranasaurs", 103), + new MonsterContractType (typeof(Unicorn), "Unicorns", 115), + new MonsterContractType (typeof(Walrus), "Walruses", 55), + new MonsterContractType (typeof(Watcher), "Watchers", 104), + new MonsterContractType (typeof(WaterBeetleRiding), "Water Beetles", 59), + new MonsterContractType (typeof(Weasel), "Weasels", 10), + new MonsterContractType (typeof(WhiteRabbit), "White Rabbits", 12), + new MonsterContractType (typeof(WhiteWolf), "White Wolves", 85), + new MonsterContractType (typeof(WinterWolf), "Winter Wolves", 105), + new MonsterContractType (typeof(Wyrms), "Wyrms", 116), + new MonsterContractType (typeof(Wyverns), "Wyverns", 83), + new MonsterContractType (typeof(Wyvra), "Wyvras", 99), + new MonsterContractType (typeof(YoungRoc), "Young Rocs", 118), + new MonsterContractType (typeof(ZebraRiding), "Zebras", 49) + + //Attention pas de virgule à la dernière ligne + }; + + public static int Random() + { + int test = Utility.RandomMinMax(0, 135); + int result = 0; + for(int i=0;i<50;i++) + { + result = Utility.Random(MonsterContractType.Get.Length); + if( test > ( MonsterContractType.Get[result].Rarety ) ) + break; + } + + return result; + } + + private Type m_Type; + public Type Type + { + get { return m_Type;} + set { m_Type = value;} + } + + private string m_Name; + public string Name + { + get { return m_Name;} + set { m_Name = value;} + } + + private int m_Rarety; + public int Rarety + { + get { return m_Rarety;} + set { m_Rarety = value;} + } + + public MonsterContractType(Type type, string name, int rarety) + { + Type = type; + Name = name; + Rarety = rarety; + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlackPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlackPetDye.cs new file mode 100644 index 00000000..ff669659 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlackPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class BlackPetDye : Item + { + + [Constructable] + public BlackPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1175; + Name="pet dye (Black)"; + } + + public BlackPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new BlackDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class BlackDyeTarget : Target + { + private Mobile m_Owner; + + private BlackPetDye m_Powder; + + public BlackDyeTarget( BlackPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1175; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlazePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlazePetDye.cs new file mode 100644 index 00000000..e89ba794 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BlazePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class BlazePetDye : Item + { + + [Constructable] + public BlazePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1161; + Name="pet dye (Blaze)"; + } + + public BlazePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new BlazeDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class BlazeDyeTarget : Target + { + private Mobile m_Owner; + + private BlazePetDye m_Powder; + + public BlazeDyeTarget( BlazePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1161; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BloodPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BloodPetDye.cs new file mode 100644 index 00000000..3c697eb4 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/BloodPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class BloodPetDye : Item + { + + [Constructable] + public BloodPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1157; + Name="pet dye (Blood Red)"; + } + + public BloodPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new BloodDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class BloodDyeTarget : Target + { + private Mobile m_Owner; + + private BloodPetDye m_Powder; + + public BloodDyeTarget( BloodPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1157; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/GoldPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/GoldPetDye.cs new file mode 100644 index 00000000..cb3e1487 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/GoldPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class GoldPetDye : Item + { + + [Constructable] + public GoldPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 51; + Name="pet dye (Gold)"; + } + + public GoldPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new GoldDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class GoldDyeTarget : Target + { + private Mobile m_Owner; + + private GoldPetDye m_Powder; + + public GoldDyeTarget( GoldPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 51; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceBluePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceBluePetDye.cs new file mode 100644 index 00000000..6b239a0d --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceBluePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class IceBluePetDye : Item + { + + [Constructable] + public IceBluePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1154; + Name="pet dye (Ice Blue)"; + } + + public IceBluePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new IceBlueDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class IceBlueDyeTarget : Target + { + private Mobile m_Owner; + + private IceBluePetDye m_Powder; + + public IceBlueDyeTarget( IceBluePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1154; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceGreenPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceGreenPetDye.cs new file mode 100644 index 00000000..b0191818 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/IceGreenPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class IceGreenPetDye : Item + { + + [Constructable] + public IceGreenPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1151; + Name="pet dye (Ice Green)"; + } + + public IceGreenPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new IceGreenDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class IceGreenDyeTarget : Target + { + private Mobile m_Owner; + + private IceGreenPetDye m_Powder; + + public IceGreenDyeTarget( IceGreenPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1151; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/MossGreenPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/MossGreenPetDye.cs new file mode 100644 index 00000000..56dc7732 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/MossGreenPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class MossGreenPetDye : Item + { + + [Constructable] + public MossGreenPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1167; + Name="pet dye (Mystic Green)"; + } + + public MossGreenPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new MossGreenDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class MossGreenDyeTarget : Target + { + private Mobile m_Owner; + + private MossGreenPetDye m_Powder; + + public MossGreenDyeTarget( MossGreenPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1167; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/PinkPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/PinkPetDye.cs new file mode 100644 index 00000000..002a4a24 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/PinkPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class PinkPetDye : Item + { + + [Constructable] + public PinkPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1166; + Name="pet dye (Pink)"; + } + + public PinkPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new PinkDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class PinkDyeTarget : Target + { + private Mobile m_Owner; + + private PinkPetDye m_Powder; + + public PinkDyeTarget( PinkPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1166; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/WhitePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/WhitePetDye.cs new file mode 100644 index 00000000..85ac8d72 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Advanced Colors/WhitePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class WhitePetDye : Item + { + + [Constructable] + public WhitePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1150; + Name="pet dye (White)"; + } + + public WhitePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new WhiteDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class WhiteDyeTarget : Target + { + private Mobile m_Owner; + + private WhitePetDye m_Powder; + + public WhiteDyeTarget( WhitePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1150; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/BluePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/BluePetDye.cs new file mode 100644 index 00000000..5b452bc5 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/BluePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class BluePetDye : Item + { + + [Constructable] + public BluePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 2124; + Name="pet dye (Blue)"; + } + + public BluePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new BlueDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class BlueDyeTarget : Target + { + private Mobile m_Owner; + + private BluePetDye m_Powder; + + public BlueDyeTarget( BluePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 2124; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/GreenPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/GreenPetDye.cs new file mode 100644 index 00000000..d45774b3 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/GreenPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class GreenPetDye : Item + { + + [Constructable] + public GreenPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 2130; + Name="pet dye (Green)"; + } + + public GreenPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new GreenDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class GreenDyeTarget : Target + { + private Mobile m_Owner; + + private GreenPetDye m_Powder; + + public GreenDyeTarget( GreenPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 2130; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/OrangePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/OrangePetDye.cs new file mode 100644 index 00000000..1291e0d5 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/OrangePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class OrangePetDye : Item + { + + [Constructable] + public OrangePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 43; + Name="pet dye (Orange)"; + } + + public OrangePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new OrangeDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class OrangeDyeTarget : Target + { + private Mobile m_Owner; + + private OrangePetDye m_Powder; + + public OrangeDyeTarget( OrangePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 43; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/PurplePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/PurplePetDye.cs new file mode 100644 index 00000000..57c754d5 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/PurplePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class PurplePetDye : Item + { + + [Constructable] + public PurplePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 18; + Name="pet dye (Purple)"; + } + + public PurplePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new PurpleDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class PurpleDyeTarget : Target + { + private Mobile m_Owner; + + private PurplePetDye m_Powder; + + public PurpleDyeTarget( PurplePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 18; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/RedPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/RedPetDye.cs new file mode 100644 index 00000000..1aa2229e --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/RedPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class RedPetDye : Item + { + + [Constructable] + public RedPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 2118; + Name="pet dye (Red)"; + } + + public RedPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new RedDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class RedDyeTarget : Target + { + private Mobile m_Owner; + + private RedPetDye m_Powder; + + public RedDyeTarget( RedPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 2118; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/YellowPetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/YellowPetDye.cs new file mode 100644 index 00000000..2560c243 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Basic Colors/YellowPetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class YellowPetDye : Item + { + + [Constructable] + public YellowPetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 53; + Name="pet dye (Yellow)"; + } + + public YellowPetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new YellowDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class YellowDyeTarget : Target + { + private Mobile m_Owner; + + private YellowPetDye m_Powder; + + public YellowDyeTarget( YellowPetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 53; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/ParagonDeed.cs b/Data/Scripts/Custom/animal broker/Rewards/ParagonDeed.cs new file mode 100644 index 00000000..d2ae2816 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/ParagonDeed.cs @@ -0,0 +1,101 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class ParagonTarget : Target + { + private ParagonPetDeed m_Deed; + + public ParagonTarget(ParagonPetDeed deed) : base(1, false, TargetFlags.None) + { + m_Deed = deed; + } + + protected override void OnTarget(Mobile from, object target) + { + if (target != null && target is BaseCreature) + { + BaseCreature t = (BaseCreature)target; + + if (t.IsParagon == true) + { + from.SendMessage("That pet is already a paragon!"); + } + else if (t.ControlMaster != from) + { + from.SendMessage("That is not your pet!"); + } + else + { + bool bonded = false; + if (t.IsBonded) + bonded = true; + + t.IsParagon = true; + from.SendMessage("Your pet is now a paragon!"); + + m_Deed.Delete(); // Delete the deed + t.Tamable = true; + if (bonded) + t.IsBonded = true; // issue where bonded pets got unbonded + } + + } + else + { + from.SendMessage("That is not a valid traget."); + } + } + } + + public class ParagonPetDeed : Item // Create the item class which is derived from the base item class + { + [Constructable] + public ParagonPetDeed() : base(0x14F0) + { + Weight = 1.0; + Name = "a paragon pet deed"; + //LootType = LootType.Blessed; + Hue = 1152; + } + + public ParagonPetDeed(Serial serial) : base(serial) + { + } + + public override void Serialize(GenericWriter writer) + { + base.Serialize(writer); + + writer.Write((int)0); // version + } + + public override void Deserialize(GenericReader reader) + { + base.Deserialize(reader); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType { get { return false; } } + + public override void OnDoubleClick(Mobile from) // Override double click of the deed to call our target + { + if (!IsChildOf(from.Backpack)) // Make sure its in their pack + { + from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. + } + else + { + from.SendMessage("Choose the pet you wish to make a paragon."); + from.Target = new ParagonTarget(this); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetBondDeed.cs b/Data/Scripts/Custom/animal broker/Rewards/PetBondDeed.cs new file mode 100644 index 00000000..73c4e01c --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetBondDeed.cs @@ -0,0 +1,136 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using System.Collections; +using Server.Gumps; +using Server.Targeting; +using Server.Misc; +using Server.Accounting; +using System.Xml; +using Server.Mobiles; + +namespace Server.Items +{ + public class PetBondDeed : Item + { + [Constructable] + public PetBondDeed() : base( 0x14F0 ) + { + base.Weight = 0; + //base.LootType = LootType.Blessed; + base.Name = "a pet bond deed"; + } + + public override void OnDoubleClick( Mobile from ) + { + if ( IsChildOf( from.Backpack ) ) + { + from.Target = new InternalTarget(from, this); + } + else + { + from.SendMessage("This needs to be in your backpack, silly."); + } + } + + public PetBondDeed( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + } + + public class InternalTarget : Target + { + private Mobile m_From; + private PetBondDeed m_Deed; + + public InternalTarget( Mobile from, PetBondDeed deed ) : base ( 3, false, TargetFlags.None ) + { + m_Deed = deed; + m_From = from; + from.SendMessage("What animal do you want to bond with?"); + + + } + + protected override void OnTarget( Mobile from, object targeted ) + { + + if (m_Deed.IsChildOf( m_From.Backpack ) ) + { + if ( targeted is Mobile ) + { + if ( targeted is BaseCreature ) + { + BaseCreature creature = (BaseCreature)targeted; + if( !creature.Tamable ){ + from.SendMessage("This animal isn't tamable!"); + } + else if( !creature.Controlled || creature.ControlMaster != from ){ + from.SendMessage("It's not your pet!"); + } + else if( creature.IsDeadPet ){ + from.SendMessage("This pet is dead... "); + } + else if ( creature.Summoned ){ + from.SendMessage("This pet is summoned"); + } + else if ( creature.Body.IsHuman ){ + from.SendMessage("You want to bond with a humanoid?? Hmm... try a room."); + } + else{ + + if( creature.IsBonded == true ){ + from.SendMessage("Trying to bond the pet...."); + } + else{ + + if( from.Skills[SkillName.Taming].Base < creature.MinTameSkill ){ + from.SendMessage("Your skill is too low to control this pet!"); + } + else if( from.Skills[SkillName.Druidism].Base < creature.MinTameSkill ){ + from.SendMessage("Your skill is too low to control this pet!"); + } + else{ + try{ + creature.IsBonded = true; + from.SendMessage("{0} is now bonded with you!",creature.Name); + m_Deed.Delete(); + } + catch{ + from.SendMessage("There was a problem bonding this animal.."); + } + + } + } + } + } + else{ + from.SendMessage("Voc� pode bondar somente animais"); + } + } + else{ + from.SendMessage("Voc� pode bondar somente animais"); + } + } + else{ + from.SendMessage("This needs to be in your backpack, silly."); + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetControlDeed.cs b/Data/Scripts/Custom/animal broker/Rewards/PetControlDeed.cs new file mode 100644 index 00000000..c2531aad --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetControlDeed.cs @@ -0,0 +1,106 @@ +//Amherst Script +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; +using Server.Misc; + +namespace Server.Items +{ + public class PetControlTarget : Target + { + private PetControlDeed m_Deed; + + public PetControlTarget( PetControlDeed deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target is BaseCreature ) + { + BaseCreature k = ( BaseCreature ) target; + + if ( !k.Tamable ) + { + from.SendMessage( "That pet is not Tamable..." ); + } + + else if ( from.Skills[SkillName.Taming].Base < k.MinTameSkill ) + { + from.SendMessage( "You have no chance of controlling this animal..." ); + } + + else if ( k.ControlMaster != null ) + { + from.SendMessage( "That is alrady tamed!" ); + } + + else + + { + + k.Controlled = true; + k.SetControlMaster( from ); + k.ControlOrder = OrderType.Follow; + from.SendMessage( "You instantly tame the pet!" ); + m_Deed.Delete(); // Delete the deed + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class PetControlDeed : Item + { + [Constructable] + public PetControlDeed() : base( 0x14F0 ) + { + Weight = 1.0; + Name = "a pet control deed"; + Hue = 598; + } + + public PetControlDeed( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to control." ); + from.Target = new PetControlTarget( this ); + } + } +} +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetDyeTub.cs b/Data/Scripts/Custom/animal broker/Rewards/PetDyeTub.cs new file mode 100644 index 00000000..eefcc85d --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetDyeTub.cs @@ -0,0 +1,114 @@ +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Misc; +using Server.Mobiles; +using Server.Targeting; +using Server.Items; + +namespace Server.Items +{ + + public class PetDyeTubTarget : Target + { + private PetDyeTub m_Tub; + + public PetDyeTubTarget( PetDyeTub tub ) : base( 12, false, TargetFlags.None ) + { + m_Tub = tub; + } + + protected override void OnTarget( Mobile from, object targeted ) + { + if ( targeted is Item ) + { + from.SendMessage( "You cannot dye items with this." ); + } + else if ( targeted is PlayerMobile ) + { + from.SendMessage( "You cannot dye players with this." ); + } + else if ( targeted is BaseCreature ) + { + BaseCreature targ = (BaseCreature)targeted; + if( from.InRange( m_Tub.GetWorldLocation(), 3 ) ) + { + if ( targ.Controlled == false ) + { + from.SendMessage( "This animal is not tame." ); + } + else if ( targ.IsDeadPet ) + { + from.SendMessage( "You cannot dye a dead pet." ); + } + else if ( targ.ControlMaster != from ) + { + from.SendMessage( "This is not your pet." ); + } + else + { + targ.Hue = m_Tub.DyedHue; + from.PlaySound( 0x23E ); + } + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + } + else + { + from.SendMessage( "You cannot dye this." ); + } + } + } + + public class PetDyeTub : DyeTub + { + private bool m_Redyable; + + [Constructable] + public PetDyeTub() + { + Weight = 0.0; + Hue = 0; + Name = "a pet dye tub"; + m_Redyable = true; + } + public PetDyeTub( Serial serial ) : base( serial ) + { + } + + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf (from.Backpack)) + { + from.Target = new PetDyeTubTarget( this ); + from.SendMessage( "What pet do you wish to dye?" ); + } + else if( from.InRange( this.GetWorldLocation(), 3 ) ) + { + from.Target = new PetDyeTubTarget( this ); + from.SendMessage( "What pet do you wish to dye?" ); + + } + + } + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + writer.Write( (int) 0 ); // version + + + + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + int version = reader.ReadInt(); + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetEasingDeed.cs b/Data/Scripts/Custom/animal broker/Rewards/PetEasingDeed.cs new file mode 100644 index 00000000..d34b690f --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetEasingDeed.cs @@ -0,0 +1,103 @@ +//Amherst Script +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class PetEasingTarget : Target + { + private PetEasingDeed m_Deed; + + public PetEasingTarget( PetEasingDeed deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target is BaseCreature ) + { + BaseCreature k = ( BaseCreature ) target; + + if ( !k.Tamable ) + { + from.SendMessage( "That pet is not Tamable..." ); + } + + else if ( from.Skills[SkillName.Taming].Base < k.MinTameSkill ) + { + from.SendMessage( "You have no chance of affecting this animal..." ); + } + + else if ( k.ControlMaster != from ) + { + from.SendMessage( "This is not your pet" ); + } + + else + + { + + k.MinTameSkill -= 10; + from.SendMessage( "The Pet seems easier to control!" ); + m_Deed.Delete(); // Delete the deed + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class PetEasingDeed : Item + { + [Constructable] + public PetEasingDeed() : base( 0x14F0 ) + { + Weight = 1.0; + Name = "a pet easing deed"; + Hue = 589; + } + + public PetEasingDeed( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to ease." ); + from.Target = new PetEasingTarget( this ); + } + } +} +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedMid.cs b/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedMid.cs new file mode 100644 index 00000000..dc483629 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedMid.cs @@ -0,0 +1,180 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class GrowthTargetMid : Target + { + private PetGrowthDeedMid m_Deed; + + public GrowthTargetMid( PetGrowthDeedMid deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + + from.SendMessage( "Your pet grows stronger!" ); + + int growth = Utility.RandomMinMax(1,10); + int amnt = Utility.RandomMinMax(2,3); + + if (growth <= 5) + { + int count = 0; + bool didit = false; + while (!didit && count <= 5) + { + + switch ( Utility.Random( 5 ) ) + { + case 0: + { + int blah = t.PoisonResistance + amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Poison, blah ); + didit = true; + } + } break; + case 1: + { + int blah = t.EnergyResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Energy, blah ); + didit = true; + } + } break; + case 2: + { + int blah = t.ColdResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Cold, blah ); + didit = true; + } + } break; + case 3: + { + int blah = t.FireResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Fire, blah ); + didit = true; + } + } break; + case 4: + { + int blah = t.PhysicalResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Physical, blah ); + didit = true; + } + } break; + } + } + if (count > 5) + growth = Utility.RandomMinMax(6, 10); + } + else if (growth <= 8) + { + switch ( Utility.Random( 3 ) ) + { + case 0: t.RawStr += amnt; break; + case 1: t.RawDex += amnt; break; + case 2: t.RawInt += amnt; break; + } + } + else if (growth <= 9) + { + int blah = t.HitsMax + amnt; + t.SetHits( blah ); + } + else if (growth <= 10) + { + t.DamageMax += amnt; + } + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class PetGrowthDeedMid : Item // Create the item class which is derived from the base item class + { + [Constructable] + public PetGrowthDeedMid() : base( 0x2827 ) + { + Weight = 1.0; + Name = "an experimental growth potion"; + Stackable = true; + Hue = 1176; + } + + public PetGrowthDeedMid( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Adds 2 to 3 points to one of your pet's attributes." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to feed this to." ); + from.Target = new GrowthTargetMid( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedStrong.cs b/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedStrong.cs new file mode 100644 index 00000000..0506e2c9 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedStrong.cs @@ -0,0 +1,180 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class GrowthTargetStrong : Target + { + private PetGrowthDeedStrong m_Deed; + + public GrowthTargetStrong( PetGrowthDeedStrong deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + + from.SendMessage( "Your pet grows stronger!" ); + + int growth = Utility.RandomMinMax(1,10); + int amnt = Utility.RandomMinMax(3,5); + + if (growth <= 5) + { + int count = 0; + bool didit = false; + while (!didit && count <= 5) + { + + switch ( Utility.Random( 5 ) ) + { + case 0: + { + int blah = t.PoisonResistance + amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Poison, blah ); + didit = true; + } + } break; + case 1: + { + int blah = t.EnergyResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Energy, blah ); + didit = true; + } + } break; + case 2: + { + int blah = t.ColdResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Cold, blah ); + didit = true; + } + } break; + case 3: + { + int blah = t.FireResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Fire, blah ); + didit = true; + } + } break; + case 4: + { + int blah = t.PhysicalResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Physical, blah ); + didit = true; + } + } break; + } + } + if (count > 5) + growth = Utility.RandomMinMax(6, 10); + } + else if (growth <= 8) + { + switch ( Utility.Random( 3 ) ) + { + case 0: t.RawStr += amnt; break; + case 1: t.RawDex += amnt; break; + case 2: t.RawInt += amnt; break; + } + } + else if (growth <= 9) + { + int blah = t.HitsMax + amnt; + t.SetHits( blah ); + } + else if (growth <= 10) + { + t.DamageMax += amnt; + } + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class PetGrowthDeedStrong : Item // Create the item class which is derived from the base item class + { + [Constructable] + public PetGrowthDeedStrong() : base( 0x2827 ) + { + Weight = 1.0; + Name = "a strong experimental growth potion"; + Stackable = true; + Hue = 1177; + } + + public PetGrowthDeedStrong( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Adds 3 to 5 points to one of your pet's attributes." ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to feed this to." ); + from.Target = new GrowthTargetStrong( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedWeak.cs b/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedWeak.cs new file mode 100644 index 00000000..d78cc3c1 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetGrowthDeedWeak.cs @@ -0,0 +1,187 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class GrowthTargetWeak : Target + { + private PetGrowthDeedWeak m_Deed; + + public GrowthTargetWeak( PetGrowthDeedWeak deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + + from.SendMessage( "Your pet grows stronger!" ); + + int growth = Utility.RandomMinMax(1,10); + int amnt = Utility.RandomMinMax(1,2); + + if (growth <= 5) + { + int count = 0; + bool didit = false; + while (!didit && count <= 5) + { + + + switch ( Utility.Random( 5 ) ) + { + case 0: + { + int blah = t.PoisonResistance + amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Poison, blah ); + didit = true; + } + count ++; + } break; + case 1: + { + int blah = t.EnergyResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Energy, blah ); + didit = true; + } + count ++; + } break; + case 2: + { + int blah = t.ColdResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Cold, blah ); + didit = true; + } + count ++; + } break; + case 3: + { + int blah = t.FireResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Fire, blah ); + didit = true; + } + count ++; + } break; + case 4: + { + int blah = t.PhysicalResistance+ amnt; + if (blah < 80) + { + t.SetResistance( ResistanceType.Physical, blah ); + didit = true; + } + count ++; + } break; + } + } + if (count > 5) + growth = Utility.RandomMinMax(6, 10); + } + else if (growth <= 8) + { + switch ( Utility.Random( 3 ) ) + { + case 0: t.RawStr += amnt; break; + case 1: t.RawDex += amnt; break; + case 2: t.RawInt += amnt; break; + } + } + else if (growth <= 9) + { + int blah = t.HitsMax + amnt; + t.SetHits( blah ); + } + else if (growth <= 10) + { + t.DamageMax += amnt; + } + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class PetGrowthDeedWeak : Item // Create the item class which is derived from the base item class + { + [Constructable] + public PetGrowthDeedWeak() : base( 0x2827 ) + { + Weight = 1.0; + Name = "a weak experimental growth potion"; + Stackable = true; + //LootType = LootType.Blessed; + Hue = 1175; + } + + public PetGrowthDeedWeak( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Adds 1 to 2 points to one of your pet's attributes." ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to feed this to." ); + from.Target = new GrowthTargetWeak( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/PetTrainer.cs b/Data/Scripts/Custom/animal broker/Rewards/PetTrainer.cs new file mode 100644 index 00000000..478a4730 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/PetTrainer.cs @@ -0,0 +1,277 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; +using Server.Gumps; + +namespace Server.Items +{ + public class TrainTarget : Target + { + private PetTrainer m_Deed; + + public TrainTarget( PetTrainer deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.IsDeadPet == true ) + { + from.SendMessage( "That Being Must Be Alive!!!" ); + } + else if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else if ( t.IsBonded == false ) + { + from.SendMessage( "The Creature Must Be Bonded To You!!!" ); + } + else if ( t.SkillsTotal >= t.SkillsCap ) + { + from.SendMessage( "The Creature Is At It's Max Skill Level" ); + } + else if ( from.Skills[SkillName.Taming].Base < 100.0 ) + { + + + switch ( Utility.Random( 19 ) ) + + { + case 0: t.Skills[SkillName.FistFighting].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 1: t.Skills[SkillName.Psychology].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 2: t.Skills[SkillName.Magery].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 3: t.Skills[SkillName.Meditation].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 4: t.Skills[SkillName.MagicResist].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 5: t.Skills[SkillName.Tactics].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 6: t.Skills[SkillName.Poisoning].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 7: t.Skills[SkillName.Anatomy].Base += 0.5; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 8: t.Skills[SkillName.FistFighting].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 9: t.Skills[SkillName.Psychology].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 10: t.Skills[SkillName.Magery].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 11: t.Skills[SkillName.Meditation].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 12: t.Skills[SkillName.MagicResist].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 13: t.Skills[SkillName.Tactics].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 14: t.Skills[SkillName.Poisoning].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 15: t.Skills[SkillName.Anatomy].Base -= 1; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 16: from.SendMessage( "Your Pet Just Looks At You Sheepishly..." ); + break; + case 17: from.SendMessage( "Your Pet Just Looks At You Sheepishly..." ); + break; + case 18: from.SendMessage( "Your Pet Just Looks At You Sheepishly..." ); + break; + + } + + + + switch ( Utility.Random( 10 ) ) + { + case 0: t.Combatant = from; + from.SendMessage( "You Really Anger The Beast!!!" ); + break; + } + + } + else + { + + switch ( Utility.Random( 19 ) ) + + { + case 0: t.Skills[SkillName.FistFighting].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 1: t.Skills[SkillName.Psychology].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 2: t.Skills[SkillName.Magery].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 3: t.Skills[SkillName.Meditation].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 4: t.Skills[SkillName.MagicResist].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 5: t.Skills[SkillName.Tactics].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 6: t.Skills[SkillName.Poisoning].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 7: t.Skills[SkillName.Anatomy].Base += 1; + from.SendMessage( "Your Pet Becomes Stronger!!!" ); + break; + case 8: t.Skills[SkillName.FistFighting].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 9: t.Skills[SkillName.Psychology].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 10: t.Skills[SkillName.Magery].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 11: t.Skills[SkillName.Meditation].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 12: t.Skills[SkillName.MagicResist].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 13: t.Skills[SkillName.Tactics].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 14: t.Skills[SkillName.Poisoning].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 15: t.Skills[SkillName.Anatomy].Base -= 0.5; + from.SendMessage( "You Anger The Beast" ); + t.PlaySound( t.GetAngerSound() ); + t.Direction = t.GetDirectionTo( from ); + break; + case 16: from.SendMessage( "Your Pet Just Looks At You Sheepishly..." ); + break; + case 17: from.SendMessage( "Your Pet Just Looks At You Sheepishly..." ); + break; + case 18: from.SendMessage( "Your Pet Just Looks At You Sheepishly..." ); + break; + + } + + switch ( Utility.Random( 20 ) ) + + { + case 0: t.Combatant = from; + from.SendMessage( "You Really Anger The Beast!!!" ); + break; + } + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class PetTrainer : Item // Create the item class which is derived from the base item class + { + [Constructable] + public PetTrainer() : base( 0x166E ) + { + Name = "A Pet Trainer"; + //LootType = LootType.Blessed; + } + + public PetTrainer( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + if (Utility.RandomDouble() <= 0.1) + { + this.Delete(); + from.SendMessage( "Sadly, You broke the tool... " ); + } + else + { + from.SendMessage( "Choose the pet you wish to train!!" ); + from.Target = new TrainTarget( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBlackBear.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBlackBear.cs new file mode 100644 index 00000000..485bf842 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBlackBear.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeBlackBear : Target //FINAL To create a new item, just replace ALL instances of "BlackBear" with the new body type in the entire script Find>replace + { + private BodyChangeBlackBearStatue m_Deed; + + public BodyChangeBlackBear( BodyChangeBlackBearStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 177; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeBlackBearStatue : Item + { + [Constructable] + public BodyChangeBlackBearStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Black Bear Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeBlackBearStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeBlackBear( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBrownBear.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBrownBear.cs new file mode 100644 index 00000000..3d7ef61e --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeBrownBear.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeBrownBear : Target //FINAL To create a new item, just replace ALL instances of "BrownBear" with the new body type in the entire script Find>replace + { + private BodyChangeBrownBearStatue m_Deed; + + public BodyChangeBrownBear( BodyChangeBrownBearStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 34; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeBrownBearStatue : Item + { + [Constructable] + public BodyChangeBrownBearStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Brown Bear Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeBrownBearStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeBrownBear( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCat.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCat.cs new file mode 100644 index 00000000..36564dca --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCat.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeCat : Target //FINAL To create a new item, just replace ALL instances of "Cat" with the new body type in the entire script Find>replace + { + private BodyChangeCatStatue m_Deed; + + public BodyChangeCat( BodyChangeCatStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 201; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeCatStatue : Item + { + [Constructable] + public BodyChangeCatStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Cat Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeCatStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeCat( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeChicken.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeChicken.cs new file mode 100644 index 00000000..05444923 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeChicken.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeChicken : Target //FINAL To create a new item, just replace ALL instances of "Chicken" with the new body type in the entire script Find>replace + { + private BodyChangeChickenStatue m_Deed; + + public BodyChangeChicken( BodyChangeChickenStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 208; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeChickenStatue : Item + { + [Constructable] + public BodyChangeChickenStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Chicken Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeChickenStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeChicken( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCow.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCow.cs new file mode 100644 index 00000000..af9b12f8 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeCow.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeCow : Target //FINAL To create a new item, just replace ALL instances of "Cow" with the new body type in the entire script Find>replace + { + private BodyChangeCowStatue m_Deed; + + public BodyChangeCow( BodyChangeCowStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 216; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeCowStatue : Item + { + [Constructable] + public BodyChangeCowStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Cow Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeCowStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeCow( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeDog.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeDog.cs new file mode 100644 index 00000000..26c03874 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeDog.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeDog : Target //FINAL To create a new item, just replace ALL instances of "Dog" with the new body type in the entire script Find>replace + { + private BodyChangeDogStatue m_Deed; + + public BodyChangeDog( BodyChangeDogStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 217; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeDogStatue : Item + { + [Constructable] + public BodyChangeDogStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Dog Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeDogStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeDog( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeEagle.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeEagle.cs new file mode 100644 index 00000000..77c58966 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeEagle.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeEagle : Target //FINAL To create a new item, just replace ALL instances of "Eagle" with the new body type in the entire script Find>replace + { + private BodyChangeEagleStatue m_Deed; + + public BodyChangeEagle( BodyChangeEagleStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 5; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeEagleStatue : Item + { + [Constructable] + public BodyChangeEagleStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Eagle Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeEagleStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeEagle( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeFox.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeFox.cs new file mode 100644 index 00000000..2ccbd4af --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeFox.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeFox : Target //FINAL To create a new item, just replace ALL instances of "Fox" with the new body type in the entire script Find>replace + { + private BodyChangeFoxStatue m_Deed; + + public BodyChangeFox( BodyChangeFoxStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 121; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeFoxStatue : Item + { + [Constructable] + public BodyChangeFoxStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Fox Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeFoxStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeFox( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGiantRat.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGiantRat.cs new file mode 100644 index 00000000..d058c007 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGiantRat.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGiantRat : Target //FINAL To create a new item, just replace ALL instances of "GiantRat" with the new body type in the entire script Find>replace + { + private BodyChangeGiantRatStatue m_Deed; + + public BodyChangeGiantRat( BodyChangeGiantRatStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 215; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGiantRatStatue : Item + { + [Constructable] + public BodyChangeGiantRatStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Giant Rat Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGiantRatStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGiantRat( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGoat.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGoat.cs new file mode 100644 index 00000000..19ba222c --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGoat.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGoat : Target //FINAL To create a new item, just replace ALL instances of "Goat" with the new body type in the entire script Find>replace + { + private BodyChangeGoatStatue m_Deed; + + public BodyChangeGoat( BodyChangeGoatStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 209; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGoatStatue : Item + { + [Constructable] + public BodyChangeGoatStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Goat Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGoatStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGoat( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGorilla.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGorilla.cs new file mode 100644 index 00000000..bf8cee88 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeGorilla.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGorilla : Target //FINAL To create a new item, just replace ALL instances of "Gorilla" with the new body type in the entire script Find>replace + { + private BodyChangeGorillaStatue m_Deed; + + public BodyChangeGorilla( BodyChangeGorillaStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 29; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGorillaStatue : Item + { + [Constructable] + public BodyChangeGorillaStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Gorilla Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGorillaStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGorilla( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeHind.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeHind.cs new file mode 100644 index 00000000..231d9602 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeHind.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeHind : Target //FINAL To create a new item, just replace ALL instances of "Hind" with the new body type in the entire script Find>replace + { + private BodyChangeHindStatue m_Deed; + + public BodyChangeHind( BodyChangeHindStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 237; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeHindStatue : Item + { + [Constructable] + public BodyChangeHindStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Hind Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeHindStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeHind( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLizard.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLizard.cs new file mode 100644 index 00000000..f9b62fd2 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLizard.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeLizard : Target //FINAL To create a new item, just replace ALL instances of "Lizard" with the new body type in the entire script Find>replace + { + private BodyChangeLizardStatue m_Deed; + + public BodyChangeLizard( BodyChangeLizardStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 206; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeLizardStatue : Item + { + [Constructable] + public BodyChangeLizardStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Lizard Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeLizardStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeLizard( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLlama.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLlama.cs new file mode 100644 index 00000000..3aa2d396 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeLlama.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeLlama : Target //FINAL To create a new item, just replace ALL instances of "Llama" with the new body type in the entire script Find>replace + { + private BodyChangeLlamaStatue m_Deed; + + public BodyChangeLlama( BodyChangeLlamaStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 220; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeLlamaStatue : Item + { + [Constructable] + public BodyChangeLlamaStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Llama Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeLlamaStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeLlama( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeOstard.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeOstard.cs new file mode 100644 index 00000000..fa66d99e --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeOstard.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeOstard : Target //FINAL To create a new item, just replace ALL instances of "Ostard" with the new body type in the entire script Find>replace + { + private BodyChangeOstardStatue m_Deed; + + public BodyChangeOstard( BodyChangeOstardStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 210; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeOstardStatue : Item + { + [Constructable] + public BodyChangeOstardStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Ostard Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeOstardStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeOstard( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePanther.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePanther.cs new file mode 100644 index 00000000..c06443ca --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePanther.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangePanther : Target //FINAL To create a new item, just replace ALL instances of "Panther" with the new body type in the entire script Find>replace + { + private BodyChangePantherStatue m_Deed; + + public BodyChangePanther( BodyChangePantherStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 214; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangePantherStatue : Item + { + [Constructable] + public BodyChangePantherStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Panther Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangePantherStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangePanther( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePig.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePig.cs new file mode 100644 index 00000000..75c02735 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangePig.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangePig : Target //FINAL To create a new item, just replace ALL instances of "Pig" with the new body type in the entire script Find>replace + { + private BodyChangePigStatue m_Deed; + + public BodyChangePig( BodyChangePigStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 290; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangePigStatue : Item + { + [Constructable] + public BodyChangePigStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Pig Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangePigStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangePig( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRabbit.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRabbit.cs new file mode 100644 index 00000000..854f65ab --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRabbit.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeRabbit : Target //FINAL To create a new item, just replace ALL instances of "Rabbit" with the new body type in the entire script Find>replace + { + private BodyChangeRabbitStatue m_Deed; + + public BodyChangeRabbit( BodyChangeRabbitStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 205; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeRabbitStatue : Item + { + [Constructable] + public BodyChangeRabbitStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Rabbit Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeRabbitStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeRabbit( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRat.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRat.cs new file mode 100644 index 00000000..b8154f72 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeRat.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeRat : Target //FINAL To create a new item, just replace ALL instances of "Rat" with the new body type in the entire script Find>replace + { + private BodyChangeRatStatue m_Deed; + + public BodyChangeRat( BodyChangeRatStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 238; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeRatStatue : Item + { + [Constructable] + public BodyChangeRatStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Rat Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeRatStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeRat( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSheep.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSheep.cs new file mode 100644 index 00000000..067f48dc --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSheep.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeSheep : Target //FINAL To create a new item, just replace ALL instances of "Sheep" with the new body type in the entire script Find>replace + { + private BodyChangeSheepStatue m_Deed; + + public BodyChangeSheep( BodyChangeSheepStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 207; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeSheepStatue : Item + { + [Constructable] + public BodyChangeSheepStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Sheep Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeSheepStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeSheep( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSquirrel.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSquirrel.cs new file mode 100644 index 00000000..be0acf22 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeSquirrel.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeSquirrel : Target //FINAL To create a new item, just replace ALL instances of "Squirrel" with the new body type in the entire script Find>replace + { + private BodyChangeSquirrelStatue m_Deed; + + public BodyChangeSquirrel( BodyChangeSquirrelStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 278; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeSquirrelStatue : Item + { + [Constructable] + public BodyChangeSquirrelStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Squirrel Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeSquirrelStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeSquirrel( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeStag.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeStag.cs new file mode 100644 index 00000000..dcdd73b3 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Low/BodyChangeStag.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeStag : Target //FINAL To create a new item, just replace ALL instances of "Stag" with the new body type in the entire script Find>replace + { + private BodyChangeStagStatue m_Deed; + + public BodyChangeStag( BodyChangeStagStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 234; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeStagStatue : Item + { + [Constructable] + public BodyChangeStagStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Stag Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeStagStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeStag( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeCerberus.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeCerberus.cs new file mode 100644 index 00000000..473ca28b --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeCerberus.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeCerberus : Target //FINAL To create a new item, just replace ALL instances of "Cerberus" with the new body type in the entire script Find>replace + { + private BodyChangeCerberusStatue m_Deed; + + public BodyChangeCerberus( BodyChangeCerberusStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 141; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeCerberusStatue : Item + { + [Constructable] + public BodyChangeCerberusStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Cerberus Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeCerberusStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeCerberus( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeDepthsBeast.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeDepthsBeast.cs new file mode 100644 index 00000000..0163ff31 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeDepthsBeast.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeDepthsBeast : Target //FINAL To create a new item, just replace ALL instances of "DepthsBeast" with the new body type in the entire script Find>replace + { + private BodyChangeDepthsBeastStatue m_Deed; + + public BodyChangeDepthsBeast( BodyChangeDepthsBeastStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 194; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeDepthsBeastStatue : Item + { + [Constructable] + public BodyChangeDepthsBeastStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Depths Beast Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeDepthsBeastStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeDepthsBeast( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeFlyingFangs.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeFlyingFangs.cs new file mode 100644 index 00000000..e015b3c1 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeFlyingFangs.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeFlyingFangs : Target //FINAL To create a new item, just replace ALL instances of "FlyingFangs" with the new body type in the entire script Find>replace + { + private BodyChangeFlyingFangsStatue m_Deed; + + public BodyChangeFlyingFangs( BodyChangeFlyingFangsStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 258; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeFlyingFangsStatue : Item + { + [Constructable] + public BodyChangeFlyingFangsStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Flying Fangs Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeFlyingFangsStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeFlyingFangs( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGlassSpider.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGlassSpider.cs new file mode 100644 index 00000000..5ad0995e --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGlassSpider.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGlassSpider : Target //FINAL To create a new item, just replace ALL instances of "GlassSpider" with the new body type in the entire script Find>replace + { + private BodyChangeGlassSpiderStatue m_Deed; + + public BodyChangeGlassSpider( BodyChangeGlassSpiderStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 180; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGlassSpiderStatue : Item + { + [Constructable] + public BodyChangeGlassSpiderStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Glass Spider Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGlassSpiderStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGlassSpider( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGryphon.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGryphon.cs new file mode 100644 index 00000000..d6f753dc --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeGryphon.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGryphon : Target //FINAL To create a new item, just replace ALL instances of "Gryphon" with the new body type in the entire script Find>replace + { + private BodyChangeGryphonStatue m_Deed; + + public BodyChangeGryphon( BodyChangeGryphonStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 188; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGryphonStatue : Item + { + [Constructable] + public BodyChangeGryphonStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Gryphon Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGryphonStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGryphon( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeHornedBeetle.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeHornedBeetle.cs new file mode 100644 index 00000000..1e34ad87 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeHornedBeetle.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeHornedBeetle : Target //FINAL To create a new item, just replace ALL instances of "HornedBeetle" with the new body type in the entire script Find>replace + { + private BodyChangeHornedBeetleStatue m_Deed; + + public BodyChangeHornedBeetle( BodyChangeHornedBeetleStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 81; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeHornedBeetleStatue : Item + { + [Constructable] + public BodyChangeHornedBeetleStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Horned Beetle Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeHornedBeetleStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeHornedBeetle( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeKong.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeKong.cs new file mode 100644 index 00000000..f97eadac --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeKong.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeKong : Target //FINAL To create a new item, just replace ALL instances of "Kong" with the new body type in the entire script Find>replace + { + private BodyChangeKongStatue m_Deed; + + public BodyChangeKong( BodyChangeKongStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 161; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeKongStatue : Item + { + [Constructable] + public BodyChangeKongStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Kong Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeKongStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeKong( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMagmaHound.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMagmaHound.cs new file mode 100644 index 00000000..7ba3a8f4 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMagmaHound.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeMagmaHound : Target //FINAL To create a new item, just replace ALL instances of "MagmaHound" with the new body type in the entire script Find>replace + { + private BodyChangeMagmaHoundStatue m_Deed; + + public BodyChangeMagmaHound( BodyChangeMagmaHoundStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 92; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeMagmaHoundStatue : Item + { + [Constructable] + public BodyChangeMagmaHoundStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Magma Hound Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeMagmaHoundStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeMagmaHound( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMockabo.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMockabo.cs new file mode 100644 index 00000000..7ead03a7 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeMockabo.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeMockabo : Target //FINAL To create a new item, just replace ALL instances of "Mockabo" with the new body type in the entire script Find>replace + { + private BodyChangeMockaboStatue m_Deed; + + public BodyChangeMockabo( BodyChangeMockaboStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 25; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeMockaboStatue : Item + { + [Constructable] + public BodyChangeMockaboStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Mockabo Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeMockaboStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeMockabo( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRaptor.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRaptor.cs new file mode 100644 index 00000000..6602f2ea --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRaptor.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeRaptor : Target //FINAL To create a new item, just replace ALL instances of "Raptor" with the new body type in the entire script Find>replace + { + private BodyChangeRaptorStatue m_Deed; + + public BodyChangeRaptor( BodyChangeRaptorStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 117; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeRaptorStatue : Item + { + [Constructable] + public BodyChangeRaptorStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Raptor Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeRaptorStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeRaptor( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRuneBear.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRuneBear.cs new file mode 100644 index 00000000..3abdea52 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeRuneBear.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeRuneBear : Target //FINAL To create a new item, just replace ALL instances of "RuneBear" with the new body type in the entire script Find>replace + { + private BodyChangeRuneBearStatue m_Deed; + + public BodyChangeRuneBear( BodyChangeRuneBearStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 190; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeRuneBearStatue : Item + { + [Constructable] + public BodyChangeRuneBearStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Rune Bear Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeRuneBearStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeRuneBear( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeStalker.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeStalker.cs new file mode 100644 index 00000000..e25acf07 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeStalker.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeStalker : Target //FINAL To create a new item, just replace ALL instances of "Stalker" with the new body type in the entire script Find>replace + { + private BodyChangeStalkerStatue m_Deed; + + public BodyChangeStalker( BodyChangeStalkerStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 74; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeStalkerStatue : Item + { + [Constructable] + public BodyChangeStalkerStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Stalker Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeStalkerStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeStalker( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeVerminBeast.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeVerminBeast.cs new file mode 100644 index 00000000..f2ded40a --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeVerminBeast.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeVerminBeast : Target //FINAL To create a new item, just replace ALL instances of "VerminBeast" with the new body type in the entire script Find>replace + { + private BodyChangeVerminBeastStatue m_Deed; + + public BodyChangeVerminBeast( BodyChangeVerminBeastStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 251; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeVerminBeastStatue : Item + { + [Constructable] + public BodyChangeVerminBeastStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Vermin Beast Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeVerminBeastStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeVerminBeast( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeWeaver.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeWeaver.cs new file mode 100644 index 00000000..e57ee52f --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Megarare/BodyChangeWeaver.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeWeaver : Target //FINAL To create a new item, just replace ALL instances of "Weaver" with the new body type in the entire script Find>replace + { + private BodyChangeWeaverStatue m_Deed; + + public BodyChangeWeaver( BodyChangeWeaverStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 140; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeWeaverStatue : Item + { + [Constructable] + public BodyChangeWeaverStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Weaver Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeWeaverStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeWeaver( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeCrane.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeCrane.cs new file mode 100644 index 00000000..3cd04353 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeCrane.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeCrane : Target //FINAL To create a new item, just replace ALL instances of "Crane" with the new body type in the entire script Find>replace + { + private BodyChangeCraneStatue m_Deed; + + public BodyChangeCrane( BodyChangeCraneStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 254; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeCraneStatue : Item + { + [Constructable] + public BodyChangeCraneStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Crane Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeCraneStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeCrane( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeFerret.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeFerret.cs new file mode 100644 index 00000000..8c865fd3 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeFerret.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeFerret : Target //FINAL To create a new item, just replace ALL instances of "Ferret" with the new body type in the entire script Find>replace + { + private BodyChangeFerretStatue m_Deed; + + public BodyChangeFerret( BodyChangeFerretStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 279; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeFerretStatue : Item + { + [Constructable] + public BodyChangeFerretStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Ferret Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeFerretStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeFerret( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantSnake.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantSnake.cs new file mode 100644 index 00000000..47ebd8ee --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantSnake.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGiantSnake : Target //FINAL To create a new item, just replace ALL instances of "GiantSnake" with the new body type in the entire script Find>replace + { + private BodyChangeGiantSnakeStatue m_Deed; + + public BodyChangeGiantSnake( BodyChangeGiantSnakeStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 21; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGiantSnakeStatue : Item + { + [Constructable] + public BodyChangeGiantSnakeStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Giant Snake Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGiantSnakeStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGiantSnake( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantToad.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantToad.cs new file mode 100644 index 00000000..10923f6c --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeGiantToad.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGiantToad : Target //FINAL To create a new item, just replace ALL instances of "GiantToad" with the new body type in the entire script Find>replace + { + private BodyChangeGiantToadStatue m_Deed; + + public BodyChangeGiantToad( BodyChangeGiantToadStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 80; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGiantToadStatue : Item + { + [Constructable] + public BodyChangeGiantToadStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Giant Toad Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGiantToadStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGiantToad( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeHellHound.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeHellHound.cs new file mode 100644 index 00000000..5904e3cc --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeHellHound.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeHellHound : Target //FINAL To create a new item, just replace ALL instances of "HellHound" with the new body type in the entire script Find>replace + { + private BodyChangeHellHoundStatue m_Deed; + + public BodyChangeHellHound( BodyChangeHellHoundStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 96; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeHellHoundStatue : Item + { + [Constructable] + public BodyChangeHellHoundStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Hell Hound Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeHellHoundStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeHellHound( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeKirin.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeKirin.cs new file mode 100644 index 00000000..5173ce86 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeKirin.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeKirin : Target //FINAL To create a new item, just replace ALL instances of "Kirin" with the new body type in the entire script Find>replace + { + private BodyChangeKirinStatue m_Deed; + + public BodyChangeKirin( BodyChangeKirinStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 132; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeKirinStatue : Item + { + [Constructable] + public BodyChangeKirinStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Kirin Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeKirinStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeKirin( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeLion.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeLion.cs new file mode 100644 index 00000000..9519d13e --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeLion.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeLion : Target //FINAL To create a new item, just replace ALL instances of "Lion" with the new body type in the entire script Find>replace + { + private BodyChangeLionStatue m_Deed; + + public BodyChangeLion( BodyChangeLionStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 187; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeLionStatue : Item + { + [Constructable] + public BodyChangeLionStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Lion Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeLionStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeLion( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangePolarBear.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangePolarBear.cs new file mode 100644 index 00000000..b1d1ed5c --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangePolarBear.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangePolarBear : Target //FINAL To create a new item, just replace ALL instances of "PolarBear" with the new body type in the entire script Find>replace + { + private BodyChangePolarBearStatue m_Deed; + + public BodyChangePolarBear( BodyChangePolarBearStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 179; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangePolarBearStatue : Item + { + [Constructable] + public BodyChangePolarBearStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Polar Bear Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangePolarBearStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangePolarBear( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeScorpion.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeScorpion.cs new file mode 100644 index 00000000..613d2908 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeScorpion.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeScorpion : Target //FINAL To create a new item, just replace ALL instances of "Scorpion" with the new body type in the entire script Find>replace + { + private BodyChangeScorpionStatue m_Deed; + + public BodyChangeScorpion( BodyChangeScorpionStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 48; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeScorpionStatue : Item + { + [Constructable] + public BodyChangeScorpionStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Scorpion Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeScorpionStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeScorpion( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSlime.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSlime.cs new file mode 100644 index 00000000..f05df716 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSlime.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeSlime : Target //FINAL To create a new item, just replace ALL instances of "Slime" with the new body type in the entire script Find>replace + { + private BodyChangeSlimeStatue m_Deed; + + public BodyChangeSlime( BodyChangeSlimeStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 51; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeSlimeStatue : Item + { + [Constructable] + public BodyChangeSlimeStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Slime Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeSlimeStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeSlime( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSnake.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSnake.cs new file mode 100644 index 00000000..10f42689 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSnake.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeSnake : Target //FINAL To create a new item, just replace ALL instances of "Snake" with the new body type in the entire script Find>replace + { + private BodyChangeSnakeStatue m_Deed; + + public BodyChangeSnake( BodyChangeSnakeStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 52; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeSnakeStatue : Item + { + [Constructable] + public BodyChangeSnakeStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Snake Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeSnakeStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeSnake( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSpider.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSpider.cs new file mode 100644 index 00000000..7bcd9d08 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeSpider.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeSpider : Target //FINAL To create a new item, just replace ALL instances of "Spider" with the new body type in the entire script Find>replace + { + private BodyChangeSpiderStatue m_Deed; + + public BodyChangeSpider( BodyChangeSpiderStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 28; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeSpiderStatue : Item + { + [Constructable] + public BodyChangeSpiderStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Spider Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeSpiderStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeSpider( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeToad.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeToad.cs new file mode 100644 index 00000000..875db788 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeToad.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeToad : Target //FINAL To create a new item, just replace ALL instances of "Toad" with the new body type in the entire script Find>replace + { + private BodyChangeToadStatue m_Deed; + + public BodyChangeToad( BodyChangeToadStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 81; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeToadStatue : Item + { + [Constructable] + public BodyChangeToadStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Toad Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeToadStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeToad( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeTurtle.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeTurtle.cs new file mode 100644 index 00000000..2734dda7 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Mid/BodyChangeTurtle.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeTurtle : Target //FINAL To create a new item, just replace ALL instances of "Turtle" with the new body type in the entire script Find>replace + { + private BodyChangeTurtleStatue m_Deed; + + public BodyChangeTurtle( BodyChangeTurtleStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 91; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeTurtleStatue : Item + { + [Constructable] + public BodyChangeTurtleStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Turtle Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeTurtleStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeTurtle( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrenziedOstard.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrenziedOstard.cs new file mode 100644 index 00000000..81c0b365 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrenziedOstard.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeFrenziedOstard : Target //FINAL To create a new item, just replace ALL instances of "FrenziedOstard" with the new body type in the entire script Find>replace + { + private BodyChangeFrenziedOstardStatue m_Deed; + + public BodyChangeFrenziedOstard( BodyChangeFrenziedOstardStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 219; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeFrenziedOstardStatue : Item + { + [Constructable] + public BodyChangeFrenziedOstardStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Frenzied Ostard Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeFrenziedOstardStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeFrenziedOstard( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrostSpider.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrostSpider.cs new file mode 100644 index 00000000..62d1a33e --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeFrostSpider.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeFrostSpider : Target //FINAL To create a new item, just replace ALL instances of "FrostSpider" with the new body type in the entire script Find>replace + { + private BodyChangeFrostSpiderStatue m_Deed; + + public BodyChangeFrostSpider( BodyChangeFrostSpiderStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 68; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeFrostSpiderStatue : Item + { + [Constructable] + public BodyChangeFrostSpiderStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Frost Spider Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeFrostSpiderStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeFrostSpider( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGazerHound.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGazerHound.cs new file mode 100644 index 00000000..66485a50 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGazerHound.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGazerHound : Target //FINAL To create a new item, just replace ALL instances of "GazerHound" with the new body type in the entire script Find>replace + { + private BodyChangeGazerHoundStatue m_Deed; + + public BodyChangeGazerHound( BodyChangeGazerHoundStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 186; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGazerHoundStatue : Item + { + [Constructable] + public BodyChangeGazerHoundStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Gazer Hound Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGazerHoundStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGazerHound( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGremlin.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGremlin.cs new file mode 100644 index 00000000..38a36085 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeGremlin.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeGremlin : Target //FINAL To create a new item, just replace ALL instances of "Gremlin" with the new body type in the entire script Find>replace + { + private BodyChangeGremlinStatue m_Deed; + + public BodyChangeGremlin( BodyChangeGremlinStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 114; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeGremlinStatue : Item + { + [Constructable] + public BodyChangeGremlinStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Gremlin Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeGremlinStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeGremlin( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeMysticalFox.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeMysticalFox.cs new file mode 100644 index 00000000..1d348480 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeMysticalFox.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeMysticalFox : Target //FINAL To create a new item, just replace ALL instances of "MysticalFox" with the new body type in the entire script Find>replace + { + private BodyChangeMysticalFoxStatue m_Deed; + + public BodyChangeMysticalFox( BodyChangeMysticalFoxStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 246; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeMysticalFoxStatue : Item + { + [Constructable] + public BodyChangeMysticalFoxStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A MysticalFox Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeMysticalFoxStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeMysticalFox( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangePlainsBeast.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangePlainsBeast.cs new file mode 100644 index 00000000..911c1529 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangePlainsBeast.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangePlainsBeast : Target //FINAL To create a new item, just replace ALL instances of "PlainsBeast" with the new body type in the entire script Find>replace + { + private BodyChangePlainsBeastStatue m_Deed; + + public BodyChangePlainsBeast( BodyChangePlainsBeastStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 19; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangePlainsBeastStatue : Item + { + [Constructable] + public BodyChangePlainsBeastStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Plains Beast Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangePlainsBeastStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangePlainsBeast( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeRockLobster.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeRockLobster.cs new file mode 100644 index 00000000..01dc74e8 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeRockLobster.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeRockLobster : Target //FINAL To create a new item, just replace ALL instances of "RockLobster" with the new body type in the entire script Find>replace + { + private BodyChangeRockLobsterStatue m_Deed; + + public BodyChangeRockLobster( BodyChangeRockLobsterStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 23; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeRockLobsterStatue : Item + { + [Constructable] + public BodyChangeRockLobsterStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Rock Lobster Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeRockLobsterStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeRockLobster( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeShadowLion.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeShadowLion.cs new file mode 100644 index 00000000..90d22e6f --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeShadowLion.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeShadowLion : Target //FINAL To create a new item, just replace ALL instances of "ShadowLion" with the new body type in the entire script Find>replace + { + private BodyChangeShadowLionStatue m_Deed; + + public BodyChangeShadowLion( BodyChangeShadowLionStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 118; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeShadowLionStatue : Item + { + [Constructable] + public BodyChangeShadowLionStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Shadow Lion Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeShadowLionStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeShadowLion( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeTigerBeetle.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeTigerBeetle.cs new file mode 100644 index 00000000..d8589f29 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeTigerBeetle.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeTigerBeetle : Target //FINAL To create a new item, just replace ALL instances of "TigerBeetle" with the new body type in the entire script Find>replace + { + private BodyChangeTigerBeetleStatue m_Deed; + + public BodyChangeTigerBeetle( BodyChangeTigerBeetleStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 169; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeTigerBeetleStatue : Item + { + [Constructable] + public BodyChangeTigerBeetleStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Tiger Beetle Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeTigerBeetleStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeTigerBeetle( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeWidowSpider.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeWidowSpider.cs new file mode 100644 index 00000000..9272b0fd --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyChangeWidowSpider.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeWidowSpider : Target //FINAL To create a new item, just replace ALL instances of "WidowSpider" with the new body type in the entire script Find>replace + { + private BodyChangeWidowSpiderStatue m_Deed; + + public BodyChangeWidowSpider( BodyChangeWidowSpiderStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 173; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeWidowSpiderStatue : Item + { + [Constructable] + public BodyChangeWidowSpiderStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "An Widow Spider Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeWidowSpiderStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeWidowSpider( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyScorpoid.cs b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyScorpoid.cs new file mode 100644 index 00000000..9d64f4a5 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Polyjuice/Rare/BodyScorpoid.cs @@ -0,0 +1,98 @@ +using System; +using Server.Network; +using Server.Prompts; +using Server.Items; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Items +{ + public class BodyChangeScorpoid : Target //FINAL To create a new item, just replace ALL instances of "Scorpoid" with the new body type in the entire script Find>replace + { + private BodyChangeScorpoidStatue m_Deed; + + public BodyChangeScorpoid( BodyChangeScorpoidStatue deed ) : base( 1, false, TargetFlags.None ) + { + m_Deed = deed; + } + + protected override void OnTarget( Mobile from, object target ) + { + if ( target != null && target is BaseCreature ) + { + BaseCreature t = ( BaseCreature ) target; + + if ( t.ControlMaster != from ) + { + from.SendMessage( "That is not your pet!" ); + } + else + + { + t.Body = 315; // FINAL this is the body id the pet will take + m_Deed.Delete(); // Delete the deed + + } + + } + else + { + from.SendMessage( "That is not a valid traget." ); + } + } + } + + public class BodyChangeScorpoidStatue : Item + { + [Constructable] + public BodyChangeScorpoidStatue() : base(0x42B4) // FINAL 0xxxxx number this is the item ID for the item player double clicks + { + Weight = 1.0; + Name = "A Scorpoid Polyjuice"; + Stackable = false; + //Hue = 1176; + } + + public BodyChangeScorpoidStatue( Serial serial ) : base( serial ) + { + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + + list.Add("Changes a pet's body." ); + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + //LootType = LootType.Blessed; + + int version = reader.ReadInt(); + } + + public override bool DisplayLootType{ get{ return false; } } + + public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target + { + if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else + { + from.SendMessage( "Choose the pet you wish to change." ); + from.Target = new BodyChangeScorpoid( this ); // Call our target + } + } + } +} \ No newline at end of file diff --git a/Data/Scripts/Custom/animal broker/Rewards/Rare Colors/FrostBluePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Rare Colors/FrostBluePetDye.cs new file mode 100644 index 00000000..5e300187 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Rare Colors/FrostBluePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class FrostBluePetDye : Item + { + + [Constructable] + public FrostBluePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1152; + Name="pet dye (Frost Blue)"; + } + + public FrostBluePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new FrostBlueDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class FrostBlueDyeTarget : Target + { + private Mobile m_Owner; + + private FrostBluePetDye m_Powder; + + public FrostBlueDyeTarget( FrostBluePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1152; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/Rewards/Rare Colors/IceWhitePetDye.cs b/Data/Scripts/Custom/animal broker/Rewards/Rare Colors/IceWhitePetDye.cs new file mode 100644 index 00000000..338078aa --- /dev/null +++ b/Data/Scripts/Custom/animal broker/Rewards/Rare Colors/IceWhitePetDye.cs @@ -0,0 +1,110 @@ +using Server.Targeting; +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Menus; +using Server.Menus.Questions; +using Server.Mobiles; +using System.Collections; + +namespace Server.Items +{ + public class IceWhitePetDye : Item + { + + [Constructable] + public IceWhitePetDye() : base( 0xE2B ) + { + Weight = 1.0; + Movable = true; + Hue = 1153; + Name="pet dye (Ice White)"; + } + + public IceWhitePetDye( Serial serial ) : base( serial ) + { + + + } + public override void OnDoubleClick( Mobile from ) + { + + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + } + else if( from.InRange( this.GetWorldLocation(), 1 ) ) + { + from.SendMessage( "What do you wish to dye?" ); + from.Target = new IceWhiteDyeTarget( this ); + } + else + { + from.SendLocalizedMessage( 500446 ); // That is too far away. + } + + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + } + + + private class IceWhiteDyeTarget : Target + { + private Mobile m_Owner; + + private IceWhitePetDye m_Powder; + + public IceWhiteDyeTarget( IceWhitePetDye charge ) : base ( 10, false, TargetFlags.None ) + { + m_Powder=charge; + } + + protected override void OnTarget( Mobile from, object target ) + { + + if ( target == from ) + from.SendMessage( "This can only be used on pets." ); + + else if ( target is PlayerMobile ) + from.SendMessage( "You cannot dye them." ); + + else if ( target is Item ) + from.SendMessage( "You cannot dye that." ); + + else if ( target is BaseCreature ) + { + BaseCreature c = (BaseCreature)target; + if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) + { + from.SendMessage( "You cannot dye them." ); + } + else if ( c.ControlMaster != from && c.Controlled == false ) + { + from.SendMessage( "This is not your pet." ); + } + else if ( c.Controlled == true && c.ControlMaster == from) + { + c.Hue = 1153; + from.SendMessage( 53, "Your pet has now been dyed." ); + from.PlaySound( 0x23E ); + m_Powder.Delete(); + } + + } + } + } + } +} diff --git a/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBook.cs b/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBook.cs new file mode 100644 index 00000000..2f4ecf75 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBook.cs @@ -0,0 +1,129 @@ +//#01 ordre alphab�tique + +using System; +using System.Collections; +using Server; +using Server.Gumps; +using Server.Multis; +using Server.Prompts; +using Server.Mobiles; +using Server.ContextMenus; + +namespace Server.Items +{ + public class TamingBODBook : Item + { + private ArrayList m_Entries; + + public ArrayList Entries + { + get{ return m_Entries; } + } + + [Constructable] + public TamingBODBook() : base( 0x2259 ) + { + Weight = 1.0; + Hue = 1204; + Name= "Taming BOD Book"; + m_Entries = new ArrayList(); + } + + public override void OnDoubleClick( Mobile from ) + { + if ( !from.InRange( GetWorldLocation(), 2 ) ) + from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. + else if ( m_Entries.Count == 0 ) + from.SendLocalizedMessage( 1062381 ); // The book is empty. + else if ( from is PlayerMobile ) + from.SendGump( new TamingBODBookGump( (PlayerMobile)from, this ) ); + } + + public override bool OnDragDrop( Mobile from, Item dropped ) + { + if ( dropped is TamingBOD ) + { + TamingBOD MC = dropped as TamingBOD; + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1062385 ); // You must have the book in your backpack to add deeds to it. + return false; + } + else if ( m_Entries.Count < 20 ) + { + m_Entries.Add( new TamingBODEntry( MC.AmountTamed, MC.AmountToTame, MC.Reward ) ); + + m_Entries.Sort();//#01 + + InvalidateProperties(); + + from.SendLocalizedMessage( 1062386 ); // Deed added to book. + + if ( from is PlayerMobile ) + from.SendGump( new TamingBODBookGump( (PlayerMobile)from, this ) ); + + dropped.Delete(); + return true; + } + else + { + from.SendLocalizedMessage( 1062387 ); // The book is full of deeds. + return false; + } + } + + from.SendMessage( "This is not a valid contract."); + return false; + } + + public TamingBODBook( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + + writer.WriteEncodedInt( (int) m_Entries.Count ); + + for ( int i = 0; i < m_Entries.Count; ++i ) + { + TamingBODEntry obj = m_Entries[i] as TamingBODEntry; + + if( obj != null ) + obj.Serialize( writer ); + } + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + + switch ( version ) + { + case 0: + { + int count = reader.ReadEncodedInt(); + + m_Entries = new ArrayList( count ); + + for ( int i = 0; i < count; ++i ) + m_Entries.Add( new TamingBODEntry( reader ) ); + break; + } + } + } + + public override void GetProperties( ObjectPropertyList list ) + { + base.GetProperties( list ); + + list.Add( 1062344, m_Entries.Count.ToString() ); // Deeds in book: ~1_val~ + + } + } +} diff --git a/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBookGump.cs b/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBookGump.cs new file mode 100644 index 00000000..8c1f4cb4 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODBookGump.cs @@ -0,0 +1,136 @@ +using System; +using Server; +using Server.Items; +using Server.Network; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Gumps +{ + public class TamingBODBookGump : Gump + { + private Mobile m; + private TamingBODBook b; + + public TamingBODBookGump( Mobile from, TamingBODBook book ) : base( 0, 0 ) + { + from.CloseGump( typeof( TamingBODBookGump ) ); + + this.Closable=true; + this.Disposable=true; + this.Dragable=true; + this.Resizable=false; + + m = from; + b = book; + + this.AddPage(0); + + this.AddBackground(8, 10, 700, 80+(book.Entries.Count*30), 9200); + + this.AddAlphaRegion(142, 21, 201, 20); + this.AddLabel(158, 22, 50, @"MONSTER TAMING BOOK"); + + this.AddAlphaRegion(28, 52, 150, 15); + this.AddAlphaRegion(180, 52, 70, 15); + this.AddAlphaRegion(252, 52, 70, 15); + this.AddAlphaRegion(324, 52, 100, 15); + this.AddLabel(30, 51, 50, @""); + this.AddLabel(182, 51, 50, @"Tamed"); + this.AddLabel(254, 51, 50, @"To Tame"); + this.AddLabel(326, 51, 50, @"Reward"); + + for( int i = 0; i < book.Entries.Count; ++i) + { + TamingBODEntry MCE = book.Entries[i] as TamingBODEntry; + this.AddAlphaRegion(28, 71+(i*30), 150, 15); + this.AddAlphaRegion(180, 71+(i*30), 70, 15); + this.AddAlphaRegion(252, 71+(i*30), 70, 15); + this.AddAlphaRegion(324, 71+(i*30), 100, 15); + this.AddLabel(29, 70+(i*30), 50, ""); + this.AddLabel(182, 70+(i*30), 50, ""+MCE.AmountTamed); + this.AddLabel(254, 70+(i*30), 50, ""+MCE.AmountToTame); + this.AddLabel(326, 70+(i*30), 50, ""+MCE.Reward); + this.AddButton(429, 73+(i*30), 2362, 2362, 200+i, GumpButtonType.Reply, 0); + this.AddButton(444, 73+(i*30), 2360, 2360, 100+i, GumpButtonType.Reply, 0); + } + } + + public override void OnResponse( NetState state, RelayInfo info ) + { + if ( info.ButtonID > 0 ) + { + if( info.ButtonID >= 200 )// Add Corpse + { + TamingBODEntry MCE = b.Entries[ info.ButtonID % 100 ] as TamingBODEntry; + if (MCE.AmountToTame >= MCE.AmountTamed) + { + m.SendMessage("You can't add another pet to this contract."); + return; + } + m.SendMessage("Choose the Tamable to add."); + m.Target = new TameCreatureBookTarget( b,info.ButtonID % 100 ); + } + else if ( info.ButtonID >= 100 ) // One removes the deed book. + { + TamingBODEntry MCE = b.Entries[ info.ButtonID % 100 ] as TamingBODEntry; + TamingBOD MC = new TamingBOD( MCE.AmountTamed, MCE.AmountToTame, MCE.Reward ); + m.AddToBackpack( MC ); + b.Entries.RemoveAt( info.ButtonID % 100 ); + } + + m.SendGump( new TamingBODBookGump( (PlayerMobile) m, b ) );//#01 + } + } + } + public class TameCreatureBookTarget : Target + { + private TamingBODEntry MCE; + private TamingBODBook b; + + public TameCreatureBookTarget( TamingBODBook book, int i ) : base( -1, true, TargetFlags.None ) + { + MCE = book.Entries[i] as TamingBODEntry; + b = book; + } + + protected override void OnTarget( Mobile from, object o ) + { + if ( o is BaseCreature ) + { + BaseCreature pet = (BaseCreature)o; + + if ( !pet.Controlled || pet.ControlMaster != from ) + from.SendLocalizedMessage( 1042562 ); // You do not own that pet! + else if ( pet.IsDeadPet ) + from.SendLocalizedMessage( 1049668 ); // Living pets only, please. + else if ( pet.Summoned ) + from.SendMessage( "This creature was summoned." ); // I can not PetSale summoned creatures. + else if ( pet.Body.IsHuman ) + from.SendMessage( "This won't work on humans." ); // HA HA HA! Sorry, I am not an inn. + else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) ) + from.SendLocalizedMessage( 1042563 ); // You need to unload your pet. + else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map ) + from.SendLocalizedMessage( 1042564 ); // I'm sorry. Your pet seems to be busy. + else if (pet.Tamable) + { + MCE.Reward += (int)((double)Server.Mobiles.AnimalTrainerLord.ValuatePet( pet, from ) * 0.75); + MCE.AmountTamed += 1; + pet.ControlTarget = null; + pet.ControlOrder = OrderType.None; + pet.Internalize(); + pet.SetControlMaster( null ); + pet.SummonMaster = null; + pet.Delete(); + from.CloseGump( typeof( TamingBODBookGump ) ); + from.SendGump( new TamingBODBookGump( (PlayerMobile)from, b ) ); + } + else + from.SendMessage("This pet won't work."); + } + else + from.SendMessage("This is not a tamable pet."); + } + + } +} diff --git a/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODEntry.cs b/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODEntry.cs new file mode 100644 index 00000000..966f3ac3 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/TamingBOD/Book/TamingBODEntry.cs @@ -0,0 +1,73 @@ +using System; +using Server; +using Server.Gumps; +using Server.Mobiles; + +namespace Server.Items +{ + public class TamingBODEntry : IComparable //#01 + { + + public int CompareTo( object obj ) + { + int ok = 5; + return ok; + } + + private int reward; + private int m_amount; + private int m_tamed; + + public int Reward + { + get{ return reward; } + set{ reward = value; } + } + + public int AmountToTame + { + get{ return m_amount; } + set{ m_amount = value; } + } + + public int AmountTamed + { + get{ return m_tamed; } + set{ m_tamed = value; } + } + + public TamingBODEntry( int ak, int atk, int gpreward ) + { + AmountToTame = atk; + AmountTamed = ak; + Reward = gpreward; + } + + + public TamingBODEntry( GenericReader reader ) + { + Deserialize( reader ); + } + + public void Serialize( GenericWriter writer ) + { + writer.Write( (int) 0 ); // version + + writer.Write( reward ); + writer.Write( m_amount ); + writer.Write( m_tamed ); + } + + public void Deserialize( GenericReader reader ) + { + int version = reader.ReadInt(); + + reward = reader.ReadInt(); + m_amount = reader.ReadInt(); + m_tamed = reader.ReadInt(); + + if ( m_tamed > m_amount ) + m_tamed = m_amount; + } + } +} diff --git a/Data/Scripts/Custom/animal broker/TamingBOD/TamingBOD.cs b/Data/Scripts/Custom/animal broker/TamingBOD/TamingBOD.cs new file mode 100644 index 00000000..1251f375 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/TamingBOD/TamingBOD.cs @@ -0,0 +1,371 @@ +using System; +using Server; +using Server.Gumps; +using Server.Mobiles; + +namespace Server.Items +{ + [Flipable( 0x14EF, 0x14F0 )] + public class TamingBOD : Item + { + //private int m_monster; + private int reward; + private int m_amount; + private int m_tamed; + + /*[CommandProperty( AccessLevel.GameMaster )] + public int Monster + { + get{ return m_monster; } + set{ m_monster = value; } + }*/ + + [CommandProperty( AccessLevel.GameMaster )] + public int Reward + { + get{ return reward; } + set{ reward = value; } + } + + [CommandProperty( AccessLevel.GameMaster )] + public int AmountToTame + { + get{ return m_amount; } + set{ m_amount = value; } + } + + [CommandProperty( AccessLevel.GameMaster )] + public int AmountTamed + { + get{ return m_tamed; } + set{ m_tamed = value; } + } + + [Constructable] + public TamingBOD() : base( 0x14EF ) + { + Weight = 1; + Movable = true; + double pimple = Utility.RandomDouble(); + if (pimple >= 0.98) + AmountToTame = Utility.RandomMinMax( 20, 30 ); + else if (pimple >= 0.94 ) + AmountToTame = Utility.RandomMinMax( 10, 20 ); + else if (pimple >= 0.70 ) + AmountToTame = Utility.RandomMinMax( 5, 10 ); + else + AmountToTame = Utility.RandomMinMax( 1, 5 ); + + Reward = 0;//GetValue( price ) * AmountToTame ; + Name = "Contract: " + AmountToTame + " creatures"; + AmountTamed = 0; + } + + [Constructable] + public TamingBOD( int atk ) : base( 0x14F0 ) + { + Weight = 1; + Movable = true; + //Monster = monster; + AmountToTame = atk; + Reward = 0; + Name = "Contract: " + AmountToTame + " creatures"; + AmountTamed = 0; + } + + [Constructable] + public TamingBOD( int ak, int atk, int gpreward) : this( atk ) + { + AmountTamed = ak; + Reward = gpreward; + } + + public override void AddNameProperties( ObjectPropertyList list ) + { + + base.AddNameProperties( list ); + + list.Add( "This deed is currently worth " + Reward + " gold." ); + list.Add( "Add more creatures to increase the payout." ); + } + + public override void OnDoubleClick( Mobile from ) + { + if( IsChildOf( from.Backpack ) ) + { + from.SendGump( new TamingBODGump( from, this ) ); + } + else + { + from.SendLocalizedMessage( 1047012 ); // This contract must be in your backpack to use it + } + } + + private static Item TryGetItem(int goldAmount) + { + int reward = 0; + if (goldAmount < 2500) + reward = Utility.RandomMinMax(0, 60); // 100% nothing + else if (goldAmount < 5000) + reward = Utility.RandomMinMax(50, 250); // 20% nothing, 80% easy + else if (goldAmount < 10000) + reward = Utility.RandomMinMax(100, 350); // 60% easy // 40% medium + else if (goldAmount < 30000) + reward = Utility.RandomMinMax(200, 400); // 25% easy // 62% medium // 13% rare + else if (goldAmount < 60000) + reward = Utility.RandomMinMax(300, 500); // 37% medium // 48% rare // 15% impossible + else if (goldAmount < 100000) + reward = Utility.RandomMinMax(400, 510); // 70% rare // 30% impossible + else if (goldAmount < 150000) + reward = Utility.RandomMinMax(450, 525); // 40% rare // 60% impossible + else if (goldAmount >= 150000) + reward = Utility.RandomMinMax(490, 600); // 40% rare // 60% impossible + + if (500 < reward) // impossible finds + { + switch ( Utility.Random( 62 ) ) // 8% + { + case 0: return new ParagonPetDeed(); + case 1: return new PowerScroll( SkillName.Druidism, 120); + case 2: return new PowerScroll( SkillName.Taming, 120); + case 3: return Construct( m_MegaRareMorph ) as Item; + } + } + + if (470 < reward) // impossible finds + { + switch ( Utility.Random( 280 ) ) // 5% + { + case 0: return new ParagonPetDeed(); + case 1: return new PetDyeTub(); + case 2: return new PowerScroll( SkillName.Druidism, 115); + case 3: return new PowerScroll( SkillName.Taming, 115); + case 4: return new PetGrowthDeedStrong( ); + case 5: return Construct( m_MegaRareMorph ) as Item; + case 6: return Construct( m_RareMorph ) as Item; + } + } + + if (375 < reward) // rare finds + { + switch ( Utility.Random( 150 ) ) // 10% + { + case 0: return new PetEasingDeed(); + case 1: return new PetBondDeed(); + case 2: return new BallOfSummoning(); + case 3: return new BraceletOfBinding(); + case 4: return new PowerScroll( SkillName.Druidism, 110); + case 5: return new PowerScroll( SkillName.Taming, 110); + case 6: return new AlienEgg( ); + case 7: return new DragonEgg( ); + case 8: return new PetGrowthDeedMid( ); + case 9: return Construct( m_MidMorph ) as Item; + case 10: return Construct( m_RareMorph ) as Item; + } + } + + if (250 < reward) // medium finds + { + switch ( Utility.Random( 140 ) ) // 10% + { + case 0: return new PetTrainer(); + case 1: return new MossGreenPetDye(); + case 2: return new FrostBluePetDye(); + case 3: return new BlazePetDye(); + case 4: return new IceWhitePetDye(); + case 5: return new IceBluePetDye(); + case 6: return new IceGreenPetDye(); + case 7: return new PetControlDeed(); + case 8: return new PowerScroll( SkillName.Druidism, 105); + case 9: return new PowerScroll( SkillName.Taming, 105); + case 10: return new PetGrowthDeedWeak( ); + case 11: return Construct( m_LowMorph ) as Item; + case 12: return Construct( m_MidMorph ) as Item; + } + } + + if (100 < reward)// easy finds + { + switch ( Utility.Random( 150 ) ) // 10% chance + { + case 0: return new BluePetDye(); + case 1: return new GreenPetDye(); + case 2: return new OrangePetDye(); + case 3: return new PurplePetDye(); + case 4: return new RedPetDye(); + case 5: return new YellowPetDye(); + case 6: return new BlackPetDye(); + case 7: return new WhitePetDye(); + case 8: return new BloodPetDye(); + case 9: return new GoldPetDye(); + case 10: return new PinkPetDye(); + case 11: return new PowderOfTranslocation(10); + case 12: return new PetGrowthDeedWeak( ); + case 13: return Construct( m_LowMorph ) as Item; + case 14: return Construct( m_LowMorph ) as Item; + } + } + + return null; + } + + public static bool PayRewardTo ( Mobile m_from, TamingBOD MCparent ) + { + if ( MCparent.AmountTamed >= MCparent.AmountToTame) + { + Item shelf = TryGetItem(MCparent.Reward); + Container backpack = m_from.Backpack; + if (shelf != null) + { + backpack.DropItem( shelf ); + m_from.SendMessage("You got a special drop!"); + } + + backpack.DropItem( new BankCheck( MCparent.Reward ) ); + m_from.SendMessage("Your reward was placed in your bag."); + return true; + } + else + { + m_from.SendMessage("There is something wrong with this deed."); + } + + return false; + } + + private static Type[] m_LowMorph = new Type[] + { + + typeof( BodyChangeBlackBearStatue), + typeof( BodyChangeBrownBearStatue), + typeof( BodyChangeCatStatue), + typeof( BodyChangeChickenStatue), + typeof( BodyChangeCowStatue), + typeof( BodyChangeDogStatue), + typeof( BodyChangeEagleStatue), + typeof( BodyChangeFoxStatue), + typeof( BodyChangeGiantRatStatue), + typeof( BodyChangeGoatStatue), + typeof( BodyChangeGorillaStatue), + typeof( BodyChangeHindStatue), + typeof( BodyChangeLlamaStatue), + typeof( BodyChangeOstardStatue), + typeof( BodyChangePantherStatue), + typeof( BodyChangePigStatue), + typeof( BodyChangeRabbitStatue), + typeof( BodyChangeRatStatue), + typeof( BodyChangeSheepStatue), + typeof( BodyChangeSquirrelStatue), + typeof( BodyChangeStagStatue), + typeof( BodyChangeLizardStatue) + }; + + private static Type[] m_MidMorph = new Type[] + { + + typeof( BodyChangeCraneStatue), + typeof( BodyChangeFerretStatue), + typeof( BodyChangeGiantSnakeStatue), + typeof( BodyChangeGiantToadStatue), + typeof( BodyChangeHellHoundStatue), + typeof( BodyChangeKirinStatue), + typeof( BodyChangeLionStatue), + typeof( BodyChangePolarBearStatue), + typeof( BodyChangeScorpionStatue), + typeof( BodyChangeSlimeStatue), + typeof( BodyChangeSnakeStatue), + typeof( BodyChangeSpiderStatue), + typeof( BodyChangeToadStatue), + typeof( BodyChangeKongStatue), + typeof( BodyChangeTurtleStatue) + }; + + private static Type[] m_RareMorph = new Type[] + { + + typeof( BodyChangeFrenziedOstardStatue), + typeof( BodyChangeFrostSpiderStatue), + typeof( BodyChangeGremlinStatue), + typeof( BodyChangeMysticalFoxStatue), + typeof( BodyChangePlainsBeastStatue), + typeof( BodyChangeRockLobsterStatue), + typeof( BodyChangeShadowLionStatue), + typeof( BodyChangeTigerBeetleStatue), + typeof( BodyChangeWidowSpiderStatue), + typeof( BodyChangeScorpoidStatue), + typeof( BodyChangeFlyingFangsStatue), + typeof(BodyChangeGryphonStatue) + }; + + private static Type[] m_MegaRareMorph = new Type[] + { + + typeof( BodyChangeCerberusStatue), + typeof( BodyChangeDepthsBeastStatue), + typeof( BodyChangeGazerHoundStatue), + typeof( BodyChangeGlassSpiderStatue), + typeof( BodyChangeHornedBeetleStatue), + typeof( BodyChangeMagmaHoundStatue), + typeof( BodyChangeRaptorStatue), + typeof( BodyChangeRuneBearStatue), + typeof( BodyChangeStalkerStatue), + typeof( BodyChangeVerminBeastStatue), + typeof( BodyChangeWeaver ) + }; + + public static Item Construct( Type[] types ) + { + if ( types.Length > 0 ) + return Construct( types, Utility.Random( types.Length ) ); + + return null; + } + + public static Item Construct( Type[] types, int index ) + { + if ( index >= 0 && index < types.Length ) + return Construct( types[index] ); + + return null; + } + + public static Item Construct( Type type ) + { + try + { + return Activator.CreateInstance( type ) as Item; + } + catch + { + return null; + } + } + + + public TamingBOD( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.Write( (int) 0 ); // version + + writer.Write( reward ); + writer.Write( m_amount ); + writer.Write( m_tamed ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadInt(); + + reward = reader.ReadInt(); + m_amount = reader.ReadInt(); + m_tamed = reader.ReadInt(); + } + } +} diff --git a/Data/Scripts/Custom/animal broker/TamingBOD/TamingBODGump.cs b/Data/Scripts/Custom/animal broker/TamingBOD/TamingBODGump.cs new file mode 100644 index 00000000..1f08b2f4 --- /dev/null +++ b/Data/Scripts/Custom/animal broker/TamingBOD/TamingBODGump.cs @@ -0,0 +1,121 @@ + +using System; +using Server; +using Server.Items; +using Server.Network; +using Server.Mobiles; +using Server.Targeting; + +namespace Server.Gumps +{ + public class TamingBODGump : Gump + { + private TamingBOD MCparent; + + public TamingBODGump( Mobile from, TamingBOD parentMC ) : base( 0, 0 ) + { + if(from != null)from.CloseGump( typeof( TamingBODGump ) ); + + if(parentMC != null) + { + + MCparent = parentMC; + + this.Closable=true; + this.Disposable=true; + this.Dragable=true; + this.Resizable=false; + + this.AddPage(0); + this.AddBackground(0, 0, 300, 170, 5170); + this.AddLabel(40, 40, 0, @"Contract For: " + parentMC.AmountToTame + " creatures" ); + this.AddLabel(40, 60, 0, @"Quantity Tamed: " + parentMC.AmountTamed); + this.AddLabel(40, 80, 0, @"Reward: " + parentMC.Reward); + if ( parentMC.AmountTamed < parentMC.AmountToTame ) + { + this.AddButton(90, 110, 2061, 2062, 1, GumpButtonType.Reply, 0); + this.AddLabel(104, 108, 0, @"Add creature"); + } + else + { + this.AddButton(90, 110, 2061, 2062, 2, GumpButtonType.Reply, 0); + this.AddLabel(104, 108, 0, @"Reward"); + } + } + } + + public override void OnResponse( NetState state, RelayInfo info ) + { + Mobile m_from = state.Mobile; + + if(m_from != null && MCparent != null) + { + if ( info.ButtonID == 1 ) + { + m_from.SendMessage("Choose the tamed creature to add."); + m_from.Target = new TamingBODTarget( MCparent ); + } + if ( info.ButtonID == 2 ) + { + if (TamingBOD.PayRewardTo(m_from, MCparent)) + MCparent.Delete(); + } + } + } + } + + public class TamingBODTarget : Target + { + private TamingBOD MCparent; + + public TamingBODTarget( TamingBOD parentMC ) : base( -1, true, TargetFlags.None ) + { + MCparent = parentMC; + } + + protected override void OnTarget( Mobile from, object o ) + { + if ( MCparent == null || from == null || o == null ) + { + Console.WriteLine( "TamingBOD: Sa bug !! Mais o�, on sait pas :p" ); + return; + } + + + if ( o is BaseCreature ) + { + BaseCreature pet = (BaseCreature)o; + + if ( !pet.Controlled || pet.ControlMaster != from ) + from.SendLocalizedMessage( 1042562 ); // You do not own that pet! + else if ( pet.IsDeadPet ) + from.SendLocalizedMessage( 1049668 ); // Living pets only, please. + else if ( pet.Summoned ) + from.SendMessage( "This creature was summoned." ); // I can not PetSale summoned creatures. + else if ( pet.Body.IsHuman ) + from.SendMessage( "This won't work on humans." ); // HA HA HA! Sorry, I am not an inn. + else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) ) + from.SendLocalizedMessage( 1042563 ); // You need to unload your pet. + else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map ) + from.SendLocalizedMessage( 1042564 ); // I'm sorry. Your pet seems to be busy. + else if (pet.Tamable) + { + MCparent.Reward += (int)((double)Server.Mobiles.AnimalTrainerLord.ValuatePet( pet, from ) * 0.75); + MCparent.AmountTamed += 1; + MCparent.InvalidateProperties(); + pet.ControlTarget = null; + pet.ControlOrder = OrderType.None; + pet.Internalize(); + pet.SetControlMaster( null ); + pet.SummonMaster = null; + pet.Delete(); + } + else + from.SendMessage("This pet won't work."); + } + else + from.SendMessage("This is not a tamable pet."); + } + + } +} diff --git a/Data/Scripts/Items/Containers/TreasureMapChest.cs b/Data/Scripts/Items/Containers/TreasureMapChest.cs index fb3e17e9..3e3c5554 100644 --- a/Data/Scripts/Items/Containers/TreasureMapChest.cs +++ b/Data/Scripts/Items/Containers/TreasureMapChest.cs @@ -96,31 +96,64 @@ public TreasureMapChest( Mobile owner, int level, bool temporary ) : base( 0xE40 ColorHue2 = "FFB400"; // = SCROLL OF TRANCENDENCE - if ( level >= 4 && Utility.RandomDouble() > 0.9 ) + if ( level >= 4 && Utility.RandomDouble() > 0.6 ) DropItem(ScrollofTranscendence.CreateRandom(level, level * 5)); // = ARTIFACTS - int artychance = GetPlayerInfo.LuckyPlayerArtifacts( owner.Luck ); - if ( Utility.Random( 100 ) < ( ( level * 17 ) + artychance ) ) + if (level >= 7 && Utility.Random(300) < ( ( level * 17 ) + GetPlayerInfo.LuckyPlayerArtifacts( owner.Luck ))) + { + Item arty = Loot.RandomArty(); + DropItem( arty ); + } + else if (level >= 9 && Utility.Random(200) < ( ( level * 17 ) + GetPlayerInfo.LuckyPlayerArtifacts( owner.Luck ))) { Item arty = Loot.RandomArty(); DropItem( arty ); } // = SCROLL OF ALACRITY or POWERSCROLL - if (level > 1) + // higher level chests have a chance of dropping lower level scrolls + if (level > 1) { - if (Utility.RandomDouble() < (0.02 + (level / 200))) + if (Utility.RandomDouble() < (0.06 + (level / 200))) { SkillName WhatS = SpecialScroll.ScrollSkill( 0 ); DropItem(PowerScroll.CreateRandomNoCraft(5, 5)); } + else if (Utility.RandomDouble() < 0.095) + { + SkillName WhatS = SpecialScroll.ScrollSkill( 0 ); + DropItem(new ScrollofAlacrity(WhatS)); + } + } + + if (level > 5) + { + if (Utility.RandomDouble() < (0.04 + (level / 200))) + { + SkillName WhatS = SpecialScroll.ScrollSkill( 0 ); + DropItem(PowerScroll.CreateRandomNoCraft(5, 10)); + } + else if (Utility.RandomDouble() < 0.085) + { + SkillName WhatS = SpecialScroll.ScrollSkill( 0 ); + DropItem(new ScrollofAlacrity(WhatS)); + } + } + + if (level >= 9 ) + { + if (Utility.RandomDouble() < (0.02 + (level / 200))) + { + SkillName WhatS = SpecialScroll.ScrollSkill( 0 ); + DropItem(PowerScroll.CreateRandomNoCraft(5, 15)); + } else if (Utility.RandomDouble() < 0.075) { SkillName WhatS = SpecialScroll.ScrollSkill( 0 ); DropItem(new ScrollofAlacrity(WhatS)); } - } + } int giveRelics = level; Item relic = Loot.RandomRelic( owner ); @@ -226,7 +259,7 @@ public override void OnItemLifted( Mobile from, Item item ) { m_Lifted.Add( item ); - if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to spawn a new monster + if ( 0.2 >= Utility.RandomDouble() ) // 20% chance to spawn a new monster TreasureMap.Spawn( m_Level, GetWorldLocation(), Map, this ); } diff --git a/Data/Scripts/Items/Trades/Cartography/Maps/TreasureMap.cs b/Data/Scripts/Items/Trades/Cartography/Maps/TreasureMap.cs index 11eb1d1a..b9d210dd 100644 --- a/Data/Scripts/Items/Trades/Cartography/Maps/TreasureMap.cs +++ b/Data/Scripts/Items/Trades/Cartography/Maps/TreasureMap.cs @@ -257,10 +257,6 @@ public void OnBeginDig( Mobile from ) { from.SendLocalizedMessage( 503028 ); // The treasure for this map has already been found. } - else if ( m_Level == 0 && !CheckYoung( from ) ) - { - from.SendLocalizedMessage( 1046447 ); // Only a young player may use this treasure map. - } else if ( from != m_Decoder ) { from.SendLocalizedMessage( 503016 ); // Only the person who decoded this map may actually dig up the treasure. @@ -609,24 +605,6 @@ public override void OnDoubleClick( Mobile from ) DisplayTo( from ); } - private bool CheckYoung( Mobile from ) - { - if ( from.AccessLevel >= AccessLevel.GameMaster ) - return true; - - if ( from is PlayerMobile && ((PlayerMobile)from).Young ) - return true; - - if ( from == this.Decoder ) - { - this.Level = 1; - from.SendLocalizedMessage( 1046446 ); // This is now a level one treasure map. - return true; - } - - return false; - } - private double GetMinSkillLevel() { switch ( m_Level ) @@ -653,29 +631,18 @@ public void Decode( Mobile from ) if ( m_Completed || m_Decoder != null ) return; - if ( m_Level == 0 ) + double minSkill = GetMinSkillLevel(); + double maxSkill = minSkill + 30.0; + + if (from.Skills[SkillName.Cartography].Value < minSkill) { - if ( !CheckYoung( from ) ) - { - from.SendLocalizedMessage( 1046447 ); // Only a young player may use this treasure map. - return; - } + from.SendLocalizedMessage(503013); // The map is too difficult to attempt to decode. + return; } - else + else if ( !from.CheckSkill( SkillName.Cartography, ( minSkill-10 ), maxSkill ) ) { - double minSkill = GetMinSkillLevel(); - double maxSkill = minSkill + 30.0; - - if (from.Skills[SkillName.Cartography].Value < minSkill) - { - from.SendLocalizedMessage(503013); // The map is too difficult to attempt to decode. - return; - } - else if ( !from.CheckSkill( SkillName.Cartography, ( minSkill-10 ), maxSkill ) ) - { - from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503018 ); // You fail to make anything of the map. - return; - } + from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503018 ); // You fail to make anything of the map. + return; } from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503019 ); // You successfully decode a treasure map! @@ -692,11 +659,6 @@ public override void DisplayTo( Mobile from ) { SendLocalizedMessageTo( from, 503014 ); // This treasure hunt has already been completed. } - else if ( m_Level == 0 && !CheckYoung( from ) ) - { - from.SendLocalizedMessage( 1046447 ); // Only a young player may use this treasure map. - return; - } else if ( m_Decoder != from && !HasRequiredSkill( from ) ) { from.SendLocalizedMessage( 503031 ); // You did not decode this map and have no clue where to look for the treasure. diff --git a/Data/Scripts/Items/Weapons/Bows/BaseRanged.cs b/Data/Scripts/Items/Weapons/Bows/BaseRanged.cs index 98bd95b8..b7a93652 100644 --- a/Data/Scripts/Items/Weapons/Bows/BaseRanged.cs +++ b/Data/Scripts/Items/Weapons/Bows/BaseRanged.cs @@ -69,6 +69,13 @@ public override TimeSpan OnSwing( Mobile attacker, Mobile defender ) } } + if ( canSwing ) + { + PlayerMobile p = attacker as PlayerMobile; + + canSwing = ( p == null || p.PeacedUntil <= DateTime.Now ); + } + if ( canSwing && attacker.HarmfulCheck( defender ) ) { attacker.DisruptiveAction(); diff --git a/Data/Scripts/Items/Weapons/Maces/BaseWhip.cs b/Data/Scripts/Items/Weapons/Maces/BaseWhip.cs index 8c1f4481..05da6f66 100644 --- a/Data/Scripts/Items/Weapons/Maces/BaseWhip.cs +++ b/Data/Scripts/Items/Weapons/Maces/BaseWhip.cs @@ -11,7 +11,7 @@ public class BaseWhip : BaseBashing public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } } public override WeaponAbility ThirdAbility{ get{ return WeaponAbility.ConcussionBlow; } } public override WeaponAbility FourthAbility{ get{ return WeaponAbility.ArmorIgnore; } } - public override WeaponAbility FifthAbility{ get{ return WeaponAbility.ParalyzingBlow; } } + public override WeaponAbility FifthAbility{ get{ return WeaponAbility.WhirlwindAttack; } } public override int AosStrengthReq{ get{ return 30; } } public override int AosMinDamage{ get{ return 10; } } diff --git a/Data/Scripts/Mobiles/Civilized/Citizens/Citizens.cs b/Data/Scripts/Mobiles/Civilized/Citizens/Citizens.cs index 0b13a3e0..b0435034 100644 --- a/Data/Scripts/Mobiles/Civilized/Citizens/Citizens.cs +++ b/Data/Scripts/Mobiles/Civilized/Citizens/Citizens.cs @@ -154,13 +154,13 @@ public void SetupCitizen() } string dungeon = QuestCharacters.SomePlace( "tavern" ); - if ( Utility.RandomMinMax( 1, 3 ) == 1 ){ dungeon = RandomThings.MadeUpDungeon(); } + if ( 40 <= Utility.RandomMinMax( 1, 100 ) ){ dungeon = RandomThings.MadeUpDungeon(); } string Clues = QuestCharacters.SomePlace( "tavern" ); - if ( Utility.RandomMinMax( 1, 3 ) == 1 ){ Clues = RandomThings.MadeUpDungeon(); } + if ( 40 <= Utility.RandomMinMax( 1, 100 ) ){ Clues = RandomThings.MadeUpDungeon(); } string city = RandomThings.GetRandomCity(); - if ( Utility.RandomMinMax( 1, 3 ) == 1 ){ city = RandomThings.MadeUpCity(); } + if ( 40 <= Utility.RandomMinMax( 1, 100 ) ){ city = RandomThings.MadeUpCity(); } string adventurer = Server.Misc.TavernPatrons.Adventurer(); @@ -169,9 +169,9 @@ public void SetupCitizen() item = "the '" + cultInfo.ToTitleCase(item) + "'"; string locale = Server.Items.SomeRandomNote.GetSpecialItem( relic, 0 ); - if ( Utility.RandomBool() ) // CITIZENS LIE HALF THE TIME + if ( Utility.RandomBool() ) { - if ( Utility.RandomBool() ){ locale = RandomThings.MadeUpDungeon(); } + if ( 40 <= Utility.RandomMinMax( 1, 100 ) ){ locale = RandomThings.MadeUpDungeon(); } // 40% chance of being a lie else { locale = QuestCharacters.SomePlace( null ); } } diff --git a/Data/Scripts/Mobiles/Demons/Archfiend.cs b/Data/Scripts/Mobiles/Demons/Archfiend.cs index bb93c826..ba9d9397 100644 --- a/Data/Scripts/Mobiles/Demons/Archfiend.cs +++ b/Data/Scripts/Mobiles/Demons/Archfiend.cs @@ -128,6 +128,9 @@ public override void OnDeath( Container c ) public override int Skeletal{ get{ return Utility.Random(5); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Devil; } } + public override int Cloths{ get{ return 7; } } + public override ClothType ClothType{ get{ return ClothType.Fiendish; } } + public Archfiend( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Demons/Fiend.cs b/Data/Scripts/Mobiles/Demons/Fiend.cs index f7589b3e..5cf2bce1 100644 --- a/Data/Scripts/Mobiles/Demons/Fiend.cs +++ b/Data/Scripts/Mobiles/Demons/Fiend.cs @@ -126,6 +126,9 @@ public override void GenerateLoot() public override int Skeletal{ get{ return Utility.Random(5); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Devil; } } + public override int Cloths{ get{ return 3; } } + public override ClothType ClothType{ get{ return ClothType.Fiendish; } } + public Fiend( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Demons/FireDemon.cs b/Data/Scripts/Mobiles/Demons/FireDemon.cs index 851e2e6e..6df79b20 100644 --- a/Data/Scripts/Mobiles/Demons/FireDemon.cs +++ b/Data/Scripts/Mobiles/Demons/FireDemon.cs @@ -62,6 +62,9 @@ public override void GenerateLoot() public override int Skeletal{ get{ return Utility.Random(3); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Devil; } } + public override int Cloths{ get{ return 5; } } + public override ClothType ClothType{ get{ return ClothType.Pyre; } } + public FireDemon( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Goliaths/Ettins/ArcticEttin.cs b/Data/Scripts/Mobiles/Goliaths/Ettins/ArcticEttin.cs index 5f5e7160..0781bb43 100644 --- a/Data/Scripts/Mobiles/Goliaths/Ettins/ArcticEttin.cs +++ b/Data/Scripts/Mobiles/Goliaths/Ettins/ArcticEttin.cs @@ -69,6 +69,9 @@ public override void GenerateLoot() public override int Skeletal{ get{ return Utility.Random(2); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Colossal; } } + public override int Cloths{ get{ return 8; } } + public override ClothType ClothType{ get{ return ClothType.Arctic; } } + public ArcticEttin( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Goliaths/Ogres/ArcticOgreLord.cs b/Data/Scripts/Mobiles/Goliaths/Ogres/ArcticOgreLord.cs index a6a6e1d0..e46a5dfe 100644 --- a/Data/Scripts/Mobiles/Goliaths/Ogres/ArcticOgreLord.cs +++ b/Data/Scripts/Mobiles/Goliaths/Ogres/ArcticOgreLord.cs @@ -92,6 +92,9 @@ public override void OnDeath( Container c ) public override int Skeletal{ get{ return Utility.Random(4); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Ogre; } } + public override int Cloths{ get{ return 15; } } + public override ClothType ClothType{ get{ return ClothType.Arctic; } } + public ArcticOgreLord( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Humanoids/MindFlayer.cs b/Data/Scripts/Mobiles/Humanoids/MindFlayer.cs index 52e06ffa..106b63a1 100644 --- a/Data/Scripts/Mobiles/Humanoids/MindFlayer.cs +++ b/Data/Scripts/Mobiles/Humanoids/MindFlayer.cs @@ -66,6 +66,9 @@ public override void GenerateLoot() public override int Meat{ get{ return 1; } } public override int TreasureMapLevel{ get{ return Core.AOS ? 2 : 0; } } + public override int Cloths{ get{ return 5; } } + public override ClothType ClothType{ get{ return ClothType.Mysterious; } } + public void SpawnCreature( Mobile target ) { Map map = this.Map; diff --git a/Data/Scripts/Mobiles/Humanoids/Serpents/FireNaga.cs b/Data/Scripts/Mobiles/Humanoids/Serpents/FireNaga.cs index 82bc4186..dd1255f3 100644 --- a/Data/Scripts/Mobiles/Humanoids/Serpents/FireNaga.cs +++ b/Data/Scripts/Mobiles/Humanoids/Serpents/FireNaga.cs @@ -63,6 +63,9 @@ public override void GenerateLoot() public override int Skin{ get{ return Utility.Random(3); } } public override SkinType SkinType{ get{ return SkinType.Snake; } } + public override int Cloths{ get{ return 8; } } + public override ClothType ClothType{ get{ return ClothType.Pyre; } } + public FireNaga(Serial serial) : base(serial) { } diff --git a/Data/Scripts/Mobiles/Insects/Spiders/DreadSpider.cs b/Data/Scripts/Mobiles/Insects/Spiders/DreadSpider.cs index 4325c00e..619a7a76 100644 --- a/Data/Scripts/Mobiles/Insects/Spiders/DreadSpider.cs +++ b/Data/Scripts/Mobiles/Insects/Spiders/DreadSpider.cs @@ -72,6 +72,9 @@ public override void GenerateLoot() public override Poison HitPoison{ get{ return Poison.Lethal; } } public override int TreasureMapLevel{ get{ return 3; } } + public override int Cloths{ get{ return 12; } } + public override ClothType ClothType{ get{ return ClothType.Silk; } } + public DreadSpider( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Insects/Spiders/GiantSpider.cs b/Data/Scripts/Mobiles/Insects/Spiders/GiantSpider.cs index 3e472cd3..7c1a900e 100644 --- a/Data/Scripts/Mobiles/Insects/Spiders/GiantSpider.cs +++ b/Data/Scripts/Mobiles/Insects/Spiders/GiantSpider.cs @@ -72,6 +72,9 @@ public override void GenerateLoot() public override Poison PoisonImmune{ get{ return Poison.Regular; } } public override Poison HitPoison{ get{ return Poison.Regular; } } + public override int Cloths{ get{ return 5; } } + public override ClothType ClothType{ get{ return ClothType.Silk; } } + public GiantSpider( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Insects/Spiders/Tarantula.cs b/Data/Scripts/Mobiles/Insects/Spiders/Tarantula.cs index 26da0a7d..88781fbd 100644 --- a/Data/Scripts/Mobiles/Insects/Spiders/Tarantula.cs +++ b/Data/Scripts/Mobiles/Insects/Spiders/Tarantula.cs @@ -91,6 +91,9 @@ public override void GenerateLoot() public override Poison PoisonImmune{ get{ return Poison.Greater; } } public override Poison HitPoison{ get{ return Poison.Greater; } } + public override int Cloths{ get{ return 8; } } + public override ClothType ClothType{ get{ return ClothType.Silk; } } + #region Pack Animal Methods public override bool OnBeforeDeath() { diff --git a/Data/Scripts/Mobiles/Mystical/Angel.cs b/Data/Scripts/Mobiles/Mystical/Angel.cs index 40af1b31..0b6a18a5 100644 --- a/Data/Scripts/Mobiles/Mystical/Angel.cs +++ b/Data/Scripts/Mobiles/Mystical/Angel.cs @@ -82,6 +82,9 @@ public override void GenerateLoot() public override int Skeletal{ get{ return Utility.Random(5); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Mystical; } } + public override int Cloths{ get{ return 3; } } + public override ClothType ClothType{ get{ return ClothType.Divine; } } + public Angel( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Mystical/Archangel.cs b/Data/Scripts/Mobiles/Mystical/Archangel.cs index f9f4a69b..df45e6d7 100644 --- a/Data/Scripts/Mobiles/Mystical/Archangel.cs +++ b/Data/Scripts/Mobiles/Mystical/Archangel.cs @@ -86,6 +86,9 @@ public override void OnDeath( Container c ) public override int Skeletal{ get{ return Utility.Random(10); } } public override SkeletalType SkeletalType{ get{ return SkeletalType.Mystical; } } + public override int Cloths{ get{ return 7; } } + public override ClothType ClothType{ get{ return ClothType.Divine; } } + public Archangel( Serial serial ) : base( serial ) { } diff --git a/Data/Scripts/Mobiles/Unique/SerpentOfChaos.cs b/Data/Scripts/Mobiles/Unique/SerpentOfChaos.cs index f570e142..74e9a495 100644 --- a/Data/Scripts/Mobiles/Unique/SerpentOfChaos.cs +++ b/Data/Scripts/Mobiles/Unique/SerpentOfChaos.cs @@ -78,7 +78,8 @@ public override bool OnBeforeDeath() if ( m is PlayerMobile && !m.Blessed ) { Item rock = m.Backpack.FindItemByType( typeof ( BlackrockSerpentChaos ) ); - if ( rock != null ) + Item rockDeco = m.Backpack.FindItemByType( typeof ( BlackrockSerpentChaosDecoration ) ); + if ( rock != null || rockDeco != null ) { CanDie = 1; winner = m; diff --git a/Data/Scripts/Mobiles/Unique/SerpentOfOrder.cs b/Data/Scripts/Mobiles/Unique/SerpentOfOrder.cs index fe3e3e12..4aa7ca58 100644 --- a/Data/Scripts/Mobiles/Unique/SerpentOfOrder.cs +++ b/Data/Scripts/Mobiles/Unique/SerpentOfOrder.cs @@ -83,7 +83,8 @@ public override bool OnBeforeDeath() if ( m is PlayerMobile && !m.Blessed ) { Item rock = m.Backpack.FindItemByType( typeof ( BlackrockSerpentOrder ) ); - if ( rock != null ) + Item rockDeco = m.Backpack.FindItemByType( typeof ( BlackrockSerpentOrderDecoration ) ); + if ( rock != null || rockDeco != null ) { CanDie = 1; winner = m; diff --git a/Data/Scripts/Mobiles/Unusual/Beholder.cs b/Data/Scripts/Mobiles/Unusual/Beholder.cs index a0434d92..600a81cd 100644 --- a/Data/Scripts/Mobiles/Unusual/Beholder.cs +++ b/Data/Scripts/Mobiles/Unusual/Beholder.cs @@ -102,6 +102,9 @@ public Beholder () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 ) public override int TreasureMapLevel{ get{ return Core.AOS ? 4 : 0; } } + public override int Cloths{ get{ return 10; } } + public override ClothType ClothType{ get{ return ClothType.Mysterious; } } + public override int GetDeathSound() { return 0x56F; diff --git a/Data/Scripts/Quests/Serpents/BlackrockSerpents.cs b/Data/Scripts/Quests/Serpents/BlackrockSerpents.cs index 7d8deee7..25dd03da 100644 --- a/Data/Scripts/Quests/Serpents/BlackrockSerpents.cs +++ b/Data/Scripts/Quests/Serpents/BlackrockSerpents.cs @@ -192,6 +192,58 @@ public override void Serialize(GenericWriter writer) writer.Write((int) 0); } + public override void Deserialize(GenericReader reader) + { + base.Deserialize(reader); + int version = reader.ReadInt(); + } + } + public class BlackrockSerpentOrderDecoration : Item + { + [Constructable] + public BlackrockSerpentOrderDecoration() : base( 0x25C0 ) + { + Name = "Inert Blackrock Serpent"; + Weight = 1.0; + Hue = 0x96C; + } + + public BlackrockSerpentOrderDecoration(Serial serial) : base(serial) + { + } + + public override void Serialize(GenericWriter writer) + { + base.Serialize(writer); + writer.Write((int) 0); + } + + public override void Deserialize(GenericReader reader) + { + base.Deserialize(reader); + int version = reader.ReadInt(); + } + } + public class BlackrockSerpentChaosDecoration : Item + { + [Constructable] + public BlackrockSerpentChaosDecoration() : base( 0x25C0 ) + { + Name = "Inert Blackrock Serpent"; + Weight = 1.0; + Hue = 0x96C; + } + + public BlackrockSerpentChaosDecoration(Serial serial) : base(serial) + { + } + + public override void Serialize(GenericWriter writer) + { + base.Serialize(writer); + writer.Write((int) 0); + } + public override void Deserialize(GenericReader reader) { base.Deserialize(reader); diff --git a/Data/Scripts/Quests/Serpents/SerpentSpawners.cs b/Data/Scripts/Quests/Serpents/SerpentSpawners.cs index 40f7a17b..79f64b63 100644 --- a/Data/Scripts/Quests/Serpents/SerpentSpawners.cs +++ b/Data/Scripts/Quests/Serpents/SerpentSpawners.cs @@ -31,7 +31,9 @@ public override void OnDoubleClick( Mobile from ) BaseCreature monster = new SerpentOfOrder(); monster.MoveToWorld( this.Location, this.Map ); monster.PlaySound( 0x217 ); - this.Delete(); + from.SendMessage( "The Serpent of Order comes forth to challenge you!" ); + snake.Delete(); + from.AddToBackpack( new BlackrockSerpentOrderDecoration() ); } else { @@ -74,7 +76,9 @@ public override void OnDoubleClick( Mobile from ) BaseCreature monster = new SerpentOfChaos(); monster.MoveToWorld( this.Location, this.Map ); monster.PlaySound( 0x217 ); - this.Delete(); + from.SendMessage( "The Serpent of Chaos comes forth to challenge you!" ); + snake.Delete(); + from.AddToBackpack( new BlackrockSerpentOrderDecoration() ); } else { diff --git a/Data/Scripts/Quests/SomeRandomNote.cs b/Data/Scripts/Quests/SomeRandomNote.cs index da04f213..07d6666c 100644 --- a/Data/Scripts/Quests/SomeRandomNote.cs +++ b/Data/Scripts/Quests/SomeRandomNote.cs @@ -73,12 +73,11 @@ public SomeRandomNote( ) : base( 0x4CCA ) ScrollTrue = 1; string written = "truth"; - if ( 1 == Utility.RandomMinMax( 0, 1 ) ){ written = "lies"; ScrollTrue = 0; } + if ( 40 <= Utility.RandomMinMax( 1, 100 ) ){ written = "lies"; ScrollTrue = 0; } // 40% chance of being a lie, 60% chance of being true; int amnt = Utility.RandomMinMax( 1, 49 ); int relic = Utility.RandomMinMax( 1, 59 ); - // 50% TRUTH AND 50% LIES ///////////////////// if ( written == "lies" ) { switch ( amnt ) diff --git a/Data/Scripts/System/Misc/Build.cs b/Data/Scripts/System/Misc/Build.cs index 11029013..23c9bcb2 100644 --- a/Data/Scripts/System/Misc/Build.cs +++ b/Data/Scripts/System/Misc/Build.cs @@ -16353,7 +16353,7 @@ public static void MoveQuestPedestals( Item item, int area ) } else if ( area == 87 ){ switch ( Utility.RandomMinMax( 1, 4 ) ) // "the Sanctum of Saltmarsh" { case 1: loc = new Point3D(6136, 1311, 10); map = Map.Lodor; break; - case 2: loc = new Point3D(5703, 2071, -40); map = Map.Lodor; break; + case 2: loc = new Point3D(5711, 2056, -60); map = Map.Lodor; break; case 3: loc = new Point3D(5748, 2086, 0); map = Map.Lodor; break; case 4: loc = new Point3D(6014, 1980, 0); map = Map.Lodor; break; } diff --git a/Data/Scripts/System/Misc/ChangeLog.cs b/Data/Scripts/System/Misc/ChangeLog.cs index 1b838388..2e4ab4f6 100644 --- a/Data/Scripts/System/Misc/ChangeLog.cs +++ b/Data/Scripts/System/Misc/ChangeLog.cs @@ -30,6 +30,45 @@ public static string Versions() /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + "Compassion - 02 December 2024
" + + + "
" + + "* Balanced loot from treasure hunting chests found by cartographers.
" + + "* Added pet broker spawns and the taming BOD system (ported from Ultima Adventures, thanks!).
" + + "* Fixed a bug with the spawner for the serpents of chaos and order.
" + + "* Increased the chances of random notes and citizen rumors being true.
" + + "* Fixed the spawn location for the quest pedestal in the Sanctum of Saltmarsh.
" + + "* Added missing fabric drops to various creatures.
" + + "* Fixed issues with spell channeling for staves and scepters.
" + + "* Added a toggle to settings to control restrictions on marking and recalling.
" + + "* Added a toggle to settings to restrict skill bonuses from items to the character skill cap.
" + + "* Fixed an issue where repair and durability potions were not working on clothing.
" + + "* Added bank vaults to banker NPCs, available for a large price.
" + + "* Added base clothing to the list of items that repair and durability potions can affect.
" + + "* Fixed an issue where bard songs could crash the world.
" + + "* Performed a grammar and spelling pass on skill descriptions.
" + + "* Renamed 'bedrool' to 'bedroll.'
" + + "* Fixed an issue with the elemental steed when rebuilding the world.
" + + "* Fixed a crash that occurred when fishing up certain items.
" + + "* Fixed the skill range issue for candelabras.
" + + "* Removed young player checks for level 0 chests.
" + + "* Players can now decode simply drawn treasure maps with a minimum skill of 0.0.
" + + "* Made it possible to remove a flaming skill from a house.
" + + "* Fixed an issue where small BODs were generated by mistake.
" + + "* Removed single- and double-bladed laser swords from regular loot.
" + + "* Fixed an issue with maximum poison charges.
" + + "* Fixed an issue where fugitives were not being recognized as evil.
" + + "* Added skill-based poisoning charge limits and weapon coating.
" + + "* Added an index to settings.cs to improve navigation.
" + + "* Rebalanced stealing coffers.
" + + "* Fixed an issue that made it impossible for a mage to create the Staff of Five Parts.
" + + "* Corrected the name of the Nox Ranger's light crossbow.
" + + "
" + + + sepLine() + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + "Honor - 02 November 2024
" + "
" diff --git a/Data/Scripts/System/Misc/Players.cs b/Data/Scripts/System/Misc/Players.cs index 7745ede6..3222f15b 100644 --- a/Data/Scripts/System/Misc/Players.cs +++ b/Data/Scripts/System/Misc/Players.cs @@ -42,12 +42,9 @@ public static string GetSkillTitle( Mobile m ) { string skillLevel = null; if ( highest.Value < 29.1 ){ skillLevel = "Aspiring"; } - else { skillLevel = GetSkillLevel( highest ); } - - string skillTitle = highest.Info.Title; - - skillTitle = Skill.CharacterTitle( skillTitle, m.Female, m.Karma, m.Skills[SkillName.Knightship].Value, m.Skills[SkillName.Seafaring].Value, m.Skills[SkillName.Magery].Base, m.Skills[SkillName.Necromancy].Base, m.Skills[SkillName.Healing].Base, m.Skills[SkillName.Spiritualism].Base, isBarbaric, isOriental, isMonk(m), isSyth(m,false), isJedi(m,false), isJester(m), isEvil ); + else { skillLevel = GetSkillLevel( highest, m.Female ); } + string skillTitle = CharacterTitle((PlayerMobile)m, highest.Info); return String.Concat( skillLevel, " ", skillTitle ); } } @@ -145,29 +142,40 @@ public static bool isJester ( Mobile from ) { points++; } - + //Checking this properly is non-trivial. + //You cannot just check for the item types as the Jesters can change the graphics of items to jester-themed clothing and they should count. + //However, you cannot rely on the ItemID/GraphicID either as these are also modified by things like clothing being moddable. + //Most of the player monster races hide equipment through the modding system (which then changes their ItemID/GraphicID). + //If we check both the ItemID and the explicit item type there are still edge cases like monsters not getting credit + //for using clothing that is modified by the jester and some items that have gone through obsolete/cleanup code (like old MagicRobe jester suits), + //but it at least allows them to count as a jester by using explicit jester items. + if ( from.FindItemOnLayer( Layer.OuterTorso ) != null ) { Item robe = from.FindItemOnLayer( Layer.OuterTorso ); - if ( robe.ItemID == 0x1f9f || robe.ItemID == 0x1fa0 || robe.ItemID == 0x4C16 || robe.ItemID == 0x4C17 || robe.ItemID == 0x2B6B || robe.ItemID == 0x3162 ) + if ( (from.FindItemOnLayer( Layer.Special ) != null && Item.isRaceCostume(from.FindItemOnLayer( Layer.Special )) && (robe is JesterGarb)) || + robe.ItemID == 0x1f9f || robe.ItemID == 0x1fa0 || robe.ItemID == 0x4C16 || robe.ItemID == 0x4C17 || robe.ItemID == 0x2B6B || robe.ItemID == 0x3162 ) points++; } if ( from.FindItemOnLayer( Layer.MiddleTorso ) != null ) { Item shirt = from.FindItemOnLayer( Layer.MiddleTorso ); - if ( shirt.ItemID == 0x1f9f || shirt.ItemID == 0x1fa0 || shirt.ItemID == 0x4C16 || shirt.ItemID == 0x4C17 || shirt.ItemID == 0x2B6B || shirt.ItemID == 0x3162 ) + if ( (from.FindItemOnLayer( Layer.Special ) != null && Item.isRaceCostume(from.FindItemOnLayer( Layer.Special )) && (shirt is JesterSuit || shirt is LevelJesterSuit || shirt is GiftJesterSuit)) || + shirt.ItemID == 0x1f9f || shirt.ItemID == 0x1fa0 || shirt.ItemID == 0x4C16 || shirt.ItemID == 0x4C17 || shirt.ItemID == 0x2B6B || shirt.ItemID == 0x3162 ) points++; } if ( from.FindItemOnLayer( Layer.Helm ) != null ) { Item hat = from.FindItemOnLayer( Layer.Helm ); - if ( hat.ItemID == 0x171C || hat.ItemID == 0x4C15 ) + if ( (from.FindItemOnLayer( Layer.Special ) != null && Item.isRaceCostume(from.FindItemOnLayer( Layer.Special )) && (hat is JesterHat || hat is LevelJesterHat || hat is GiftJesterHat)) || + hat.ItemID == 0x171C || hat.ItemID == 0x4C15 ) points++; } if ( from.FindItemOnLayer( Layer.Shoes ) != null ) { Item feet = from.FindItemOnLayer( Layer.Shoes ); - if ( feet.ItemID == 0x4C27 ) + if ( (from.FindItemOnLayer( Layer.Special ) != null && Item.isRaceCostume(from.FindItemOnLayer( Layer.Special )) && (feet is JesterShoes)) || + feet.ItemID == 0x4C27 ) points++; } } @@ -214,9 +222,23 @@ private static Skill GetHighestSkill( Mobile m ) { "Legendary", "Kengo", "Ka-ge" } }; - private static string GetSkillLevel( Skill skill ) + private static string[,] m_LevelsFemale = new string[,] + { + { "Neophyte", "Neophyte", "Neophyte" }, + { "Novice", "Novice", "Novice" }, + { "Apprentice", "Apprentice", "Apprentice" }, + { "Journeywoman", "Journeywoman", "Journeywoman" }, + { "Expert", "Expert", "Expert" }, + { "Adept", "Adept", "Adept" }, + { "Mistress", "Mistress", "Mistress" }, + { "Grandmistress", "Grandmistress", "Grandmistress" }, + { "Elder", "Tatsujin", "Shinobi" }, + { "Legendary", "Kengo", "Ka-ge" } + }; + + private static string GetSkillLevel( Skill skill, bool isFemale ) { - return m_Levels[GetTableIndex( skill ), GetTableType( skill )]; + return isFemale ? m_LevelsFemale[GetTableIndex( skill ), GetTableType( skill )] : m_Levels[GetTableIndex( skill ), GetTableType( skill )]; } private static int GetTableType( Skill skill ) @@ -911,6 +933,393 @@ public static int GetWealth( Mobile from, int pack ) return wealth; } + + public static string CharacterTitle( PlayerMobile p, SkillInfo s) + { + string skillTitle = s.Title; + + int karma = p.Karma; + bool isFemale = p.Female; + bool isEvil = GetPlayerInfo.EvilPlay(p); + int isBarbaric = p.CharacterBarbaric; + int isOriental = p.CharacterOriental; + bool isJester = GetPlayerInfo.isJester(p); + bool isMonk = GetPlayerInfo.isMonk(p); + bool isJedi = GetPlayerInfo.isJedi(p, false); + bool isSyth = GetPlayerInfo.isSyth(p, false); + + switch((SkillName)s.SkillID) + { + case SkillName.Alchemy: + // Alchemist + if (isBarbaric > 0) + { + skillTitle = "Herbalist"; + } + else if(isOriental > 0) + { + skillTitle = "Waidan"; + } + break; + case SkillName.Anatomy: + // Biologist + break; + case SkillName.Druidism: + // Druid + break; + case SkillName.Mercantile: + // Merchant + break; + case SkillName.ArmsLore: + // Man-at-arms + if(isBarbaric > 0) + { + skillTitle = "Gladiator"; + } + else if(isFemale) + { + skillTitle = "Woman-at-arms"; + } + break; + case SkillName.Parry: + // Duelist + if(isBarbaric > 0) + { + skillTitle = "Defender"; + } + break; + case SkillName.Begging: + // Begger + if(isJester) + { + skillTitle = "Jester"; + } + break; + case SkillName.Blacksmith: + // Blacksmith + break; + case SkillName.Bowcraft: + // Bowyer + break; + case SkillName.Peacemaking: + // Pacifier + break; + case SkillName.Camping: + // Explorer + if(isBarbaric > 0) + { + skillTitle = "Wanderer"; + } + break; + case SkillName.Carpentry: + // Carpenter + break; + case SkillName.Cartography: + // Cartographer + break; + case SkillName.Cooking: + // Chef + break; + case SkillName.Searching: + // Scout + break; + case SkillName.Discordance: + // Demoralizer + break; + case SkillName.Psychology: + // Scholar + if(isSyth) + { + skillTitle = "Syth"; + } + else if (isJedi) + { + skillTitle = p.Skills.Knightship.Base >= 100 ? "Jedi Knight" : "Jedi"; + } + else if(isJester) + { + skillTitle = "Joker"; + } + break; + case SkillName.Healing: + // Healer + if(karma >= 2500 && p.Skills.Healing.Base >= 50 && p.Skills.Spiritualism.Base >= 50) + { + skillTitle = isOriental > 0 ? "Buddhist" : "Priest"; + } + else if(isOriental > 0) + { + skillTitle = "Shugenja"; + } + else if(karma < 0) + { + skillTitle = "Mortician"; + } + break; + case SkillName.Seafaring: + // Sailor + bool isGM = p.Skills.Seafaring.Base >= 100; + if(isBarbaric > 0) + { + skillTitle = isGM ? "Sea Captain" : "Atlantean"; + } + else if(karma < 0) + { + skillTitle = isGM ? "Pirate Captain" : "Pirate"; + } + else if(isGM) + { + skillTitle = "Sea Captain"; + } + break; + case SkillName.Forensics: + // Undertaker + break; + case SkillName.Herding: + // Shepherd + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Beastmistress" : "Beastmaster"; + } + break; + case SkillName.Hiding: + // Skulker + break; + case SkillName.Provocation: + // Rouser + break; + case SkillName.Inscribe: + // Scribe + break; + case SkillName.Lockpicking: + // Lockpicker + break; + case SkillName.Magery: + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Sorceress" : "Shaman"; + } + else if(isOriental > 0) + { + skillTitle = "Wu Jen"; + } + else if(isEvil) + { + skillTitle = isFemale ? "Enchantress" : "Warlock"; + } + else if(p.Skills.Magery.Base >= 100 && p.Skills.Necromancy.Base >= 100) + { + skillTitle = "Archmage"; + } + break; + case SkillName.MagicResist: + // Magic Warder + break; + case SkillName.Tactics: + // Tactician + if(isBarbaric > 0) + { + skillTitle = "Warlord"; + } + else if(isOriental > 0) + { + skillTitle = "Sakushi"; + } + break; + case SkillName.Snooping: + // Spy + break; + case SkillName.Musicianship: + // Bard + if(isBarbaric > 0) + { + skillTitle = "Chronicler"; + } + break; + case SkillName.Poisoning: + // Assassin + break; + case SkillName.Marksmanship: + // Deadeye + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Amazon" : "Barbarian"; + } + else if(isOriental > 0) + { + skillTitle = "Kyudoka"; + } + break; + case SkillName.Spiritualism: + // Spiritualist + if(karma >= 2500 && p.Skills.Healing.Base >= 50 && p.Skills.Spiritualism.Base >= 50) + { + skillTitle = isOriental > 0 ? "Buddhist" : "Priest"; + } + else if(isOriental > 0) + { + skillTitle = "Neidan"; + } + break; + case SkillName.Stealing: + // Thief + break; + case SkillName.Tailoring: + // Tailor + break; + case SkillName.Taming: + // Beastmaster + if(isFemale) + { + skillTitle = "Beastmistress"; + } + break; + case SkillName.Tasting: + // Food Taster + break; + case SkillName.Tinkering: + // Tinker + break; + case SkillName.Tracking: + // Tracker + if(isBarbaric > 0) + { + skillTitle = "Hunter"; + } + break; + case SkillName.Veterinary: + // Veterinarian + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Beastmistress" : "Beastmaster"; + } + break; + case SkillName.Swords: + // Swordsman + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Amazon" : "Barbarian"; + } + else if(isOriental > 0) + { + skillTitle = "Kensai"; + } + else if(isFemale) + { + skillTitle = "Swordswoman"; + } + break; + case SkillName.Bludgeoning: + // Bludgeoner + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Amazon" : "Barbarian"; + } + break; + case SkillName.Fencing: + // Fencer + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Amazon" : "Barbarian"; + } + else if(isOriental > 0) + { + skillTitle = "Yuki Ota"; + } + break; + case SkillName.FistFighting: + // Brawler + if(isMonk) + { + skillTitle = p.Skills.Magery.Base >= 50 || p.Skills.Necromancy.Base >= 50 ? "Mystic" : "Monk"; + } + else if(isOriental > 0) + { + skillTitle = "Karateka"; + } + break; + case SkillName.Lumberjacking: + // Lumberjack + break; + case SkillName.Mining: + // Miner + break; + case SkillName.Meditation: + // Meditator + break; + case SkillName.Stealth: + // Sneak + break; + case SkillName.RemoveTrap: + // Trespasser + break; + case SkillName.Necromancy: + // Necromancer + if(isBarbaric > 0) + { + skillTitle = "Witch Doctor"; + } + else if(isOriental > 0) + { + skillTitle = "Fangshi"; + } + else if(p.Skills.Magery.Base >= 100 && p.Skills.Necromancy.Base >= 100) + { + skillTitle = "Archmage"; + } + else if(isFemale) + { + skillTitle = "Witch"; + } + break; + case SkillName.Focus: + // Driven + break; + case SkillName.Knightship: + // Knight + if(isBarbaric > 0) + { + skillTitle = isFemale ? "Valkyrie" : "Chieftan"; + } + else if(isOriental > 0) + { + skillTitle = "Youxia"; + } + else if(karma < 0) + { + skillTitle = "Death Knight"; + } + break; + case SkillName.Bushido: + // Samurai + if(karma > 0) + { + skillTitle = "Ronin"; + } + break; + case SkillName.Ninjitsu: + // Ninja + if(karma < 0) + { + skillTitle = "Yakuza"; + } + break; + case SkillName.Elementalism: + // Elementalist + break; + case SkillName.Mysticism: + // Mystic + break; + case SkillName.Imbuing: + // Aritificer + break; + case SkillName.Throwing: + // Bladeweaver + break; + } + + return skillTitle; + } } } diff --git a/Data/Scripts/System/Misc/Talk.cs b/Data/Scripts/System/Misc/Talk.cs index 33afbef0..19e345d4 100644 --- a/Data/Scripts/System/Misc/Talk.cs +++ b/Data/Scripts/System/Misc/Talk.cs @@ -175,6 +175,7 @@ public static string SpeechText( Mobile m, Mobile from, string sConversation ) else if ( sConversation == "Frankenstein"){ sText = "Hail, " + sYourName + ". I am " + sMyName + " and I am the undertaker here in the guild. Although my fellow necromancers study the aspects of death, I stay down here to study the revival of life. I have spent most of my life trying to learn the secrets of Victor Frankenstein, but I have yet to obtain any of his journals that may lead me further in my studies. I did have an acquaintance that was helping me, and he did manage to find some text on the subject, but alas his ship was lost at sea and he was never seen again. It is just as well because it sounded like his discovery only touched the surface of reanimated corpses.

If you manage to find any of Victor Frakenstein's journals, I would be most pleased in acquiring them from you. Of course you are free to attempt and follow his instructions. Perhaps you may have more success than I if your forensic skill is good enough. It is said that these reanimated corpses can be either very powerful combatants or very strong slaves. I have heard that the power of such creatures is dependent on the power of the brain you can find to put in it. So a brain from an ogre wouldn't be as good as a brain from a storm giant. To get the body parts you need, you will need to take one of Frankenstein's journals with you as you use a blade on corpses of giants. The better your forensic skill, the better chance you will get particular body parts to construct a creature. You will find arms, torsos, legs, heads, and brains from many different creatures. These generally will not do as you need to find 'severed' limbs, heads, and torsos. You also need a 'fresh' brain as the others are usually rotten and have lost all spark of life. Once you gather them, you will need a power coil like the one I have here in my lab. Doing the instructions in the journal will help animate the corpse. You are free to use my power coil, but I also get them from a local tinker so you can buy one from me to place in your home if you wish."; } else if ( sConversation == "Jester"){ sText = Server.Items.BagOfTricks.JesterSpeech(); } else if ( sConversation == "Jedi"){ sText = "Greetings, child. I have not spoken to anyone in quite the long time. If you are wondering, I am a descendant of what is known as the Jedi. Long ago, our order was marooned on this world. Although there was no means to leave, we had a quest to rid this world of the Syth that arrived during that same time. As the Syth grew in numbers, so did the Jedi. As we slowly dealt with the Syth threat, many of our order joined society and became what this world knows as priests. They healed the sick and provide teachings of virtuous behavior to all who would listen. If you are of good character (positive karma) and have an aptitude for psychic ability (psychology of 25 or more) you are welcome to pursue the path of the Jedi. All I ask is for a show of commitment. I know of a family that is in desperate need, and I would like to leave them 5,000 gold to start life anew. If you are ready for enlightenment, and are willing to part with the gold, then please hand it over to me and I will give you the wisdom to start your journey in the path of the Jedi."; } + else if (sConversation == "Animal Broker") { sText = "Hello there. Can I speak with you one second? I have a favor to ask and I wonder if you could help me.

I have in my possesion contracts from buyers in the lands for certain beasts. I will gladly give you the contracts and only keep a small commission for myself if you could fill the contracts for me.
"; } return sText; } } diff --git a/Info/Spawns/Spawns.map b/Info/Spawns/Spawns.map index 0d58d307..427238fc 100644 --- a/Info/Spawns/Spawns.map +++ b/Info/Spawns/Spawns.map @@ -20,3 +20,18 @@ # # Data\Scripts\System\Misc\Spawning.cs # +####################################### +*|animaltrainerlord||||||783|731|0|2|5|10|0|0|1|1|0|0|0|0|0 +*|animaltrainerlord||||||2953|1022|0|2|5|10|1|1|1|1|0|0|0|0|0 +*|animaltrainerlord||||||908|921|5|1|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||4229|1466|0|1|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||2065|2148|0|1|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||6905|175|0|1|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||6826|3719|7|1|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||6591|1873|10|2|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||2684|3345|0|2|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||2138|284|0|2|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||1604|1589|7|2|5|10|1|1|1|1|0|0|0|0|0 +*|animaltrainerlord||||||3081|2641|0|2|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||4556|1258|5|2|5|10|4|4|1|1|0|0|0|0|0 +*|animaltrainerlord||||||3920|3969|0|2|5|10|4|4|1|1|0|0|0|0|0 \ No newline at end of file diff --git a/README.md b/README.md index 43f4881a..89d96a73 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ # Secrets of Sosaria For instructions, see [Manual.pdf](Manual.pdf). + +# Secrets of Sosaria - Vision Statement + +Secrets of Sosaria is an enhanced fork of the Ruins & Riches (later continued as Adventurers of Akalabeth) project. We aim to continue the tradition of this project while also introducing improvements and additional content where we feel it would enhance the experience. Our main goals are as follows: + +[Short Term Goals] + +- Preservation and continuation of the core Ruins & Riches/Adventurers of Akalabeth experience. The "core experience" includes basic gameplay, game world setting, and lore. +- Fixing long-standing bugs. +- Fixing inconsistencies with how parts of the game function, especially when that affects player experience. +- Improvements to game systems, especially where we can increase the appeal of interacting with ones that weren't fully fleshed out, or which were made to feel redundant by other aspects of the game. +- Identifying and reworking instances of "hostile design" that only provide tedium to the player instead of a sense of accomplishment. + +[Long Term Goals] + +- The introduction of new content that fits the aesthetic and themes of the game world. + +[Target Audience] + +The target audience is new players who are interested in an experience that takes its inspiration from tabletop roleplaying games as well as classic computer RPGs of the 1980s and 1990s. Additionally, it is intended for former players of Ruins & Riches and any of its previous forks who would like to play something further refined as a more streamlined, player-friendly, bugfixed and, eventually, more content-rich version of the game that they've come to love. + +[Why Choose Secrets of Sosaria?] + +The source for our world package is freely available on github and we are open to taking suggestions from the community and potentially implementing them, so long as they align with our vision. We frequently update the game, and we have a friendly and growing community of players both on our live server (Multiverset) as well as those who play their own personal solo servers. + +[Conclusion] + +We seek to honor the legacy of the original developers and caretakers of this game while also making it a more engaging, cohesive, and most importantly fun experience for all. While we are just one fork among many of this project, we wish to provide the best possible user experience through utilizing the methods outlined in our goals. From bbc6f82c469c3ed7d705986a2bdc88238560e7b5 Mon Sep 17 00:00:00 2001 From: devOwlish <132713822+devOwlish@users.noreply.github.com> Date: Tue, 24 Dec 2024 04:30:16 +0400 Subject: [PATCH 7/8] feat(misc): merge --- README.md | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/README.md b/README.md index 06692ddb..89d96a73 100644 --- a/README.md +++ b/README.md @@ -2,31 +2,6 @@ For instructions, see [Manual.pdf](Manual.pdf). -<<<<<<< HEAD - -## Running in Docker -When the server is running in a container, we need to enforce the IP of a Game Server to be `127.0.0.1` ( for local development ), or a public IP while running on a VPS. -### Running locally -Edit the `Info/Scripts/Settings.cs` file and set: -``` -public static string S_Address = "127.0.0.1"; -public static bool S_EnforceAddress = true; -``` -Then, use the `docker compose` to run the server: -``` -docker compose up -d -``` -### Running on a VPS/VDS -Edit the `Info/Scripts/Settings.cs` file and set: -``` -public static string S_Address = ""; -public static bool S_EnforceAddress = true; -``` -Then, use the `docker compose` to run the server: -``` -docker compose up -d -``` -======= # Secrets of Sosaria - Vision Statement Secrets of Sosaria is an enhanced fork of the Ruins & Riches (later continued as Adventurers of Akalabeth) project. We aim to continue the tradition of this project while also introducing improvements and additional content where we feel it would enhance the experience. Our main goals are as follows: @@ -54,4 +29,3 @@ The source for our world package is freely available on github and we are open t [Conclusion] We seek to honor the legacy of the original developers and caretakers of this game while also making it a more engaging, cohesive, and most importantly fun experience for all. While we are just one fork among many of this project, we wish to provide the best possible user experience through utilizing the methods outlined in our goals. ->>>>>>> main From 82f0933327a437af06d182195f40c6743e56a39a Mon Sep 17 00:00:00 2001 From: devOwlish <132713822+devOwlish@users.noreply.github.com> Date: Tue, 24 Dec 2024 04:47:11 +0400 Subject: [PATCH 8/8] feat(docs): review adjustments --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/README.md b/README.md index 89d96a73..e5b37848 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,53 @@ The source for our world package is freely available on github and we are open t [Conclusion] We seek to honor the legacy of the original developers and caretakers of this game while also making it a more engaging, cohesive, and most importantly fun experience for all. While we are just one fork among many of this project, we wish to provide the best possible user experience through utilizing the methods outlined in our goals. + + +## Running in Docker +When the server is running in a container, we need to enforce the IP of a Game Server to be `127.0.0.1` ( for local development ), or a public IP while running on a VPS. +### Running locally +Edit the `Info/Scripts/Settings.cs` file and set: +```c# +public static string S_Address = "127.0.0.1"; +public static bool S_EnforceAddress = true; +``` +### Development mode +```shell +#tl;dr: docker compose down && docker compose up +``` +All the code changes are getting persisten during the build time. Thus, if you change a code, you want the container image to be rebuilt in order to be reflect you changes. The easiest way to do it, is to destroy the Compose stack: +```sh +docker compose down +``` +and recreate it +```sh +docker compose up +``` +In the most cases, that should rebuild the image in case of changed files. If you want to rebuild the image for sure, you can use a command: +```sh +docker compose up --build +``` +#### Running in a detached mode +To run the server in a detached mode (a one-shot rune), use the `docker compose` to run the server: +``` +docker compose up -d +``` + +In that case, you won't be able to directly interact with the running server (though, it's still possible via the `docker exec..` command). +#### Running in an attached mode +To run the server in an attached mode, use the `docker compose` to run the server without the `-d` flag: +``` +docker compose up +``` + +In that case, you can directly interact with the server, including the Console command. Please be aware, that Ctrl+C will shut down the server. +### Running on a VPS/VDS +Edit the `Info/Scripts/Settings.cs` file and set: +``` +public static string S_Address = ""; +public static bool S_EnforceAddress = true; +``` +Then, use the `docker compose` to run the server: +``` +docker compose up -d +``` \ No newline at end of file