mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 13:47:46 +00:00
Merge branch 'develop' into ioncannon/crafting_and_localleves
This commit is contained in:
commit
8a5b97f5b2
15 changed files with 160 additions and 74 deletions
|
@ -4,20 +4,149 @@ MarketEntrance Script
|
|||
|
||||
Functions:
|
||||
|
||||
eventPushChoiceAreaOrQuest(gcLeaderPlaceName[Fronds, etc], showMarketWards/Houses (must be 0xc1a), gcHQPlaceName, anotherPlaceName, showItemSearchCounter, stopSearchingItemId) -
|
||||
eventPushStepPrvMarket(?, ?, ?) -
|
||||
Parameters mostly rely on the xtx_placeName sheet for its strings.
|
||||
|
||||
eventPushChoiceAreaOrQuest(
|
||||
exitPlaceName[Fronds, etc], - Retail only showed it when inside a Market Ward/Office Set to 0 to hide the menu.
|
||||
showMarketWards/Houses - If > 0, client script adds nation-specific Mercentile Houses as well.
|
||||
gcHQPlaceName, - Set to the placeName id for the Grand Company office of that city
|
||||
questAreaName, - Set to the placeName id of applicable quest instance, ex. Sailors Ward.
|
||||
showItemSearchCounter, - If true, shows the Item Search menu
|
||||
itemSearchId - If > 0 & showItemSearchCounter = true, displays the item name with a "Stop Searching"
|
||||
)
|
||||
eventPushStepPrvMarket(
|
||||
staringWard, - Sets the starting placeName id
|
||||
wardCount, - Valid number 1-20. Sets the amount of market ward entries. Client continues sequentially from startingWard id.
|
||||
excludeWard - Hides the ward in the list that matches the id. Use on the ward you're currently in.
|
||||
)
|
||||
|
||||
|
||||
MarketEntrance City TriggerBox details
|
||||
Limsa - !warp 230 -416.5 40 446 ActorClass Id = 1090238
|
||||
bgObj Id - [0xB3B] 2875
|
||||
Layout Id - [0x79 ] 121 (0x29d90001)
|
||||
Condition - in
|
||||
reactName - dwti - Not a typo compared to the other cities
|
||||
Gridania - !warp 206 -192.57 23.48 -1407.58 ActorClass Id = 1090264
|
||||
|
||||
bgObj Id - [0xCFA] 3322
|
||||
Layout Id - [0x141] 321 (0x29b00001)
|
||||
Condition - in
|
||||
reactName - dtwi
|
||||
Ul'dah - !warp 175 -235 189 50.5 ActorClass Id = 1500394
|
||||
bgObj Id - [0x102F] 4143
|
||||
Layout Id - [0x1A5] 421 (0x615a0001)
|
||||
Condition - in
|
||||
reactName - dtwi
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
local MARKETWARD_ENTRANCE = {-201.0, 0.0, -160.0, 1.5};
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
|
||||
CITY_INFO = { -- wardPlaceName, exitPlaceName, gcHQPlaceName, questAreaName, wardListStart, wardListCount
|
||||
{1093, 1087, 1512, 1091, 1261, 20}, -- Limsa
|
||||
{2099, 2091, 2526, 2095, 2261, 20}, -- Gridania
|
||||
{3098, 3091, 3514, 3095, 3261, 20}, -- Ul'dah
|
||||
}
|
||||
|
||||
-- TO-DO: Add some X/Z pos jitter to Entrances/Exits when called
|
||||
MARKETWARD_ENTRANCE = {
|
||||
{134, 160, 0, 135}, -- Limsa Market
|
||||
{160, 160, 0, 138}, -- Gridania Market
|
||||
{180, 160, 0, 185} -- Ul'dah Market
|
||||
}
|
||||
|
||||
MARKETWARD_EXIT = {
|
||||
{230, -420, 41, 435, -3.14}, -- Educated guess for Limsa, need video reference to confirm
|
||||
{206, -180, 22, -1408, 1.5},
|
||||
{175, -210, 190, 25, 0.65}
|
||||
}
|
||||
|
||||
GC_ENTRANCE = {
|
||||
[1512] = {232, 160, 0, -155}, -- Maelstrom Command
|
||||
[2526] = {234, 160, 0, -155}, -- Adders' Nest
|
||||
[3514] = {233, 160, 0, -155} -- Hall of Flames
|
||||
}
|
||||
|
||||
city = {
|
||||
[1090238] = 1, -- Limsa Market Ward Entrance
|
||||
[1090264] = 2, -- Gridania Market Ward Entrance
|
||||
[1090265] = 3, -- Ul'dah Market Ward Entrance
|
||||
[1500392] = 1, -- Limsa : M'septha
|
||||
[1500393] = 2, -- Gridania : Torsefers
|
||||
[1500394] = 3, -- Ul'dah : Edine
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
callClientFunction(player, "eventPushChoiceAreaOrQuest", 0xc13, 0xc1a, 0xdba, 0, true, 1);
|
||||
|
||||
local npcCity = city[npc:GetActorClassId()] or 1;
|
||||
local wardPlaceName = CITY_INFO[npcCity][1]; -- Market Wards category name. Identical in all languages except Japanese
|
||||
local exitPlaceName = CITY_INFO[npcCity][2]; -- Central Limsa Lominsa / Heartstream / The Fronds
|
||||
local gcHQPlaceName = CITY_INFO[npcCity][3]; -- Maelstrom Command / Adders' Nest / Hall of Flames
|
||||
local questAreaName = 0; --CITY_INFO[npcCity][4]; -- Sailors Ward / Peasants Ward / Merchants Ward
|
||||
local wardListStart = CITY_INFO[npcCity][5]; -- Starting id for the market wards
|
||||
local wardListCount = CITY_INFO[npcCity][6]; -- Amount of wards in the list
|
||||
local showItemSearchCounter = false;
|
||||
local itemSearchId = 11000125;
|
||||
|
||||
local worldMaster = GetWorldMaster();
|
||||
local pos = player:GetPos();
|
||||
local currZone = pos[4];
|
||||
|
||||
if (currZone == 133 or currZone == 230 or currZone == 155 or currZone == 206 or currZone == 175 or currZone == 209) then
|
||||
exitPlaceName = 0; -- If in city, hide city menu option
|
||||
elseif (currZone == 232 or currZone == 234 or currZone == 233) then
|
||||
gcHQPlaceName = 0; -- If in GC Office, hide office menu option
|
||||
end
|
||||
|
||||
choice = callClientFunction(player, "eventPushChoiceAreaOrQuest", exitPlaceName, wardPlaceName, gcHQPlaceName, questAreaName, showItemSearchCounter, itemSearchId);
|
||||
|
||||
while (true) do
|
||||
|
||||
if choice == wardPlaceName then -- Market Wards
|
||||
wardSelect = callClientFunction(player, "eventPushStepPrvMarket", wardListStart, wardListCount, 0);
|
||||
|
||||
if wardSelect and (wardSelect >= wardListStart and wardSelect <= (wardListStart+wardListCount)) then
|
||||
player:SendGameMessage(player, worldMaster, 60004, 0x20, wardSelect);
|
||||
warp = MARKETWARD_ENTRANCE[npcCity];
|
||||
playerRot = math.random(-3.14, 3.14);
|
||||
wait(1);
|
||||
GetWorldManager():DoZoneChange(player, warp[1], nil, 0, 0x02, warp[2], warp[3], warp[4], playerRot);
|
||||
player:SendDataPacket("attention", worldMaster, "", 60003, wardSelect);
|
||||
-- Temp: Pop-up display after Ward zone-in. Client should automate this with PrivateArea's properly setup
|
||||
|
||||
break;
|
||||
end
|
||||
|
||||
elseif (choice == 1519 or choice == 2534 or choice == 3533) then -- Mercentile Wards
|
||||
player:SendMessage(0x20, "", "[MarketEntrance] DEBUG: "..choice);
|
||||
elseif (choice == 1512 or choice == 2526 or choice == 3514) then -- GC Office
|
||||
warp = GC_ENTRANCE[choice];
|
||||
player:SendGameMessage(player, worldMaster, 60004, 0x20, choice);
|
||||
wait(1);
|
||||
GetWorldManager():DoZoneChange(player, warp[1], nil, 0, 0x02, warp[2], warp[3], warp[4], math.pi);
|
||||
break;
|
||||
elseif (choice == 1087 or choice == 2091 or choice == 3091) then -- Exiting to City
|
||||
player:SendGameMessage(player, worldMaster, 60004, 0x20, choice);
|
||||
warp = MARKETWARD_EXIT[npcCity];
|
||||
wait(1);
|
||||
GetWorldManager():DoZoneChange(player, warp[1], nil, 0, 0x02, warp[2], warp[3], warp[4], warp[5]);
|
||||
break;
|
||||
elseif (choice == 0 or choice == -3) then -- Menu Closed
|
||||
break;
|
||||
end
|
||||
|
||||
choice = callClientFunction(player, "eventPushChoiceAreaOrQuest", exitPlaceName, wardPlaceName, gcHQPlaceName, questAreaName, showItemSearchCounter, itemSearchId);
|
||||
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
|
@ -413,7 +413,6 @@ function startCrafting(player, hand, recipe, quest, startDur, startQly, startHQ)
|
|||
local qltyDiff = math.random(0,2);
|
||||
|
||||
if progress >= 100 then
|
||||
|
||||
player:SendGameMessage(GetWorldMaster(), 40111, 0x20, player, itemId, 3, 8); -- "You create <#3 quantity> <#1 item> <#2 quality>."
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "closeCraftProgressWidget", commandactor);
|
||||
|
||||
|
|
|
@ -126,8 +126,6 @@ function onEventStarted(player, commandActor, triggerName, arg1, arg2, arg3, arg
|
|||
|
||||
player:ChangeState(50);
|
||||
|
||||
|
||||
|
||||
if harvestType == commandMine then
|
||||
player:SendGameMessage(harvestJudge, 26, MESSAGE_TYPE_SYSTEM, 1, nodeGrade);
|
||||
|
||||
|
@ -156,7 +154,6 @@ function onEventStarted(player, commandActor, triggerName, arg1, arg2, arg3, arg
|
|||
|
||||
if debugMsg then player:SendMessage(0x20, "", tostring(chosenCommand).." Power: "..tostring(currentPower)); end
|
||||
|
||||
|
||||
if chosenCommand == 22702 then -- Cancel.
|
||||
harvestAttempts = harvestAttempts - 1;
|
||||
|
||||
|
@ -171,14 +168,11 @@ function onEventStarted(player, commandActor, triggerName, arg1, arg2, arg3, arg
|
|||
elseif chosenCommand == 22703 then -- Strike.
|
||||
|
||||
player:PlayAnimation(minerAnim[math.random(1,3)]);
|
||||
|
||||
nodeRemainder = nodeRemainder - 20;
|
||||
if nodeRemainder < 0 then
|
||||
nodeRemainder = 0;
|
||||
end
|
||||
|
||||
|
||||
|
||||
--player:SendGameMessage(harvestJudge, 25, MESSAGE_TYPE_SYSTEM, item, 4, 1);
|
||||
callClientFunction(player, "delegateCommand", harvestJudge, "orderInputWidget", commandActor, nodeRemainder, false, harvestType);
|
||||
|
||||
|
@ -199,7 +193,6 @@ function onEventStarted(player, commandActor, triggerName, arg1, arg2, arg3, arg
|
|||
wait(2);
|
||||
break;
|
||||
end
|
||||
|
||||
elseif chosenCommand == 22710 then -- "Strike" Tutorial.
|
||||
SendTutorial(player, harvestJudge, 2);
|
||||
end
|
||||
|
@ -246,5 +239,4 @@ function SendTutorial(player, harvestJudge, id)
|
|||
wait(3);
|
||||
player:SendGameMessage(harvestJudge, 16, MESSAGE_TYPE_SYSTEM);
|
||||
end
|
||||
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 94,
|
||||
shopPack = 0x67,
|
||||
shopCurrancy = nil
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 69,
|
||||
shopPack = 3020,
|
||||
tutorialId = 35
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 64,
|
||||
shopPack = 3021,
|
||||
tutorialId = 34
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 76,
|
||||
shopPack = 3022,
|
||||
tutorialId = 39
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 54,
|
||||
shopPack = 3019,
|
||||
tutorialId = 32
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 265,
|
||||
shopPack = 3024
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 111,
|
||||
shopPack = 3003
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 110,
|
||||
shopPack = 3002
|
||||
}
|
|
@ -17,7 +17,10 @@ CREATE DATABASE IF NOT EXISTS `ffxiv_server` /*!40100 DEFAULT CHARACTER SET lati
|
|||
USE `ffxiv_server`;
|
||||
|
||||
-- Dumping structure for table ffxiv_server.gamedata_recipes
|
||||
<<<<<<< HEAD
|
||||
DROP TABLE IF EXISTS `gamedata_recipes`;
|
||||
=======
|
||||
>>>>>>> develop
|
||||
CREATE TABLE IF NOT EXISTS `gamedata_recipes` (
|
||||
`id` int(4) NOT NULL AUTO_INCREMENT,
|
||||
`craftedItem` int(11) NOT NULL,
|
||||
|
@ -46,6 +49,7 @@ CREATE TABLE IF NOT EXISTS `gamedata_recipes` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
<<<<<<< HEAD
|
||||
-- Dumping data for table ffxiv_server.gamedata_recipes: ~5,410 rows (approximately)
|
||||
/*!40000 ALTER TABLE `gamedata_recipes` DISABLE KEYS */;
|
||||
INSERT INTO `gamedata_recipes` (`id`, `craftedItem`, `craftedQuantity`, `job`, `level`, `dated`, `kind`, `crystal0ID`, `crystal0Quantity`, `crystal1ID`, `crystal1Quantity`, `facilities`, `material0`, `material1`, `material2`, `material3`, `material4`, `material5`, `material6`, `material7`, `subSkill0Job`, `subSkill0Level`, `subSkill1Job`, `subSkill1Level`) VALUES
|
||||
|
@ -5435,6 +5439,9 @@ INSERT INTO `gamedata_recipes` (`id`, `craftedItem`, `craftedQuantity`, `job`, `
|
|||
(5384, 3010023, 2, 'H', 6, 0, 'CC', 1000009, 2, 0, 0, NULL, 3011012, 3011016, 3011501, 3010018, 3011515, 3011517, 0, 0, NULL, NULL, NULL, NULL);
|
||||
/*!40000 ALTER TABLE `gamedata_recipes` ENABLE KEYS */;
|
||||
|
||||
=======
|
||||
-- Data exporting was unselected.
|
||||
>>>>>>> develop
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
|
|
|
@ -2732,7 +2732,7 @@ namespace Meteor.Map.Actors
|
|||
private void EquipAbilitiesAtLevel(byte classId, short level, List<CommandResult> actionList = null)
|
||||
{
|
||||
//If there's any abilites that unlocks at this level, equip them.
|
||||
List<ushort> commandIds = Server.GetWorldManager().GetBattleCommandIdByLevel(classId, GetLevel());
|
||||
List<ushort> commandIds = Server.GetWorldManager().GetBattleCommandIdByLevel(classId, level);
|
||||
foreach (ushort commandId in commandIds)
|
||||
{
|
||||
EquipAbilityInFirstOpenSlot(classId, commandId, false);
|
||||
|
|
|
@ -79,8 +79,10 @@ namespace Meteor.Map.actors
|
|||
|
||||
public class PushBoxEventCondition
|
||||
{
|
||||
public uint bgObj;
|
||||
public uint layout;
|
||||
public string conditionName = "";
|
||||
public float size = 30.0f;
|
||||
public string reactName = "";
|
||||
public bool outwards = false;
|
||||
public bool silent = true;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ using System.Text;
|
|||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.actor.events
|
||||
namespace Meteor.Map.packets.send.actor.events
|
||||
{
|
||||
class SetPushEventConditionWithTriggerBox
|
||||
{
|
||||
|
@ -41,17 +41,19 @@ namespace Meteor.Map.packets.send.actor.events
|
|||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt32)condition.size);
|
||||
binWriter.Write((UInt32)0x1A5);
|
||||
binWriter.Write((UInt32)4);
|
||||
binWriter.Seek(8, SeekOrigin.Current);
|
||||
binWriter.Write((UInt32)condition.bgObj); // bgObj
|
||||
binWriter.Write((UInt32)condition.layout); // Layout
|
||||
binWriter.Write((UInt32)4); // Actor? Always 4 in 1.23
|
||||
binWriter.Seek(8, SeekOrigin.Current); // Unknowns
|
||||
binWriter.Write((Byte)(condition.outwards ? 0x11 : 0x0)); //If == 0x10, Inverted Bounding Box
|
||||
binWriter.Write((Byte)3);
|
||||
binWriter.Write((Byte)(condition.silent ? 0x1 : 0x0)); //Silent Trigger;
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(condition.conditionName), 0, Encoding.ASCII.GetByteCount(condition.conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(condition.conditionName));
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(condition.conditionName), 0, Encoding.ASCII.GetByteCount(condition.conditionName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(condition.conditionName));
|
||||
binWriter.Seek(55, SeekOrigin.Begin);
|
||||
binWriter.Write((Byte)0); // Unknown
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(condition.reactName), 0, Encoding.ASCII.GetByteCount(condition.reactName) >= 0x04 ? 0x04 : Encoding.ASCII.GetByteCount(condition.reactName));
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue