mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Actor script fixes, documented populace classes and misc things
Base
- gcseals.lua
Helper functions for GC seals. Tables the seal caps per rank and checks against it when adding seals.
Commands
- PartyTargetCommand.lua :
Handles markers above head. Basic documentation, only works on self. "Heart" doesn't work, client bug?
Eventually will need an object in the party class to handle tracking marked players/targets for the group.
Class Scripts
- PopulaceCaravanAdviser.lua
Documented. Can purchase gysahl greens from them, unsure what else their use is.
- PopulaceCaravanGuide.lua
Documented the Caravan Guide NPC, who escorts the chocobos with you.
- PopulaceCaravanManager.lua
NPC who handles signing up for Caravan escort, among other functions.
- PopulaceSpecialEventCryer.lua
Covers three NPCs for the Foundation Event. They handle trading specific items in exchange for GC seals.
Unique ID Script fixes
- flame_private_sisimuza_tetemuza.lua
Foundation Event NPC functions laid out.
- flame_sergeant_mimio_mio.lua
Foundation Event NPC functions laid out.
- serpent_lieutenant_marette.lua
Foundation Event NPC functions laid out.
- serpent_private_tristelle.lua
Foundation Event NPC functions laid out.
- serpent_sergeant_frilaix.lua
Foundation Event NPC functions laid out.
- serpent_sergeant_nelhah.lua
Removed unique script. PopulaceSpecialEventCryer handles it.
- ansgor.lua
Had incorrect defaultTalk value
- ne_of_eshtaimes.lua
Door @ !warp 209 -139 206.113 195 Had incorrect mapObj value.
This commit is contained in:
66
data/scripts/gcseals.lua
Normal file
66
data/scripts/gcseals.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
--[[
|
||||
|
||||
Grand Company Seal Helper Functions
|
||||
|
||||
--]]
|
||||
require("global");
|
||||
|
||||
local companySeal = {1000201, 1000202, 1000203}; -- Storm, Serpent, Flame
|
||||
local rankSealCap = {
|
||||
[0] = 0, -- None
|
||||
[11] = 10000, -- Private Third Class
|
||||
[13] = 15000, -- Private Second Class
|
||||
[15] = 20000, -- Private First Class
|
||||
[17] = 25000, -- Corporal
|
||||
[21] = 30000, -- Sergeant Third Class
|
||||
[23] = 35000, -- Sergeant Second Class
|
||||
[25] = 40000, -- Sergeant First Class
|
||||
[27] = 45000, -- Chief Sergeant
|
||||
[31] = 50000, -- Second Lieutenant
|
||||
[33] = 50000, -- First Lieutenant
|
||||
[35] = 50000, -- Captain
|
||||
[41] = 60000, -- Second Commander
|
||||
[43] = 60000, -- First Commander
|
||||
[45] = 60000, -- High Commander
|
||||
[51] = 70000, -- Rear Marshal
|
||||
[53] = 70000, -- Vice Marshal
|
||||
[55] = 70000, -- Marshal
|
||||
[57] = 70000, -- Grand Marshal
|
||||
[100] = 100000, -- Champion
|
||||
[111] = 0, -- Chief Admiral/Elder Seedseer/General
|
||||
[127] = 10000 -- Recruit
|
||||
}
|
||||
|
||||
function GetGCSeals(player, company)
|
||||
company = tonumber(company);
|
||||
|
||||
if company ~= nil and company > 0 and company < 4 then
|
||||
return player:GetInventory(INVENTORY_CURRENCY):GetItemQuantity(companySeal[tonumber(company)]);
|
||||
else
|
||||
return -1;
|
||||
end
|
||||
end
|
||||
|
||||
function AddGCSeals(player, company, amount)
|
||||
amount = tonumber(amount);
|
||||
company = tonumber(company);
|
||||
|
||||
local gcRank = {player.gcRankLimsa, player.gcRankGridania, player.gcRankUldah};
|
||||
local currentAmount = GetGCSeals(player, company);
|
||||
local maxAmount = rankSealCap[gcRank[company]];
|
||||
|
||||
if currentAmount ~= -1 then
|
||||
if amount then
|
||||
if currentAmount + amount <= maxAmount then
|
||||
invCheck = player:GetInventory(INVENTORY_CURRENCY):AddItem(companySeal[company], amount, 1);
|
||||
if invCheck == INV_ERROR_SUCCESS then
|
||||
return INV_ERROR_SUCCESS;
|
||||
end
|
||||
else
|
||||
return INV_ERROR_FULL;
|
||||
end
|
||||
end
|
||||
else
|
||||
return INV_ERROR_SYSTEM_ERROR;
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user