fixed method casing in lua

This commit is contained in:
Tahir Akhlaq 2016-06-15 03:41:23 +01:00
parent ba13d5798d
commit 884a26dc52
368 changed files with 1121 additions and 1121 deletions

View file

@ -8,17 +8,17 @@ Switches between active and passive mode states
function onEventStarted(player, command, triggerName)
if (player:getState() == 0) then
if (player:GetState() == 0) then
player:changeState(2);
elseif (player:getState() == 2) then
elseif (player:GetState() == 2) then
player:changeState(0);
end
player:endCommand();
player:EndCommand();
--For Opening Tutorial
if (player:hasQuest("Man0l0") or player:hasQuest("Man0g0") or player:hasQuest("Man0u0")) then
player:getDirector():onCommand(command);
player:GetDirector():OnCommand(command);
end

View file

@ -10,13 +10,13 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
function onEventStarted(player, actor, triggerName)
worldMaster = getWorldMaster();
worldMaster = GetWorldMaster();
if (player:getState() != 2) then
player:sendGameMessage(worldMaster, 32503, 0x20);
if (player:GetState() != 2) then
player:SendGameMessage(worldMaster, 32503, 0x20);
end
player:endCommand();
player:EndCommand();
end

View file

@ -9,15 +9,15 @@ operateUI(pointsAvailable, pointsLimit, str, vit, dex, int, min, pie)
--]]
function onEventStarted(player, actor, triggerName)
--local points = player:getAttributePoints();
--player:runEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT);
player:runEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10);
--local points = player:GetAttributePoints();
--player:RunEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT);
player:RunEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10);
end
function onEventUpdate(player, actor, step, arg1)
--Submit
player:endCommand();
player:EndCommand();
end

View file

@ -8,12 +8,12 @@ Handles player examining someone
function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId)
actor = player:getActorInInstance(checkedActorId);
actor = player:GetActorInInstance(checkedActorId);
if (actor ~= nil) then
player:examinePlayer(actor);
end
player:endCommand();
player:EndCommand();
end

View file

@ -8,40 +8,40 @@ Handles mounting and dismounting the Chocobo and Goobbue
function onEventStarted(player, actor, triggerName, isGoobbue)
if (player:getState() == 0) then
if (player:GetState() == 0) then
worldMaster = getWorldMaster();
worldMaster = GetWorldMaster();
if (isGoobbue ~= true) then
player:changeMusic(83);
player:sendChocoboAppearance();
player:sendGameMessage(player, worldMaster, 26001, 0x20);
player:setMountState(1);
player:SendChocoboAppearance();
player:SendGameMessage(player, worldMaster, 26001, 0x20);
player:SetMountState(1);
else
player:changeMusic(98);
player:sendGoobbueAppearance();
player:sendGameMessage(player, worldMaster, 26019, 0x20);
player:setMountState(2);
player:SendGoobbueAppearance();
player:SendGameMessage(player, worldMaster, 26019, 0x20);
player:SetMountState(2);
end
player:changeSpeed(0.0, 5.0, 10.0);
player:changeState(15);
else
player:changeMusic(player:getZone().bgmDay);
player:changeMusic(player:GetZone().bgmDay);
worldMaster = getWorldMaster();
worldMaster = GetWorldMaster();
if (player:getMountState() == 1) then
player:sendGameMessage(player, worldMaster, 26003, 0x20);
if (player:GetMountState() == 1) then
player:SendGameMessage(player, worldMaster, 26003, 0x20);
else
player:sendGameMessage(player, worldMaster, 26021, 0x20);
player:SendGameMessage(player, worldMaster, 26021, 0x20);
end
player:setMountState(0);
player:SetMountState(0);
player:changeSpeed(0.0, 2.0, 5.0)
player:changeState(0);
end
player:endCommand();
player:EndCommand();
end

View file

@ -12,10 +12,10 @@ function onEventStarted(player, actor, triggerName, maxNumber)
result = math.random(0, maxNumber);
worldMaster = getWorldMaster();
player:sendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber);
worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber);
player:endCommand();
player:EndCommand();
end

View file

@ -6,7 +6,7 @@ EmoteSitCommand Script
function onEventStarted(player, actor, triggerName, emoteId)
if (player:getState() == 0) then
if (player:GetState() == 0) then
if (emoteId == 0x2712) then
player:changeState(11);
else
@ -16,7 +16,7 @@ function onEventStarted(player, actor, triggerName, emoteId)
player:changeState(0);
end
player:endCommand();
player:EndCommand();
end

View file

