Added Gridania scripts and various others. Fixed error messages popping for scripts that may not use certain functions.

This commit is contained in:
Filip Maj 2016-08-05 18:23:59 -04:00
parent 67928ee875
commit 5e926bf668
169 changed files with 1310 additions and 37 deletions

View file

@ -0,0 +1,5 @@
require ("global")
function init(npc)
return false, false, 0, 0, 0, 0;
end

View file

@ -0,0 +1,5 @@
require ("global")
function init(npc)
return false, false, 0, 0;
end

View file

@ -0,0 +1,22 @@
--[[
MarketEntrance Script
Functions:
eventPushChoiceAreaOrQuest(0xc13, 0xc1a, 0xdba,0, false, 0) -
eventPushStepPrvMarket(?, ?, ?) -
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
callClientFunction(player, "eventPushChoiceAreaOrQuest", 0xc13, 0xc1a, 0xdba,0, false, 0));
player:EndEvent();
end

View file

@ -0,0 +1,19 @@
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
harvestJudge = GetStaticActor("HarvestJudge");
--callClientFunction(player, "delegateEvent", player, harvestJudge, "loadTextData", dummy);
--callClientFunction(player, "delegateEvent", player, harvestJudge, "targetCancel", dummy);
--callClientFunction(player, "delegateEvent", player, harvestJudge, "turnToTarget", dummy, 0);
--callClientFunction(player, "delegateEvent", player, harvestJudge, "openInputWidget", 22002, 1);
--callClientFunction(player, "delegateEvent", player, harvestJudge, "textInputWidget", harvestJudge, 22002, npc, false);
--callClientFunction(player, "delegateEvent", player, harvestJudge, "askInputWidget", harvestJudge, 22002, 1);
player:EndEvent();
end

View file

@ -0,0 +1,25 @@
--[[
ObjectEventDoor Script
Functions:
eventDoorMoveAsk() - Shows confirm to move into event
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
choice = callClientFunction(player, "eventDoorMoveAsk");
if (choice == 1) then
end
player:EndEvent();
end

View file

@ -0,0 +1,6 @@
require ("global")
function init(npc)
return false, false, 0, 0;
end

View file

@ -0,0 +1,37 @@
--[[
PopulaceBlackMarketeer Script
Functions:
eventTalkWelcome(player) - Start Text
eventSellItemAsk(player, ?, ?)
eventAskMainMenu(player, index) - Shows
eventTalkBye(player) - Says bye text
eventTalkStepBreak() - Ends talk
eventSealShopMenuOpen() -
eventSealShopMenuAsk() -
eventSealShopMenuClose() -
eventGilShopMenuOpen() -
eventGilShopMenuAsk() -
eventGilShopMenuClose() -
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
callClientFunction(player, "eventTalkWelcome", player);
currancyType = callClientFunction(player, "eventAskMainMenu", player);
callClientFunction(player, "eventSealShopMenuAsk", player);
player:EndEvent();
end

View file

@ -0,0 +1,31 @@
--[[
PopulaceChocoboLender Script
Functions:
eventTalkWelcome(player) - Start Text
eventAskMainMenu(player, curLevel, hasFundsForRent, isPresentChocoboIssuance, isSummonMyChocobo, isChangeBarding, currentChocoboWare) - Shows the main menu
eventTalkMyChocobo(player) - Starts the cutscene for getting a chocobo
eventSetChocoboName(true) - Opens the set name dialog
eventAfterChocoboName(player) - Called if player done naming chocobo, shows cutscene, returns state and waits to teleport outside city.
eventCancelChocoboName(player) - Called if player cancels naming chocobo, returns state.
eventTalkStepBreak(player) - Finishes talkTurn and says a goodbye
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
--callClientFunction(player, "eventTalkWelcome", player);
callClientFunction(player, "eventAskMainMenu", player, 20, true, true, true, true, 4);
callClientFunction(player, "eventTalkMyChocobo", player);
callClientFunction(player, "eventSetChocoboName", false);
callClientFunction(player, "eventAfterChocoboName", player);
player:EndEvent();
end

View file

@ -0,0 +1,24 @@
--[[
PopulaceCompanyWarp Script
Functions:
eventTalkWelcome(player) - Start Text
eventAskMainMenu(player, index) - Shows teleport menu
eventAfterWarpOtherZone(player) - Fades out for warp
eventTalkStepBreak() - Ends talk
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
callClientFunction(player, "eventAskMainMenu", player, 1);
player:EndEvent();
end

View file

@ -0,0 +1,24 @@
--[[
PopulaceFlyingShip Script
Functions:
eventIn(player, hasTicket, nil?, travelPrice) - If hasTicket == nil, say no money text.
eventOut(isAborting) - Set isAborting to 30010 if player didn't "use" the airship. Shows no refund warning.
eventNG(player) - Message said when player is talking to the wrong npc.
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
callClientFunction(player, "eventIn", player, false, nil, 5);
player:EndEvent();
end

View file

@ -0,0 +1,34 @@
--[[
PopulaceItemRepairer Script
Functions:
talkWelcome(player, bool, number, bool) - Opens the main menu
selectItem(nil, pageNumber, ?, condition1, condition2, condition3, condition4, condition5) - "Ain't running a charity here", message said when you have insufficent funds
confirmRepairItem(player, price, itemId, hq grade) - Shows the confirm box for item repair.
confirmUseFacility(player, price) - Shows confirm box for using facility. Default price is 11k?
finishTalkTurn() - Call at end to stop npc from staring at the player (eeeek)
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
result = callClientFunction(player, "talkWelcome", player, false, 20, false);
if (result == 1) then
callClientFunction(player, "selectItem", nil, 1, 4, 2, 3, 4, 5, 6, 7);
elseif (result == 2) then
callClientFunction(player, "confirmUseFacility", player);
end
callClientFunction(player, "finishTalkTurn");
player:EndEvent();
end

View file

@ -39,6 +39,10 @@ function onEventStarted(player, npc, triggerName)
require("/unique/".. npc.zone.zoneName .."/PopulaceShopSalesman/" .. npc:GetUniqueId())
if (shopInfo.shopCurrancy == nil) then
shopInfo.shopCurrancy = 1000001;
end
callClientFunction(player, "welcomeTalk", shopInfo.welcomeText, player);
while (true) do
@ -85,13 +89,14 @@ function processNormalShop(player, choice)
callClientFunction(player, "openShopBuy", player, shopInfo.shopPack, shopInfo.shopCurrancy);
while (true) do
buyResult = callClientFunction(player, "selectShopBuy", player);
buyResult, index, quantity = callClientFunction(player, "selectShopBuy", player);
player:GetInventory(location):AddItem(3020308, 1);
if (buyResult == 0) then
callClientFunction(player, "closeShopBuy", player);
break;
else
player:SendMessage(0x20, "", "Player bought a thing at slot " .. tostring(buyResult)..".");
player:SendMessage(0x20, "", "Player bought a thing at slot " .. tostring(buyResult).. " with quantity "..tostring(index)..".");
end
end
@ -106,6 +111,12 @@ function processNormalShop(player, choice)
break;
else
player:SendMessage(0x20, "", "Player sold a thing at slot " .. tostring(sellResult)..".");
itemToSell = player:GetInventory(0x00):GetItemBySlot(sellResult.slot);
gItemTOSell = GetItemGamedata(itemToSell.itemId);
player:GetInventory(0x63):AddItem(shopInfo.shopCurrancy, gItemTOSell.sellPrice);
player:GetInventory(0x00):RemoveItemAtSlot(sellResult.slot);
end
end
@ -123,8 +134,8 @@ function processMultiShop(player, choice, sellType)
callClientFunction(player, "openShopBuy", player, shopInfo.shopPack[choice], shopInfo.shopCurrancy);
while (true) do
buyResult = callClientFunction(player, "selectShopBuy", player);
buyResult, index, quantity = callClientFunction(player, "selectShopBuy", player);
player:GetInventory(location):AddItem(3020308, 1);
if (buyResult == 0) then
callClientFunction(player, "closeShopBuy", player);
break;
@ -133,7 +144,7 @@ function processMultiShop(player, choice, sellType)
end
end
elseif (choice == 5) then
elseif (choice == 0) then
callClientFunction(player, "openShopSell", player);
while (true) do