Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/04/2022 in all areas

  1. 1 point
    Description: I've modified the lua scripts from @V3ct0r's Contract System Mod to be a bit more customizable. With this script you don't need to give player contracts directly via NPC since they can now be random map drops (given directly to their inventory). Download: GitHub It's hosted on GitHub to prevent loss of the script and potentially fix issues in the future if I feel like it. Installation: Just load the file in your server! If you have a mod/extension folder, you can go ahead and call it from there. Obviously you need V3ctor's Contract System Mod. This script can work on sources, but you will need to modify client source to show the item hints properly. Not hard to do, but I won't be providing anything related to that here! Like I said, just load the file, I won't help with that, sorry! The script is a stand-alone, no other functions are needed (hopefully). The only function neeeded is already hooked. Usage Details: As stated on V3ctor's original thread, create a new item within your ItemInfo. The item's ID must match what is defined in ContractSys.Conf.ItemID. ContractSys.Conf.ItemID = XXXXX The item's type must match ContractSys.Conf.ItemType. ContractSys.Conf.ItemType = 99 The item's function must be the following: ItemUse_ContractSys The system must be enabled by setting ContractSys.Conf.Enabled to true. ContractSys.Conf.Enabled = true If you want contract to be given randomly by killing monsters, then this variable ContractSys.Conf.World.Enabled must be set to true. ContractSys.Conf.World.Enabled = true In reality, this must be always set to true since there's no other option to get contracts from, they were not implemented! Adjust the maximum of active contracts a player can have at a single time. ContractSys.Conf.Limit Add your map to the allowed list, set it to true and adjust the probability to your needs. The probability is from 0 to 100. ContractSys.Conf.Maps['<MAP_NAME>'] = {Allow = true, Probability = 10} I have some examples in there for Forsaken City, Dark Swamp and Demonic World. You can follow those as guidance. Add some monsters that spawn in your map, along with their probability, minimum and maximum quantities. ContractSys.Monsters['<MAP_NAME>'] = { {Allow = true, ID = <MONSTER_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Rate = <MONSTER_RATE>}, } <MAP_NAME>: This is your map's name like "abandonedcity". <MONSTER_ID>: The monster's ID that spawns in that map. <MIN_QTY> / <MAX_QTY>: The minimum and maximum quantity that the player can be tasked to killed. <MONSTER_RATE>: The rate as a number that is used to add weight to the item. This number will be added with the other rates from the monsters in this map's monster list, the lower the number compared to others, the lower probability this monster will appear in a contract. I have some examples in there from Forsaken City, Dark Swamp and Demonic World. Add some rewards to be given when completing contracts obtained from your map. ContractSys.Rewards.Maps['<MAP_NAME>'] = { {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, } <MAP_NAME>: Your maps' name, such as "abandonedcity". <GOLD_AMOUNT>: The amount of gold to be given (if none, just set to zero). <ITEM_ID>: The item's ID to be given. <MIN_QTY> / <MAX_QTY>: The minimum and maximum quantity that can be given from the previous item. <ITEM_QUALITY>: The quality of the item (mostly used for gems). <REWARD_RATE>: The rate as a number that is used to add weight to the reward. This number will be added with the other rates from the items in this map's reward list, the lower the number compared to others, the lower probability this reward will appear in a contract. Now, if you want a monster to have specific reward, you can also add that. This will override other reward tables. ContractSys.Rewards.Specific[<MONSTER_ID>] = { {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, {Allow = true, Gold = <GOLD_AMOUNT>, ID = <ITEM_ID>, Min = <MIN_QTY>, Max = <MAX_QTY>, Quality = <ITEM_QUALITY>, Rate = <REWARD_RATE>}, } <MONSTER_ID>: The monster's ID that will have specific rewards. <GOLD_AMOUNT>: The amount of gold to be given (if none, just set to zero). <ITEM_ID>: The item's ID to be given. <MIN_QTY> / <MAX_QTY>: The minimum and maximum quantity that can be given from the previous item. <ITEM_QUALITY>: The quality of the item (mostly used for gems). <REWARD_RATE>: The rate as a number that is used to add weight to the reward. This number will be added with the other rates from the items in this map's reward list, the lower the number compared to others, the lower probability this reward will appear in a contract. Script Logic: Player defeats a monster. System will look if the map where the player is located is defined. If defined, then it will grab a monster from that list. If not defined, it will grab a monster from the generic list. It will set the monster to the contract and a random amount between the minimum and maximum quantity available. Player must defeat the quantity of the monster set within the contract. Upon completion, player must double click the contract to finish. System will look if the monster has a specific reward and choose one from there. If no specific reward is set for that monster, then it will iterate through all the maps defined to see if the monster is defined within there. If a defined monster is found, then it will grab a reward from that map's list. If no reward has been chosen, then it will grab a reward from the generic list. The gold (if any) and item (if any) will be given to player. The quantity will be random from the minimum and maximum set.
  2. 1 point
    Hello @Mdrst and @dragontechi! We will try to understand the reasons for blacklisting our forum among some antiviruses and will check the website files for viruses. Presumably, the problem is in some links that lead to Discord resources. Thank you for your attention to the problem!
  3. 1 point
    На настоящий момент разработано 2 мода (один, кстати, по одной из твоих тем) и еще несколько модов в разработке. Скоро их опубликую.
  4. 1 point
    Hello @kyleflow, I received your server files, thank you! I will check them in a few days.
  5. 1 point
    Hello! You can find some functions that need to be changed in the CO sources, in the hook.h file. Also specific changes can be found in the dllmain.cpp file.
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...