@ -11,11 +11,11 @@ emoteTable = {
function onEventStarted(player, actor, triggerName, emoteId)
if (player:getState() == 0) then
if (player:GetState() == 0) then
player:doEmote(emoteId);
end
player:endCommand();
player:EndCommand();
end

View file

@ -58,23 +58,23 @@ function onEventStarted(player, actor, triggerName, invActionInfo, param1, param
--Equip Item
if (invActionInfo ~= nil) then
item = player:getInventory(0):getItemBySlot(invActionInfo.slot);
item = player:GetInventory(0):GetItemBySlot(invActionInfo.slot);
equipItem(player, equipSlot, item);
player:sendAppearance();
player:SendAppearance();
--Unequip Item
else
item = player:getEquipment():GetItemAtSlot(equipSlot);
item = player:GetEquipment():GetItemAtSlot(equipSlot);
if (unequipItem(player, equipSlot, item) == true) then --Returns true only if something changed (didn't error out)
player:sendAppearance();
player:SendAppearance();
end
end
player:endCommand();
player:EndCommand();
end
function loadGearset(player, classId)
player:getEquipment():ToggleDBWrite(false);
local gearset = player:getGearset(classId);
player:GetEquipment():ToggleDBWrite(false);
local gearset = player:GetGearset(classId);
if gearset == nil then
return;
@ -83,7 +83,7 @@ function loadGearset(player, classId)
for slot = 0, 34 do
if (slot ~= EQUIPSLOT_MAINHAND and slot ~= EQUIPSLOT_UNDERSHIRT and slot ~= EQUIPSLOT_UNDERGARMENT) then
itemAtSlot = player:getEquipment():GetItemAtSlot(slot);
itemAtSlot = player:GetEquipment():GetItemAtSlot(slot);
itemAtGearsetSlot = gearset[slot];
if (itemAtSlot ~= nil or itemAtGearsetSlot ~= nil) then
@ -100,15 +100,15 @@ function loadGearset(player, classId)
end
player:getEquipment():ToggleDBWrite(true);
player:GetEquipment():ToggleDBWrite(true);
end
function equipItem(player, equipSlot, item)
if (item ~= nil) then
local classId = nil;
local worldMaster = getWorldMaster();
local gItem = getItemGamedata(item.itemId);
local worldMaster = GetWorldMaster();
local gItem = GetItemGamedata(item.itemId);
--If it's the mainhand, begin class change based on weapon
if (equipSlot == EQUIPSLOT_MAINHAND) then
@ -136,16 +136,16 @@ function equipItem(player, equipSlot, item)
end
if (classId ~= nil) then
player:sendGameMessage(player, worldMaster, 30103, 0x20, 0, 0, player, classId);
player:SendGameMessage(player, worldMaster, 30103, 0x20, 0, 0, player, classId);
player:prepareClassChange(classId);
end
end
--Item Equipped message
player:sendGameMessage(player, worldMaster, 30601, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1);
player:SendGameMessage(player, worldMaster, 30601, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1);
player:getEquipment():Equip(equipSlot, item);
player:GetEquipment():Equip(equipSlot, item);
if (equipSlot == EQUIPSLOT_MAINHAND and gItem:IsNailWeapon() == false and gItem:IsBowWeapon() == false) then graphicSlot = GRAPHICSLOT_MAINHAND;
elseif (equipSlot == EQUIPSLOT_OFFHAND) then graphicSlot = GRAPHICSLOT_OFFHAND;
@ -184,19 +184,19 @@ function equipItem(player, equipSlot, item)
end
function unequipItem(player, equipSlot, item)
worldMaster = getWorldMaster();
worldMaster = GetWorldMaster();
if (item ~= nil and (equipSlot == EQUIPSLOT_MAINHAND or equipSlot == EQUIPSLOT_UNDERSHIRT or equipSlot == EQUIPSLOT_UNDERGARMENT)) then
player:sendGameMessage(player, worldMaster, 30730, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Unable to unequip
player:SendGameMessage(player, worldMaster, 30730, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Unable to unequip
elseif (item ~= nil) then
player:sendGameMessage(player, worldMaster, 30602, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Item Removed
player:getEquipment():Unequip(equipSlot);
player:SendGameMessage(player, worldMaster, 30602, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Item Removed
player:GetEquipment():Unequip(equipSlot);
if (equipSlot == EQUIPSLOT_BODY) then --Show Undershirt
item = player:getEquipment():GetItemAtSlot(EQUIPSLOT_UNDERSHIRT);
item = player:GetEquipment():GetItemAtSlot(EQUIPSLOT_UNDERSHIRT);
player:graphicChange(GRAPHICSLOT_BODY, item);
elseif (equipSlot == EQUIPSLOT_LEGS) then --Show Undergarment
item = player:getEquipment():GetItemAtSlot(EQUIPSLOT_UNDERGARMENT);
item = player:GetEquipment():GetItemAtSlot(EQUIPSLOT_UNDERGARMENT);
player:graphicChange(GRAPHICSLOT_LEGS, item);
elseif (equipSlot == EQUIPSLOT_HANDS) then player:graphicChange(15, 0, 1, 0, 0);
elseif (equipSlot == EQUIPSLOT_FEET) then player:graphicChange(16, 0, 1, 0, 0);

View file

@ -10,6 +10,6 @@ The param "itemDBIds" has the vars: item1 and item2.
--]]
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
player:getInventory(0x00):removeItem(invActionInfo.slot);
player:endCommand();
player:GetInventory(0x00):removeItem(invActionInfo.slot);
player:EndCommand();
end

View file

@ -16,36 +16,36 @@ Countdown: 1
--]]
function onEventStarted(player, command)
--player:setCurrentMenuId(0);
--player:runEventFunction("delegateCommand", command, "eventConfirm");
--player:SetCurrentMenuId(0);
--player:RunEventFunction("delegateCommand", command, "eventConfirm");
player:logout();
end
function onEventUpdate(player, command, triggerName, step, arg1, arg2)
currentMenuId = player:getCurrentMenuId();
currentMenuId = player:GetCurrentMenuId();
--Menu Dialog
if (currentMenuId == 0) then
if (arg1 == 1) then --Exit
player:quitGame();
player:endCommand();
player:EndCommand();
elseif (arg1 == 2) then --Character Screen
player:logout();
player:endCommand();
--player:setCurrentMenuId(1);
--player:runEventFunction("delegateCommand", command, "eventCountDown");
player:EndCommand();
--player:SetCurrentMenuId(1);
--player:RunEventFunction("delegateCommand", command, "eventCountDown");
elseif (arg1 == 3) then --Cancel
player:endCommand();
player:EndCommand();
end
--Countdown Dialog
elseif (currentMenuId == 1) then
if (arg2 == 1) then --Logout Complete
player:logout();
player:endCommand();
player:EndCommand();
elseif (arg2 == 2) then --Cancel Pressed
player:endCommand();
player:EndCommand();
end
end

View file

@ -9,11 +9,11 @@ Handles what happens when you invite
function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, actorId)
if (name ~= nil) then
getWorldManager():CreateInvitePartyGroup(player, name);
GetWorldManager():CreateInvitePartyGroup(player, name);
elseif (actorId ~= nil) then
getWorldManager():CreateInvitePartyGroup(player, actorId);
GetWorldManager():CreateInvitePartyGroup(player, actorId);
end
player:endCommand();
player:EndCommand();
end

View file

@ -4,6 +4,6 @@
--]]
function onEventStarted(player, actor, questId)
player:sendRequestedInfo("requestedData", "activegl", 7, nil, nil, nil, nil, nil, nil, nil);
-- player:sendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526);
player:SendRequestedInfo("requestedData", "activegl", 7, nil, nil, nil, nil, nil, nil, nil);
-- player:SendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526);
end

View file

@ -4,5 +4,5 @@
--]]
function onEventStarted(player, actor, questId)
player:sendRequestedInfo("requestedData", "qtdata", 0x1D4F2);
player:SendRequestedInfo("requestedData", "qtdata", 0x1D4F2);
end

View file

@ -18,34 +18,34 @@ Confirm Menu: 2
function onEventStarted(player, actor, triggerName, isTeleport)
if (isTeleport == 0) then
player:setCurrentMenuId(0);
player:runEventFunction("delegateCommand", actor, "eventRegion", 100);
player:SetCurrentMenuId(0);
player:RunEventFunction("delegateCommand", actor, "eventRegion", 100);
else
player:setCurrentMenuId(2);
player:runEventFunction("delegateCommand", actor, "eventConfirm", true, false, 1, 0x138824, false);
player:SetCurrentMenuId(2);
player:RunEventFunction("delegateCommand", actor, "eventConfirm", true, false, 1, 0x138824, false);
end
end
function onEventUpdate(player, actor, step, arg1)
menuId = player:getCurrentMenuId();
menuId = player:GetCurrentMenuId();
if (menuId == 0) then --Region
if (arg1 ~= nil and arg1 >= 1) then
player:setCurrentMenuId(1);
player:runEventFunction("delegateCommand", actor, "eventAetheryte", arg1, 2, 2, 2, 4, 4, 4);
player:SetCurrentMenuId(1);
player:RunEventFunction("delegateCommand", actor, "eventAetheryte", arg1, 2, 2, 2, 4, 4, 4);
else
player:endCommand();
player:EndCommand();
end
elseif (menuId == 1) then --Aetheryte
if (arg1 == nil) then
player:endCommand();
player:EndCommand();
return;
end
player:setCurrentMenuId(2);
player:runEventFunction("delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false);
player:SetCurrentMenuId(2);
player:RunEventFunction("delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false);
elseif (menuId == 2) then --Confirm
player:endCommand();
player:EndCommand();
end
end