From 09705bec4e9a73be10ca8a1515d27c5eb8d89e76 Mon Sep 17 00:00:00 2001 From: Drajiel Date: Thu, 11 Aug 2016 20:02:01 -0400 Subject: [PATCH 01/19] Updated Commands. --- data/scripts/commands/gm/delcurrency.lua | 18 ++++--- data/scripts/commands/gm/delitem.lua | 40 +++++++++++----- data/scripts/commands/gm/delkeyitem.lua | 21 +++++---- data/scripts/commands/gm/endevent.lua | 35 ++++++++++++++ data/scripts/commands/gm/givecurrency.lua | 15 ++++-- data/scripts/commands/gm/givegil.lua | 42 +++++++++++++++++ data/scripts/commands/gm/giveitem.lua | 43 ++++++++++++----- data/scripts/commands/gm/givekeyitem.lua | 9 +++- data/scripts/commands/gm/graphic.lua | 17 ++++++- data/scripts/commands/gm/music.lua | 6 ++- data/scripts/commands/gm/nudge.lua | 57 +++++++++++++++++++++++ data/scripts/commands/gm/sendpacket.lua | 7 ++- data/scripts/commands/gm/speed.lua | 26 ++++++++++- data/scripts/commands/gm/warp.lua | 14 +++--- data/scripts/commands/gm/weather.lua | 11 ++++- 15 files changed, 302 insertions(+), 59 deletions(-) create mode 100644 data/scripts/commands/gm/endevent.lua create mode 100644 data/scripts/commands/gm/givegil.lua create mode 100644 data/scripts/commands/gm/nudge.lua diff --git a/data/scripts/commands/gm/delcurrency.lua b/data/scripts/commands/gm/delcurrency.lua index 4eaaf4fe..28318d71 100644 --- a/data/scripts/commands/gm/delcurrency.lua +++ b/data/scripts/commands/gm/delcurrency.lua @@ -2,11 +2,16 @@ require("global"); properties = { permissions = 0, - parameters = "sssss", - description = "removes from , currency is removed from user if is nil", + parameters = "ssss", + description = +[[ +Removes currency from player or +!delcurrency | +!delcurrency | +]], } -function onTrigger(player, argc, currency, qty, location, name, lastName) +function onTrigger(player, argc, currency, qty, name, lastName) local sender = "[delcurrency] "; if name then @@ -19,12 +24,11 @@ function onTrigger(player, argc, currency, qty, location, name, lastName) if player then currency = tonumber(currency) or nil; - qty = 1; - location = INVENTORY_CURRENCY; + qty = tonumber(qty) or 1; - local removed = player:GetInventory(location):removecurrency(currency, qty); + local removed = player:GetInventory(INVENTORY_CURRENCY):RemoveItem(currency, qty); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; - local message = "unable to remove currency"; + local message = "Attempting to remove currency" -- "unable to remove currency"; if currency and removed then message = string.format("removed currency %u from %s", currency, player:GetName()); diff --git a/data/scripts/commands/gm/delitem.lua b/data/scripts/commands/gm/delitem.lua index 90c89082..bdfcd761 100644 --- a/data/scripts/commands/gm/delitem.lua +++ b/data/scripts/commands/gm/delitem.lua @@ -3,11 +3,18 @@ require("global"); properties = { permissions = 0, parameters = "sssss", - description = "removes from for . and are optional, item is removed from user if is nil", + description = +[[ +Removes from for player or . +!delitem | +!delitem | +!delitem | +]], } function onTrigger(player, argc, item, qty, location, name, lastName) local sender = "[delitem] "; + local messageID = MESSAGE_TYPE_SYSTEM_ERROR; if name then if lastName then @@ -20,18 +27,29 @@ function onTrigger(player, argc, item, qty, location, name, lastName) if player then item = tonumber(item) or nil; qty = tonumber(qty) or 1; - location = tonumber(itemtype) or INVENTORY_NORMAL; - local removed = player:GetInventory(location):removeItem(item, qty); - local messageID = MESSAGE_TYPE_SYSTEM_ERROR; - local message = "unable to remove item"; + if location then + location = tonumber(location) or _G[string.upper(location)]; + + if location == nil then + player:SendMessage(messageID, sender, "Unknown item location."); + return; + end; + else + location = INVENTORY_NORMAL; + end; - if item and removed then - message = string.format("removed item %u from %s", item, player:GetName()); - end - player:SendMessage(messageID, sender, message); - print(message); + local removed = player:GetInventory(location):RemoveItem(item, qty); + + if removed then -- RemoveItem() currently returns nothing for verification, this statement can't work + message = string.format("Removed item %u of kind %u to %s", item, location, player:GetName()); + end; else - print(sender.."unable to remove item, ensure player name is valid."); + print(sender.."[giveitem] Unable to remove item, ensure player name is valid."); + return; end; + + local message = string.format("Attempting to remove item %u of kind %u from %s", item, location, player:GetName()); + player:SendMessage(messageID, sender, message); + print(message); end; \ No newline at end of file diff --git a/data/scripts/commands/gm/delkeyitem.lua b/data/scripts/commands/gm/delkeyitem.lua index 66ad8549..be763961 100644 --- a/data/scripts/commands/gm/delkeyitem.lua +++ b/data/scripts/commands/gm/delkeyitem.lua @@ -3,7 +3,12 @@ require("global"); properties = { permissions = 0, parameters = "ssss", - description = "removes from , keyitem is removed from user if is nil", + description = +[[ +Removes from player or . +!delkeyitem | +!delkeyitem | +]], } function onTrigger(player, argc, keyitem, qty, name, lastName) @@ -19,16 +24,16 @@ function onTrigger(player, argc, keyitem, qty, name, lastName) if player then keyitem = tonumber(keyitem) or nil; - qty = 1; - location = INVENTORY_KEYITEMS; - - local removed = player:GetInventory(location):removeItem(item, qty); + qty = tonumber(qty) or 1; + local location = INVENTORY_KEYITEMS; + + local removed = player:GetInventory(location):RemoveItem(keyitem, qty); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; - local message = "unable to remove keyitem"; + local message = "Attempting to remove keyitem" -- "unable to remove keyitem"; - if keyitem and removed then + if removed then message = string.format("removed keyitem %u from %s", keyitem, player:GetName()); - end + end; player:SendMessage(messageID, sender, message); print(message); else diff --git a/data/scripts/commands/gm/endevent.lua b/data/scripts/commands/gm/endevent.lua new file mode 100644 index 00000000..a1306639 --- /dev/null +++ b/data/scripts/commands/gm/endevent.lua @@ -0,0 +1,35 @@ +require("global"); + +properties = { + permissions = 0, + parameters = "ss", + description = +[[ +Passes endEvent() to player or to close a script. +!endevent | +!endevent | +]], +} + +function onTrigger(player, argc, name, lastName) + local sender = "[endevent] "; + + if name then + if lastName then + player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil; + else + player = GetWorldManager():GetPCInWorld(name) or nil; + end; + end; + + local messageID = MESSAGE_TYPE_SYSTEM_ERROR; + local message = "Sending endEvent()"; + + if player then + player:endEvent(); + player:SendMessage(messageID, sender, message); + print(message); + else + print(sender.."Sending Event."); + end; +end; \ No newline at end of file diff --git a/data/scripts/commands/gm/givecurrency.lua b/data/scripts/commands/gm/givecurrency.lua index fea8f5fd..564dd73d 100644 --- a/data/scripts/commands/gm/givecurrency.lua +++ b/data/scripts/commands/gm/givecurrency.lua @@ -2,11 +2,16 @@ require("global"); properties = { permissions = 0, - parameters = "sss", - description = "adds to self or .", + parameters = "ssss", + description = +[[ +Adds currency to player or +!addcurrency | +!addcurrency | +]], } -function onTrigger(player, argc, currency, name, lastName) +function onTrigger(player, argc, currency, qty, name, lastName) local sender = "[givecurrency] "; if name then @@ -19,10 +24,10 @@ function onTrigger(player, argc, currency, name, lastName) if player then currency = tonumber(currency) or nil; - qty = 1; + qty = tonumber(qty) or 1; location = INVENTORY_CURRENCY; - local added = player:GetInventory(location):AddItem(currency, qty); + local added = player:GetInventory(location):AddItem(currency, qty, 1); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; local message = "unable to add currency"; diff --git a/data/scripts/commands/gm/givegil.lua b/data/scripts/commands/gm/givegil.lua new file mode 100644 index 00000000..b4d3a9c1 --- /dev/null +++ b/data/scripts/commands/gm/givegil.lua @@ -0,0 +1,42 @@ +require("global"); + +properties = { + permissions = 0, + parameters = "sss", + description = +[[ +Adds gil to player or . +!givegil | +!givegil | +]], +} + +function onTrigger(player, argc, qty, name, lastName) + local sender = "[givegil] "; + + if name then + if lastName then + player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil; + else + player = GetWorldManager():GetPCInWorld(name) or nil; + end; + end; + + if player then + currency = 1000001; + qty = tonumber(qty) or 1; + location = INVENTORY_CURRENCY; + + local added = player:GetInventory(location):AddItem(currency, qty, 1); + local messageID = MESSAGE_TYPE_SYSTEM_ERROR; + local message = "unable to add gil"; + + if currency and added then + message = string.format("added %u gil to %s", qty, player:GetName()); + end + player:SendMessage(messageID, sender, message); + print(message); + else + print(sender.."unable to add gil, ensure player name is valid."); + end; +end; \ No newline at end of file diff --git a/data/scripts/commands/gm/giveitem.lua b/data/scripts/commands/gm/giveitem.lua index 47c94a57..0b16b329 100644 --- a/data/scripts/commands/gm/giveitem.lua +++ b/data/scripts/commands/gm/giveitem.lua @@ -3,12 +3,20 @@ require("global"); properties = { permissions = 0, parameters = "sssss", - description = "adds to for . and are optional, item is added to user if is nil", + description = +[[ +Adds to for player or . +!giveitem | +!giveitem | +!giveitem | +]], } function onTrigger(player, argc, item, qty, location, name, lastName) local sender = "[giveitem] "; - + local messageID = MESSAGE_TYPE_SYSTEM_ERROR; + local message = string.format("Unable to add item %u", item); + if name then if lastName then player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil; @@ -20,17 +28,28 @@ function onTrigger(player, argc, item, qty, location, name, lastName) if player then item = tonumber(item) or nil; qty = tonumber(qty) or 1; - location = tonumber(itemtype) or INVENTORY_NORMAL; - local added = player:GetInventory(location):AddItem(item, qty); - local messageID = MESSAGE_TYPE_SYSTEM_ERROR; - local message = "unable to add item"; - if item and added then - message = string.format("added item %u to %s", item, player:GetName()); - end - player:SendMessage(messageID, sender, message); - print(message); + if location then + location = tonumber(location) or _G[string.upper(location)]; + + if not location then + player:SendMessage(messageID, sender, "Unknown item location."); + return; + end; + else + location = INVENTORY_NORMAL; + end; + + local added = player:getInventory(location):addItem(item, qty, 1); + + if added then + message = string.format("Added item %u of kind %u to %s", item, location, player:GetName()); + end; else - print(sender.."unable to add item, ensure player name is valid."); + print(sender.."[giveitem] Unable to add item, ensure player name is valid."); + return; end; + + player:SendMessage(messageID, sender, message); + print(message); end; \ No newline at end of file diff --git a/data/scripts/commands/gm/givekeyitem.lua b/data/scripts/commands/gm/givekeyitem.lua index af8aca70..9963005e 100644 --- a/data/scripts/commands/gm/givekeyitem.lua +++ b/data/scripts/commands/gm/givekeyitem.lua @@ -3,7 +3,12 @@ require("global"); properties = { permissions = 0, parameters = "sss", - description = "adds to self or .", + description = +[[ +Adds to player or . +!giveitem | +!giveitem | +]], } function onTrigger(player, argc, keyitem, name, lastName) @@ -22,7 +27,7 @@ function onTrigger(player, argc, keyitem, name, lastName) qty = 1; location = INVENTORY_KEYITEMS; - local added = player:GetInventory(location):AddItem(keyitem, qty); + local added = player:GetInventory(location):AddItem(keyitem, qty, 1); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; local message = "unable to add keyitem"; diff --git a/data/scripts/commands/gm/graphic.lua b/data/scripts/commands/gm/graphic.lua index c577f305..33e70754 100644 --- a/data/scripts/commands/gm/graphic.lua +++ b/data/scripts/commands/gm/graphic.lua @@ -1,18 +1,31 @@ +require("global"); + properties = { permissions = 0, parameters = "sssss", - description = "changes appearance for equipment in . Parameters: , (idk what any of those mean either)", + description = +[[ +Changes appearance for equipment with given parameters. +!graphic +]], } function onTrigger(player, argc, slot, wId, eId, vId, cId) + local messageID = MESSAGE_TYPE_SYSTEM_ERROR; + local sender = "[graphic] "; + slot = tonumber(slot) or 0; wId = tonumber(wId) or 0; eId = tonumber(eId) or 0; vId = tonumber(vId) or 0; cId = tonumber(cId) or 0; - if player then + if player and argc > 0 then player:GraphicChange(slot, wId, eId, vId, cId); player:SendAppearance(); + player:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot)); + else + player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description); end; + end; \ No newline at end of file diff --git a/data/scripts/commands/gm/music.lua b/data/scripts/commands/gm/music.lua index a55f697c..b1c56e74 100644 --- a/data/scripts/commands/gm/music.lua +++ b/data/scripts/commands/gm/music.lua @@ -1,7 +1,11 @@ properties = { permissions = 0, parameters = "s", - description = "plays music to player", + description = +[[ +Plays music to player. +!music +]], } function onTrigger(player, argc, music) diff --git a/data/scripts/commands/gm/nudge.lua b/data/scripts/commands/gm/nudge.lua new file mode 100644 index 00000000..932ed372 --- /dev/null +++ b/data/scripts/commands/gm/nudge.lua @@ -0,0 +1,57 @@ +require("global"); + +properties = { + permissions = 0, + parameters = "ss", + description = +[[ +Positions your character forward a set , defaults to 5 yalms. +!nudge | +!nudge | +!nudge | +]], + +} + +function onTrigger(player, argc, distance, vertical) + local pos = player:GetPos(); + local x = pos[0]; + local y = pos[1]; + local z = pos[2]; + local rot = pos[3]; + local zone = pos[4]; + local angle = rot + (math.pi/2); + local messageID = MESSAGE_TYPE_SYSTEM_ERROR; + local sender = "[nudge] "; + + if distance == nil then + distance = 5 + end; + + local px = x - distance * math.cos(angle); + local pz = z + distance * math.sin(angle); + local message = string.format("Positioning forward %u yalms.", distance); + local worldManager = GetWorldManager(); + + if argc == 1 then + worldManager:DoPlayerMoveInZone(player, px, y, pz, rot, 0x0); + player:SendMessage(messageID, sender, message); + elseif argc == 2 then + if vertical == "up" or vertical == "u" or vertical == "+" then + y = y + distance; + message = string.format("Positioning up %u yalms.", distance); + worldManager:DoPlayerMoveInZone(player, x, y, z, rot, 0x0); + player:SendMessage(messageID, sender, message); + elseif vertical == "down" or vertical == "d" or vertical == "-" then + y = y - distance; + message = string.format("Positioning down %u yalms.", distance); + worldManager:DoPlayerMoveInZone(player, x, y, z, rot, 0x0); + player:SendMessage(messageID, sender, message); + else + player:SendMessage(messageID, sender, "Unknown parameters! Usage: \n"..properties.description); + end; + else + worldManager:DoPlayerMoveInZone(player, px, y, pz, rot, 0x0); + player:SendMessage(messageID, sender, message); + end; +end; diff --git a/data/scripts/commands/gm/sendpacket.lua b/data/scripts/commands/gm/sendpacket.lua index d506c3b4..78102d68 100644 --- a/data/scripts/commands/gm/sendpacket.lua +++ b/data/scripts/commands/gm/sendpacket.lua @@ -1,7 +1,12 @@ properties = { permissions = 0, parameters = "ssss", - description = " ", + description = +[[ +Sends a custom to player or +!sendpacket | +!sendpacket | +]], } function onTrigger(player, argc, path, name, lastName) diff --git a/data/scripts/commands/gm/speed.lua b/data/scripts/commands/gm/speed.lua index 90cf537a..6033729d 100644 --- a/data/scripts/commands/gm/speed.lua +++ b/data/scripts/commands/gm/speed.lua @@ -1,13 +1,35 @@ +require("global"); + properties = { permissions = 0, parameters = "sss", - description = " speed", + description = +[[ +Set movement speed for player. Enter no value to reset to default. +!speed | +!speed | +]] + } function onTrigger(player, argc, stop, walk, run) + + + if argc == 1 then + s = 0; + w = (tonumber(stop) / 2); + r = tonumber(stop); + player:ChangeSpeed(s, w, r); + player:SendMessage(MESSAGE_TYPE_SYSTEM_ERROR, "[speed]", string.format("Speed set to 0/%u/%u", w,r)); + + elseif argc == 3 then stop = tonumber(stop) or 0; walk = tonumber(walk) or 2; run = tonumber(run) or 5; - player:ChangeSpeed(stop, walk, run); + player:SendMessage(MESSAGE_TYPE_SYSTEM_ERROR, "[speed]", string.format("Speed set to %u/%u/%u", stop, walk, run)); + else + player:ChangeSpeed(0.0, 2.0, 5.0); + end + end; \ No newline at end of file diff --git a/data/scripts/commands/gm/warp.lua b/data/scripts/commands/gm/warp.lua index 4652a0c6..60d81f40 100644 --- a/data/scripts/commands/gm/warp.lua +++ b/data/scripts/commands/gm/warp.lua @@ -5,9 +5,10 @@ properties = { parameters = "sssssss", description = [[ - | - | - . +Warp player or to a location from a list, or enter a zoneID with coordinates. +!warp | +!warp | +!warp | ]], } @@ -53,7 +54,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName) local z = tonumber(applyPositionOffset(p3, player_z)) or player_z; player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d within current zone (%d)", x, y, z, player_zone)); - worldManager:DoPlayerMoveInZone(player, x, y, z, 0x0F); + worldManager:DoPlayerMoveInZone(player, x, y, z, 0, 0x00); else local zone = tonumber(applyPositionOffset(p1, player_zone)) or player_zone; local x = tonumber(applyPositionOffset(p2, player_x)) or player_x; @@ -71,9 +72,10 @@ end; function applyPositionOffset(str, offset) local s = str; - print(s); if s:find("@") then - s = tonumber(s:sub(s:find("@") + 1, s:len())) + offset; + s = tonumber(s:sub(s:find("@") + 1, s:len())); + if s then s = s + offset end; end + print(s); return s; end; \ No newline at end of file diff --git a/data/scripts/commands/gm/weather.lua b/data/scripts/commands/gm/weather.lua index e1fd6703..4bec6d7a 100644 --- a/data/scripts/commands/gm/weather.lua +++ b/data/scripts/commands/gm/weather.lua @@ -3,7 +3,12 @@ require("global"); properties = { permissions = 0, parameters = "ssss", - description = "usage: .", + description = +[[ +Change the weather visual to and optional for player. +!weather | +!weather | +]], } function onTrigger(player, argc, weather, updateTime, zonewide) @@ -16,12 +21,14 @@ function onTrigger(player, argc, weather, updateTime, zonewide) weather = tonumber(weather) or 0; updateTime = tonumber(updateTime) or 0; zonewide = tonumber(zonewide) or 0; - message = "changed weather to %u "; + message = string.format("changed weather to %u ", weather); + if zonewide ~= 0 then message = string.format(message.."for zone %u", player:GetZoneID()); else message = string.format(message.."%s", player:GetName()); end; + -- weatherid, updateTime player:GetZone():ChangeWeather(weather, updateTime, player, zonewide ~= 0); player:SendMessage(messageID, sender, message); From 4f48643c5cdf69084ff26da274368c210d57a28f Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Wed, 17 Aug 2016 23:27:31 -0400 Subject: [PATCH 02/19] Limsa/Gridania NPC fixed scripts. Scripts still needed for Aubrenard & Gridania Aetheryte. Some required changes to the database: Task Board - Change 1200195 in gamedata_actor_class to /Chara/Npc/Object/TaskBoard Serpent_Private_White - Change 1500324 in gamedata_actor_class to /Chara/Npc/Populace/PopulaceCompanyWarp Beaudonet - Adjust 1001708 in gamedata_actor_class. There is a linebreak in there causing problems --- .../unique/fst0Town01/PopulaceStandard/l'tandhaa.lua | 2 +- .../unique/fst0Town01/PopulaceStandard/nonco_menanco.lua | 2 +- .../fst0Town01/PopulaceStandard/serpent_private_hill.lua | 7 ------- .../unique/fst0Town01/PopulaceStandard/task_board.lua | 7 ------- .../{PopulaceStandard => InstanceRaidGuide}/louisoix.lua | 2 +- .../anaidjaa.lua} | 2 +- .../unique/fst0Town01a/PopulaceStandard/aubrenard.lua | 2 +- .../unique/fst0Town01a/PopulaceStandard/drystbrod.lua | 2 +- data/scripts/unique/fst0Town01a/PopulaceStandard/eldid.lua | 2 +- data/scripts/unique/fst0Town01a/PopulaceStandard/enie.lua | 2 +- .../unique/fst0Town01a/PopulaceStandard/khuma_moshroca.lua | 2 +- .../unique/fst0Town01a/PopulaceStandard/maisenta.lua | 2 +- .../unique/fst0Town01a/PopulaceStandard/prosperlain.lua | 2 +- .../scripts/unique/fst0Town01a/PopulaceStandard/pukiki.lua | 2 +- .../PopulaceStandard/serpent_lieutenant_marette.lua | 4 ++-- .../PopulaceStandard/serpent_private_carver.lua | 7 ------- .../PopulaceStandard/serpent_private_holmes.lua | 7 ------- .../fst0Town01a/PopulaceStandard/serpent_private_kirk.lua | 7 ------- .../fst0Town01a/PopulaceStandard/serpent_private_stone.lua | 7 ------- .../PopulaceStandard/serpent_private_tristelle.lua | 4 ++-- .../fst0Town01a/PopulaceStandard/serpent_private_white.lua | 7 ------- .../PopulaceStandard/serpent_sergeant_frilaix.lua | 4 ++-- .../PopulaceStandard/merewina.lua} | 3 +-- .../sea0Town01/PopulaceStandard/sweetnix_rosycheeks.lua | 7 +++++++ .../unique/sea0Town01a/PopulaceStandard/ahldskyf.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/angry_river.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/arnegis.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/arthurioux.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/audaine.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/bango_zango.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/bloemerl.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/bmallpa.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/bnhapla.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/bodenolf.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/buburoon.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/carrilaut.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/charlys.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/chaunollet.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/chichiroon.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/clifton.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/colson.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua | 3 +-- .../sea0Town01a/PopulaceStandard/delado_madalado.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/dhemsunn.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/dodoroba.lua | 3 +-- .../PopulaceStandard/drowsy-eyed_adventurer.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/elilwaen.lua | 3 +-- .../sea0Town01a/PopulaceStandard/enraptured_traveler.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/eugennoix.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/fabodji.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/ferdillaix.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/frailoise.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/gautzelin.lua | 3 +-- data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/ginnade.lua | 3 +-- .../sea0Town01a/PopulaceStandard/glowing_goodwife.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/gnanghal.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/gnibnpha.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/haldberk.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/hasthwab.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/hlahono.lua | 3 +-- data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/hobriaut.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/ighii_moui.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/imania.lua | 3 +-- data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/isaudorel.lua | 3 +-- data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/jainelette.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/jghonako.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/joellaut.lua | 7 +++++++ .../unique/sea0Town01a/PopulaceStandard/jojoroon.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/kikichua.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/laniaitte.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/leveridge.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/liautroix.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/lorhzant.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/maetistym.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/mareillie.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/martiallais.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/merlzirn.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/mharelak.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/mimiroon.lua | 3 +-- .../sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/mynadaeg.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/mzimzizi.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/nanapiri.lua | 3 +-- data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/ninianne.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/nnmulika.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua | 3 +-- .../sea0Town01a/PopulaceStandard/overweening_woman.lua | 3 +-- .../PopulaceStandard/pasty-faced_adventurer.lua | 3 +-- .../sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua | 3 +-- .../PopulaceStandard/positively_pungent_pirate.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/prudentia.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/ptahjha.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/raragun.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/rbaharra.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/rerenasu.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/robairlain.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/roosting_crow.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/rsushmo.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/sathzant.lua | 3 +-- .../sea0Town01a/PopulaceStandard/satiated_shopkeep.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/shoshoma.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/skarnwaen.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/skoefmynd.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/slaiboli.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/sundhimal.lua | 3 +-- .../PopulaceStandard/sure-voiced_barracuda_knight.lua | 3 +-- .../PopulaceStandard/suspicious-looking_traveler.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/syngsmyd.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/tatasako.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/thosinbaen.lua | 3 +-- .../sea0Town01a/PopulaceStandard/tittering_traveler.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/totoruto.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/triaine.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua | 3 +-- .../PopulaceStandard/unconscious_adventurer.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/undsatz.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/waekbyrt.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/whahtoa.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/wyrstmann.lua | 3 +-- .../unique/sea0Town01a/PopulaceStandard/xavalien.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua | 3 +-- .../scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua | 3 +-- 155 files changed, 163 insertions(+), 329 deletions(-) delete mode 100644 data/scripts/unique/fst0Town01/PopulaceStandard/serpent_private_hill.lua delete mode 100644 data/scripts/unique/fst0Town01/PopulaceStandard/task_board.lua rename data/scripts/unique/fst0Town01a/{PopulaceStandard => InstanceRaidGuide}/louisoix.lua (79%) rename data/scripts/unique/fst0Town01a/{PopulaceStandard/gagaroon.lua => PopulacePassiveGLPublisher/anaidjaa.lua} (79%) delete mode 100644 data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_carver.lua delete mode 100644 data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_holmes.lua delete mode 100644 data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_kirk.lua delete mode 100644 data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_stone.lua delete mode 100644 data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_white.lua rename data/scripts/unique/{sea0Town01a/PopulaceStandard/rubh_hob.lua => sea0Town01/PopulaceStandard/merewina.lua} (62%) create mode 100644 data/scripts/unique/sea0Town01/PopulaceStandard/sweetnix_rosycheeks.lua create mode 100644 data/scripts/unique/sea0Town01a/PopulaceStandard/joellaut.lua diff --git a/data/scripts/unique/fst0Town01/PopulaceStandard/l'tandhaa.lua b/data/scripts/unique/fst0Town01/PopulaceStandard/l'tandhaa.lua index 37731274..d74d7a84 100644 --- a/data/scripts/unique/fst0Town01/PopulaceStandard/l'tandhaa.lua +++ b/data/scripts/unique/fst0Town01/PopulaceStandard/l'tandhaa.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithL'tandhaa_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLtandhaa_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01/PopulaceStandard/nonco_menanco.lua b/data/scripts/unique/fst0Town01/PopulaceStandard/nonco_menanco.lua index 36c701a3..fddd2363 100644 --- a/data/scripts/unique/fst0Town01/PopulaceStandard/nonco_menanco.lua +++ b/data/scripts/unique/fst0Town01/PopulaceStandard/nonco_menanco.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithNonco_menanco_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithNoncomananco_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01/PopulaceStandard/serpent_private_hill.lua b/data/scripts/unique/fst0Town01/PopulaceStandard/serpent_private_hill.lua deleted file mode 100644 index 02e67d32..00000000 --- a/data/scripts/unique/fst0Town01/PopulaceStandard/serpent_private_hill.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_hill_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01/PopulaceStandard/task_board.lua b/data/scripts/unique/fst0Town01/PopulaceStandard/task_board.lua deleted file mode 100644 index b7448428..00000000 --- a/data/scripts/unique/fst0Town01/PopulaceStandard/task_board.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithTask_board_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/louisoix.lua b/data/scripts/unique/fst0Town01a/InstanceRaidGuide/louisoix.lua similarity index 79% rename from data/scripts/unique/fst0Town01a/PopulaceStandard/louisoix.lua rename to data/scripts/unique/fst0Town01a/InstanceRaidGuide/louisoix.lua index b0b08cd5..7c903a8b 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/louisoix.lua +++ b/data/scripts/unique/fst0Town01a/InstanceRaidGuide/louisoix.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLouisoix_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkLouisoix_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/gagaroon.lua b/data/scripts/unique/fst0Town01a/PopulacePassiveGLPublisher/anaidjaa.lua similarity index 79% rename from data/scripts/unique/fst0Town01a/PopulaceStandard/gagaroon.lua rename to data/scripts/unique/fst0Town01a/PopulacePassiveGLPublisher/anaidjaa.lua index 19143bdf..988ebb7e 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/gagaroon.lua +++ b/data/scripts/unique/fst0Town01a/PopulacePassiveGLPublisher/anaidjaa.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithGagaroon_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithAnaidjaa_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/aubrenard.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/aubrenard.lua index 233f9974..8fcfb4e0 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/aubrenard.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/aubrenard.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithAubrenard (check cnstctr)_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithAUBRENARD_100", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/drystbrod.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/drystbrod.lua index 98d98a5f..1ea2fcd3 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/drystbrod.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/drystbrod.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithDrystbrod_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithDyrstbrod_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/eldid.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/eldid.lua index 189c2435..4ea6d7ee 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/eldid.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/eldid.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithEldid_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "downTownTalk", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/enie.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/enie.lua index d6c55f1d..82de1962 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/enie.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/enie.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithEnie_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkEnie_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/khuma_moshroca.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/khuma_moshroca.lua index 9740c98e..ee4e5bfe 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/khuma_moshroca.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/khuma_moshroca.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhuma_moshroca_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhumamoshroca_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/maisenta.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/maisenta.lua index 52d5b1e6..32477946 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/maisenta.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/maisenta.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMaisenta_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithGuildleveClientG_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/prosperlain.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/prosperlain.lua index 365bf54c..e3be638d 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/prosperlain.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/prosperlain.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithProsperlain_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "tribeTalk", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/pukiki.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/pukiki.lua index 45ccf0ba..eeda46d7 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/pukiki.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/pukiki.lua @@ -2,6 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithPukiki_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithGuildleveClientG_002", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua index 86aeb54e..15668acc 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua @@ -1,7 +1,7 @@ require ("global") function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_lieutenant_marette_001", nil, nil, nil); + defaultFst = GetStaticActor("Spl000"); + callClientFunction(player, "delegateEvent", player, defaultFst, "processEventELNAURE", 1,1,1); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_carver.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_carver.lua deleted file mode 100644 index 0a24f7e7..00000000 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_carver.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_carver_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_holmes.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_holmes.lua deleted file mode 100644 index fc7c975d..00000000 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_holmes.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_holmes_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_kirk.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_kirk.lua deleted file mode 100644 index c7b840aa..00000000 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_kirk.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_kirk_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_stone.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_stone.lua deleted file mode 100644 index d6d2ff82..00000000 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_stone.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_stone_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_tristelle.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_tristelle.lua index 335222d0..6413be1a 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_tristelle.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_tristelle.lua @@ -1,7 +1,7 @@ require ("global") function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_tristelle_001", nil, nil, nil); + defaultFst = GetStaticActor("Spl000"); + callClientFunction(player, "delegateEvent", player, defaultFst, "processEventMERLIE", 1,1,1); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_white.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_white.lua deleted file mode 100644 index d66e5dad..00000000 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_private_white.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("global") - -function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_white_001", nil, nil, nil); - player:endEvent(); -end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_sergeant_frilaix.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_sergeant_frilaix.lua index 274ceccd..60f377c2 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_sergeant_frilaix.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_sergeant_frilaix.lua @@ -1,7 +1,7 @@ require ("global") function onEventStarted(player, npc) - defaultFst = GetStaticActor("DftFst"); - callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_sergeant_frilaix_001", nil, nil, nil); + defaultFst = GetStaticActor("Spl000"); + callClientFunction(player, "delegateEvent", player, defaultFst, "processEventARISMONT", 1, 1, 1); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/merewina.lua similarity index 62% rename from data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua rename to data/scripts/unique/sea0Town01/PopulaceStandard/merewina.lua index 460fa396..5259cbf1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/merewina.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRubh_hob_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "tribeTalk", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/sweetnix_rosycheeks.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/sweetnix_rosycheeks.lua new file mode 100644 index 00000000..e1af982c --- /dev/null +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/sweetnix_rosycheeks.lua @@ -0,0 +1,7 @@ +require ("global") + +function onEventStarted(player, npc) + defaultSea = GetStaticActor("DftSea"); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSweetnix_001", nil, nil, nil); + player:endEvent(); +end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua index d2e17ec3..5caaaad5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAhldskyff_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAhldskyff_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua index 69b5a158..d83bb0a0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAngryriver_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAngryriver_001", nil, nil, nil) player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua index e5906df4..eb0c0095 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAnsgor_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithANSGOR_100", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua index 40e6b664..15ad80e0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithArnegis_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithArnegis_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua index 6b3d6462..5b8574db 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithArthurioux_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithArthurioux_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua index 7309a215..5da8b27c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAstrid_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAstrid_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua index 07a4597c..64cdf7bf 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAudaine_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAudaine_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua index dc5a3f76..4c481b36 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakalan_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithKakalan_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua index ca3a0554..041f9419 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBayard_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBayard_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua index 5e946825..c042fa01 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBloemerl_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBloemerl_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua index 70691b3b..4a7aef0e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBmallpa_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBmallpa_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua index 45736c53..a06e69cc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBnhapla_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBnhapla_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua index 4231c0a3..9dd8bbff 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBodenolf_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBodenolf_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua index a61ef19d..5bf6eb23 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBrictt_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBrictt_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua index be3391d6..302b2d5e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBuburoon_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithBuburoon_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua index ac9254f7..9c331375 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCarrilaut_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithCarrilaut_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua index aef6dbb7..011f51ac 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCeadda_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithCeadda_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua index e9a13896..8f663213 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCharlys_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithCharlys_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua index f38fbdda..73f764d3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChaunollet_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithChaunollet_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua index 29f9b4b3..7768869f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChichiroon_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithChichiroon_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua index 7d333312..0bbd7e94 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithClifton_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithClifton_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua index 343ebe93..4433e694 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithColson_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithColson_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua index 7cfb056e..06e6117b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDacajinjahl_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithDacajinjahl_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua index 4a9c2d51..961f0623 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDeladomadalado_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithDeladomadalado_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua index e90801e4..fdd21596 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDhemsunn_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithDhemsunn_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua index 08a66bbb..d33d1141 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDodoroba_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithDodoroba_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua index b95f5453..884d206c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAdventurer031_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAdventurer031_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua index 70b6aa4b..ceba178a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDympna_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithDympna_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua index af7b59aa..029d4cce 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithElilwaen_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithElilwaen_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua index f3748449..f1554088 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler032_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTraveler032_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua index e2f53ac2..84be774f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEugennoix_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithEugennoix_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua index bfc65fcf..3a4ad7fc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFabodji_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithFabodji_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua index 66d3163d..6915f27f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFerdillaix_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithFerdillaix_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua index 3bddc90e..b44901ae 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithYouty001_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithYouty001_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua index c5215ee6..75f15f9b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrailoise_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithFrailoise_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua index 539bc247..ab47e30e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFufuna_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithFufuna_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua index 46b569f1..563c7231 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFuzakanzak_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithFuzakanzak_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua index bc00c22e..a2e3e561 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGautzelin_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithGautzelin_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua index f71d3620..5df8e0b1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGert_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithGert_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua index 49354275..264ae50f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGerulf_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithGerulf_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua index 884b2424..142987a7 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGinnade_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithGinnade_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua index 01015b0d..5553caa1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLady001_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithLady001_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua index de07be66..3b8437bc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnanghal_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithGnanghal_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua index 2cda4fef..51a9c126 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnibnpha_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithGnibnpha_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua index b0a13f0d..dad2a3e1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHaldberk_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithHaldberk_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua index 10c31736..0c65fd85 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHasthwab_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithHasthwab_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua index d6d4c781..00233eb5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHihine_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithHihine_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua index 64e95af6..3773d694 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithH_lahono_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithH_lahono_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua index 75efe920..2b97c724 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHob_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRubh_hob_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua index fac4443a..1316026f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHobriaut_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithHobriaut_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua index 8bae06f2..4404343d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNnagali_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNnagali_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua index 73a30d91..d57c791f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIghiimoui_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithIghiimoui_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua index 5a4f3221..7b0b9603 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithImania_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithImania_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua index dcf3dc42..e91607c1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIofa_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithIofa_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua index e03273d7..a203e164 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsaudorel_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithIsaudorel_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua index 22099859..e4ee41f4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIvan_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithIvan_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua index a147e696..faeb74b3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJainelette_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithJainelette_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua index 7094ff13..9a888eca 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJghonako_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithJghonako_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/joellaut.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/joellaut.lua new file mode 100644 index 00000000..e3dac822 --- /dev/null +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/joellaut.lua @@ -0,0 +1,7 @@ +require ("global") + +function onEventStarted(player, npc) + defaultSea = GetStaticActor("DftSea"); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithJoellaut_001", nil, nil, nil); + player:endEvent(); +end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua index 6ab90848..ac4dea12 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJojoroon_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithJojoroon_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua index d72c3841..5cfc63c7 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKehdamujuuk_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithKehdamujuuk_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua index 4cb67f31..a1d4a2d8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKikichua_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithKikichua_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua index 9a5c18e4..2bc7af95 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLaniaitte_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithLaniaitte_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua index 3cc35cee..6223d68b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDavyd_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithDavyd_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua index d7fa2e1b..d95ccb93 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLiautroix_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithLiautroix_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua index d8775f58..48a7c958 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLilina_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithLilina_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua index 5864dd00..55094a0b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLorhzant_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithLorhzant_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua index 28fa6f03..5f8dcb44 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaetistym_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMaetistym_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua index 1d8213bc..bce4e8c3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaisie_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMaisie_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua index 5208a80f..ea790f88 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMareillie_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMareillie_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua index 2efb8eb7..4c16d72b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMartiallais_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMartiallais_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua index 705af553..5bdff937 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMerlzirn_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMerlzirn_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua index 5a0ab58a..b85c39a1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMharelak_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMharelak_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua index c814e0ec..092e93a0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMimiroon_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMimiroon_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua index 5031e26f..b20100b1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMuscle-bounddeckhand_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSailor031_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua index 31e65e0b..bba278f3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMynadaeg_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMynadaeg_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua index 94a259cb..e4ac3231 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMzimzizi_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMzimzizi_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua index 6cc4c1b4..096b4316 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanapiri_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNanapiri_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua index bde853d2..539e951b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNeale_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNeale_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua index cc439fdd..e10f21e2 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNheujawantal_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNheujawantal_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua index bac8a42c..33cd4146 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNinianne_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNinianne_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua index d8d1e6ce..ea9df741 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNnmulika_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNnmulika_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua index 06f2cc01..151db8ce 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNunuba_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithNunuba_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua index bbf4c7fb..cac534ef 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithOrtolf_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithOrtolf_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua index 99c86e4a..5d4e0285 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithOsitha_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithOsitha_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua index f76e9e5d..126afa33 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLady002_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithLady002_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua index 5efac428..81e126b6 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPasty-facedadventurer_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAdventurer030_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua index 4c2bfbe3..b0c34235 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPearly-toothedporter_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithPorter001_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua index 7c7c65f9..6bd3107e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua @@ -2,8 +2,7 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPfynhaemr_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithPfynhaemr_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua index 2c279dc7..8dc396a2 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPirate030_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithPirate030_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua index aa35333b..dd944c18 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPirate031_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithPirate031_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua index 34020aed..11f7ad48 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPrudentia_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithPrudentia_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua index 2026691a..1cc825fc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithP_tahjha_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua index 86aaef4a..94ad44fc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPulmia_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithPulmia_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua index 1f0259bd..bc77c7b7 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRaragun_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRaragun_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua index 9f96e3de..ce69b8f9 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRbaharra_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRbaharra_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua index eac7d22e..472abefd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRerenasu_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRerenasu_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua index 99b8a839..7d8d05b8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRobairlain_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRobairlain_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua index 4bdded1e..0cb6bf06 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRoostingcrow_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRoostingcrow_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua index 75df54a3..661ff4d5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRsushmo_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRsushmo_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua index db574fc7..d5925ab0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRubh_epocan_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRubh_epocan_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua index aa69be3a..5eeeda62 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSathzant_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSathzant_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua index 4fdf7156..4e6ade94 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMerchant002_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMerchant002_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua index 37e46072..f602939c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithShoshoma_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithShoshoma_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua index 2026691a..d1b19d1d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua index a00679ea..f0f28acd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkoefmynd_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSkoefmynd_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua index 0529e96d..f73c2d21 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSlaiboli_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSlaiboli_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua index fa2f69f3..453fabc9 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSosoze_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSosoze_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua index d004d786..5f236b2f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSundhimal_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSundhimal_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua index 1fb3bb81..a24d5e0f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKob031_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithKob031_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua index c5094881..78533413 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler031_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTraveler031_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua index b262bbfa..320484f0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSyhrdaeg_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSyhrdaeg_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua index 2ac6e3df..d8d9bc4d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSyngsmyd_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithSyngsmyd_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua index fd966784..e2a342dc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTatasako_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTatasako_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua index eea8fd66..77ff4093 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua @@ -2,8 +2,7 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTefhmoshroca_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTefhmoshroca_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua index 98cdb515..95f39a92 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithThatakhamazom_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithThatakhamazom_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua index 2026691a..6b0116c8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithThosinbaen_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua index 3f7d57c6..47004da1 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler030_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTraveler030_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua index 33c4f3b7..61c522a4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTotoruto_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTotoruto_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua index a297f16e..7e133e92 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTriaine_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTriaine_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua index 2ef918cd..00da090b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTrinne_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithTrinne_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua index 99ccd1b0..417626cf 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAdventurer032_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithAdventurer032_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua index 8b426ea3..56a2e526 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithUndsatz_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithUndsatz_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua index 12c378cd..bba3d48d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithVhynho_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithVhynho_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua index 77400002..305fe7a5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWaekbyrt_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithWaekbyrt_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua index 2f61be72..29b9cef0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWhahtoa_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithWhahtoa_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua index b63b6fbc..5591a891 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWyrakhamazom_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithWyrakhamazom_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua index 56523476..dfb16371 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua @@ -2,8 +2,7 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWyrstmann_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithWyrstmann_001", nil, nil, nil); player:endEvent(); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua index 794738a5..471b264f 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithXavalien_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithXavalien_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua index 684dc73b..1dd681f9 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZonggo_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithZonggo_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua index dc9a39ad..509b5e52 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua @@ -2,7 +2,6 @@ require ("global") function onEventStarted(player, npc) defaultSea = GetStaticActor("DftSea"); - callClientFunction(player, "delegateEvent", player, defaultSea, " - player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZuzule_001", nil, nil, nil); + callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithZuzule_001", nil, nil, nil); player:endEvent(); end \ No newline at end of file From d7166cadc00581fd91f71bdf4813d3a9ab998b71 Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Thu, 18 Aug 2016 22:58:09 -0500 Subject: [PATCH 03/19] Added GM Ticket support on the DB --- FFXIVClassic Map Server/Database.cs | 161 ++++++++++++++++++ .../FFXIVClassic Map Server.csproj | 1 + FFXIVClassic Map Server/PacketProcessor.cs | 17 +- 3 files changed, 171 insertions(+), 8 deletions(-) diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 823e8b13..49fc2082 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -10,6 +10,7 @@ using FFXIVClassic_Map_Server.packets.send.player; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.actors.chara.player; +using FFXIVClassic_Map_Server.packets.receive.supportdesk; namespace FFXIVClassic_Map_Server { @@ -1246,6 +1247,166 @@ namespace FFXIVClassic_Map_Server return cheevosPacket.BuildPacket(player.actorId); } + public static void SaveSupportTicket(GMSupportTicketPacket gmTicket) + { + string query; + MySqlCommand cmd; + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + query = @" + INSERT INTO supportdesk_tickets + (id, title, body, langCode) + VALUES + (@id, @title, @body, @langCode) + ON DUPLICATE KEY UPDATE + questData = @questData, questFlags = @questFlags + "; + + cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@id", gmTicket.ticketIssueIndex); + cmd.Parameters.AddWithValue("@title", gmTicket.ticketTitle); + cmd.Parameters.AddWithValue("@body", gmTicket.ticketBody); + cmd.Parameters.AddWithValue("@langCode", gmTicket.langCode); + + cmd.ExecuteNonQuery(); + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + } + } + } + + public static string[] getFAQNames(uint lanCode=1) + { + string[] faqs = null; + List raw = new List(); + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + string query = @" + SELECT + id, + label, + sort, + FROM supportdesk_faqs + ORDER BY sort"; + + MySqlCommand cmd = new MySqlCommand(query, conn); + + using (MySqlDataReader reader = cmd.ExecuteReader()) + { + while (reader.Read()) + { + uint id = reader.GetUInt32(0); + string label = reader.GetString(1); + raw.Add(label); + } + } + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + faqs = raw.ToArray(); + } + } + return faqs; + } + + public static string getFAQBody(uint id, uint lanCode=1) + { + string body = string.Empty; + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + string query = @" + SELECT + body + FROM supportdesk_faqs + WHERE id=" + id; + + MySqlCommand cmd = new MySqlCommand(query, conn); + + using (MySqlDataReader reader = cmd.ExecuteReader()) + { + while (reader.Read()) + { + body = reader.GetString(2); + } + } + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + } + } + return body; + } + + public static string[] getIssues(uint lanCode = 1) + { + string[] issues = null; + List raw = new List(); + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + string query = @" + SELECT + id, + title, + sort, + FROM supportdesk_issues + ORDER BY sort"; + + MySqlCommand cmd = new MySqlCommand(query, conn); + + using (MySqlDataReader reader = cmd.ExecuteReader()) + { + while (reader.Read()) + { + uint id = reader.GetUInt32(0); + string label = reader.GetString(1); + raw.Add(label); + } + } + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + issues = raw.ToArray(); + } + } + return issues; + } } } diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 2bd335eb..740eefb9 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -123,6 +123,7 @@ + diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index 590315c8..b999b639 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -17,8 +17,8 @@ using FFXIVClassic_Map_Server.packets.receive.recruitment; using FFXIVClassic_Map_Server.packets.send.recruitment; using FFXIVClassic_Map_Server.packets.receive.events; using FFXIVClassic_Map_Server.lua; -using FFXIVClassic_Map_Server.Actors; - +using FFXIVClassic_Map_Server.Actors; + namespace FFXIVClassic_Map_Server { class PacketProcessor @@ -374,17 +374,17 @@ namespace FFXIVClassic_Map_Server //Request for FAQ/Info List case 0x01D0: FaqListRequestPacket faqRequest = new FaqListRequestPacket(subpacket.data); - client.QueuePacket(BasePacket.CreatePacket(FaqListResponsePacket.BuildPacket(player.actorID, new string[] { "Testing FAQ1", "Coded style!" }), true, false)); + client.QueuePacket(BasePacket.CreatePacket(FaqListResponsePacket.BuildPacket(player.actorID, Database.getFAQNames(faqRequest.langCode)), true, false)); break; //Request for body of a faq/info selection case 0x01D1: FaqBodyRequestPacket faqBodyRequest = new FaqBodyRequestPacket(subpacket.data); - client.QueuePacket(BasePacket.CreatePacket(FaqBodyResponsePacket.BuildPacket(player.actorID, "HERE IS A GIANT BODY. Nothing else to say!"), true, false)); + client.QueuePacket(BasePacket.CreatePacket(FaqBodyResponsePacket.BuildPacket(player.actorID, Database.getFAQBody(faqBodyRequest.faqIndex, faqBodyRequest.langCode)), true, false)); break; //Request issue list case 0x01D2: GMTicketIssuesRequestPacket issuesRequest = new GMTicketIssuesRequestPacket(subpacket.data); - client.QueuePacket(BasePacket.CreatePacket(IssueListResponsePacket.BuildPacket(player.actorID, new string[] { "Test1", "Test2", "Test3", "Test4", "Test5" }), true, false)); + client.QueuePacket(BasePacket.CreatePacket(IssueListResponsePacket.BuildPacket(player.actorID, Database.getIssues(issuesRequest.langCode)), true, false)); break; //Request if GM ticket exists case 0x01D3: @@ -392,12 +392,13 @@ namespace FFXIVClassic_Map_Server break; //Request for GM response message case 0x01D4: - client.QueuePacket(BasePacket.CreatePacket(GMTicketPacket.BuildPacket(player.actorID, "This is a GM Ticket Title", "This is a GM Ticket Body."), true, false)); + client.QueuePacket(BasePacket.CreatePacket(GMTicketPacket.BuildPacket(player.actorID, "Ticket Title", "Enter your Help request here."), true, false)); break; //GM Ticket Sent case 0x01D5: - GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data); - Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); + GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data); + Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); + Database.SaveSupportTicket(gmTicket); client.QueuePacket(BasePacket.CreatePacket(GMTicketSentResponsePacket.BuildPacket(player.actorID, true), true, false)); break; //Request to end ticket From 7c9077beec9dc206afda0c7dc8d148d5d57ec7ac Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Thu, 18 Aug 2016 22:59:23 -0500 Subject: [PATCH 04/19] Added support for Linux/OSX Paths --- FFXIVClassic Map Server/actors/chara/npc/Npc.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs index e711dbd0..e869b067 100644 --- a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs +++ b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs @@ -48,8 +48,8 @@ namespace FFXIVClassic_Map_Server.Actors LoadNpcAppearance(actorClass.actorClassId); - this.classPath = actorClass.classPath; - className = classPath.Substring(classPath.LastIndexOf("/")+1); + className = actorClass.classPath.Substring(actorClass.classPath.LastIndexOf("/") + 1); + this.classPath = String.Format("{0}/{1}", actorClass.classPath.Substring(0, actorClass.classPath.LastIndexOf('/')).ToLower(), className); charaWork.battleSave.potencial = 1.0f; From 270d4ce43670742d442462118e11f1880fe49aeb Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Thu, 18 Aug 2016 23:36:04 -0500 Subject: [PATCH 05/19] Fixed MySQL Syntax issues --- FFXIVClassic Map Server/Database.cs | 86 ++++++++++++++--------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 49fc2082..6c210395 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -30,10 +30,10 @@ namespace FFXIVClassic_Map_Server cmd.Parameters.AddWithValue("@sessionId", sessionId); using (MySqlDataReader Reader = cmd.ExecuteReader()) { - while (Reader.Read()) - { - id = Reader.GetUInt32("userId"); - } + while (Reader.Read()) + { + id = Reader.GetUInt32("userId"); + } } } catch (MySqlException e) @@ -43,11 +43,11 @@ namespace FFXIVClassic_Map_Server finally { conn.Dispose(); - } + } } return id; } - + public static DBWorld GetServer(uint serverId) { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -56,7 +56,7 @@ namespace FFXIVClassic_Map_Server try { conn.Open(); - world = conn.Query("SELECT * FROM servers WHERE id=@ServerId", new {ServerId = serverId}).SingleOrDefault(); + world = conn.Query("SELECT * FROM servers WHERE id=@ServerId", new { ServerId = serverId }).SingleOrDefault(); } catch (MySqlException e) { @@ -69,7 +69,7 @@ namespace FFXIVClassic_Map_Server return world; } - } + } public static List GetNpcList() { @@ -99,7 +99,7 @@ namespace FFXIVClassic_Map_Server using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { Dictionary gamedataItems = new Dictionary(); - + try { conn.Open(); @@ -145,7 +145,7 @@ namespace FFXIVClassic_Map_Server { conn.Dispose(); } - + return gamedataItems; } } @@ -244,7 +244,7 @@ namespace FFXIVClassic_Map_Server public static void SavePlayerPosition(Player player) { - string query; + string query; MySqlCommand cmd; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -262,7 +262,7 @@ namespace FFXIVClassic_Map_Server currentZoneId = @zoneId WHERE id = @charaId "; - + cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@charaId", player.actorId); cmd.Parameters.AddWithValue("@x", player.positionX); @@ -371,9 +371,9 @@ namespace FFXIVClassic_Map_Server } public static void LoadPlayerCharacter(Player player) - { + { string query; - MySqlCommand cmd; + MySqlCommand cmd; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -404,7 +404,7 @@ namespace FFXIVClassic_Map_Server restBonus, achievementPoints, playTime - FROM characters WHERE id = @charId"; + FROM characters WHERE id = @charId"; cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@charId", player.actorId); @@ -437,7 +437,7 @@ namespace FFXIVClassic_Map_Server player.playTime = reader.GetUInt32(19); } } - + //Get class levels query = @" SELECT @@ -470,7 +470,7 @@ namespace FFXIVClassic_Map_Server { if (reader.Read()) { - player.charaWork.battleSave.skillLevel[Player.CLASSID_PUG-1] = reader.GetInt16("pug"); + player.charaWork.battleSave.skillLevel[Player.CLASSID_PUG - 1] = reader.GetInt16("pug"); player.charaWork.battleSave.skillLevel[Player.CLASSID_GLA - 1] = reader.GetInt16("gla"); player.charaWork.battleSave.skillLevel[Player.CLASSID_MRD - 1] = reader.GetInt16("mrd"); player.charaWork.battleSave.skillLevel[Player.CLASSID_ARC - 1] = reader.GetInt16("arc"); @@ -519,7 +519,7 @@ namespace FFXIVClassic_Map_Server player.charaWork.parameterSave.state_mainSkillLevel = player.charaWork.battleSave.skillLevel[reader.GetByte(4) - 1]; } } - + //Load appearance query = @" SELECT @@ -662,7 +662,7 @@ namespace FFXIVClassic_Map_Server player.timers[i] = reader.GetUInt32(i); } } - + //Load Hotbar query = @" SELECT @@ -675,11 +675,11 @@ namespace FFXIVClassic_Map_Server cmd.Parameters.AddWithValue("@charId", player.actorId); cmd.Parameters.AddWithValue("@classId", player.charaWork.parameterSave.state_mainSkill[0]); using (MySqlDataReader reader = cmd.ExecuteReader()) - { + { while (reader.Read()) { int index = reader.GetUInt16(0); - player.charaWork.command[index+32] = reader.GetUInt32(1); + player.charaWork.command[index + 32] = reader.GetUInt32(1); player.charaWork.parameterSave.commandSlot_recastTime[index] = reader.GetUInt32(2); } } @@ -692,7 +692,7 @@ namespace FFXIVClassic_Map_Server questData, questFlags FROM characters_quest_scenario WHERE characterId = @charId"; - + cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@charId", player.actorId); using (MySqlDataReader reader = cmd.ExecuteReader()) @@ -777,7 +777,7 @@ namespace FFXIVClassic_Map_Server { int npcLSId = reader.GetUInt16(0); player.playerWork.npcLinkshellChatCalling[npcLSId] = reader.GetBoolean(1); - player.playerWork.npcLinkshellChatExtra[npcLSId] = reader.GetBoolean(2); + player.playerWork.npcLinkshellChatExtra[npcLSId] = reader.GetBoolean(2); } } @@ -952,7 +952,7 @@ namespace FFXIVClassic_Map_Server cmd.Parameters.AddWithValue("@type", type); using (MySqlDataReader reader = cmd.ExecuteReader()) - { + { while (reader.Read()) { uint uniqueId = reader.GetUInt32(0); @@ -999,7 +999,7 @@ namespace FFXIVClassic_Map_Server { conn.Open(); - + string query = @" INSERT INTO server_items @@ -1017,7 +1017,7 @@ namespace FFXIVClassic_Map_Server "; MySqlCommand cmd2 = new MySqlCommand(query2, conn); - + cmd.Parameters.AddWithValue("@itemId", itemId); cmd.Parameters.AddWithValue("@quality", quality); cmd.Parameters.AddWithValue("@itemType", itemType); @@ -1053,12 +1053,12 @@ namespace FFXIVClassic_Map_Server { conn.Open(); - string query = @" + string query = @" UPDATE characters_inventory SET quantity = @quantity WHERE characterId = @charId AND slot = @slot AND inventoryType = @type; "; - + MySqlCommand cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@charId", player.actorId); cmd.Parameters.AddWithValue("@quantity", quantity); @@ -1098,7 +1098,7 @@ namespace FFXIVClassic_Map_Server DELETE FROM server_items WHERE id = @serverItemId; - "; + "; MySqlCommand cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@charId", player.actorId); @@ -1168,7 +1168,7 @@ namespace FFXIVClassic_Map_Server try { conn.Open(); - + //Load Last 5 Completed string query = @" SELECT @@ -1183,7 +1183,7 @@ namespace FFXIVClassic_Map_Server int count = 0; while (reader.Read()) { - uint id = reader.GetUInt32(0); + uint id = reader.GetUInt32(0); latestAchievements[count++] = id; } } @@ -1210,7 +1210,7 @@ namespace FFXIVClassic_Map_Server try { conn.Open(); - + string query = @" SELECT packetOffsetId FROM characters_achievements @@ -1222,7 +1222,7 @@ namespace FFXIVClassic_Map_Server using (MySqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) - { + { uint offset = reader.GetUInt32(0); if (offset < 0 || offset >= cheevosPacket.achievementFlags.Length) @@ -1230,7 +1230,7 @@ namespace FFXIVClassic_Map_Server Program.Log.Error("SQL Error; achievement flag offset id out of range: " + offset); continue; } - cheevosPacket.achievementFlags[offset] = true; + cheevosPacket.achievementFlags[offset] = true; } } } @@ -1262,10 +1262,7 @@ namespace FFXIVClassic_Map_Server INSERT INTO supportdesk_tickets (id, title, body, langCode) VALUES - (@id, @title, @body, @langCode) - ON DUPLICATE KEY UPDATE - questData = @questData, questFlags = @questFlags - "; + (@id, @title, @body, @langCode)"; cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@id", gmTicket.ticketIssueIndex); @@ -1286,7 +1283,7 @@ namespace FFXIVClassic_Map_Server } } - public static string[] getFAQNames(uint lanCode=1) + public static string[] getFAQNames(uint lanCode = 1) { string[] faqs = null; List raw = new List(); @@ -1300,7 +1297,7 @@ namespace FFXIVClassic_Map_Server SELECT id, label, - sort, + sort FROM supportdesk_faqs ORDER BY sort"; @@ -1329,7 +1326,7 @@ namespace FFXIVClassic_Map_Server return faqs; } - public static string getFAQBody(uint id, uint lanCode=1) + public static string getFAQBody(uint id, uint lanCode = 1) { string body = string.Empty; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -1342,15 +1339,16 @@ namespace FFXIVClassic_Map_Server SELECT body FROM supportdesk_faqs - WHERE id=" + id; + WHERE id=@id"; MySqlCommand cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@id", id); using (MySqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { - body = reader.GetString(2); + body = reader.GetString(0); } } } @@ -1380,7 +1378,7 @@ namespace FFXIVClassic_Map_Server SELECT id, title, - sort, + sort FROM supportdesk_issues ORDER BY sort"; From 4f3828e5942413bd526c5ace836c1ec3d0fe5da0 Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Fri, 19 Aug 2016 00:10:07 -0500 Subject: [PATCH 06/19] Added MySQL tables for Support Desk --- sql/supportdesk_faqs.sql | 53 ++++++++++++++++++++++++++++++++++++ sql/supportdesk_issues.sql | 54 +++++++++++++++++++++++++++++++++++++ sql/supportdesk_tickets.sql | 52 +++++++++++++++++++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 sql/supportdesk_faqs.sql create mode 100644 sql/supportdesk_issues.sql create mode 100644 sql/supportdesk_tickets.sql diff --git a/sql/supportdesk_faqs.sql b/sql/supportdesk_faqs.sql new file mode 100644 index 00000000..e623ea27 --- /dev/null +++ b/sql/supportdesk_faqs.sql @@ -0,0 +1,53 @@ +-- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) +-- +-- Host: localhost Database: ffxiv +-- ------------------------------------------------------ +-- Server version 5.7.13-0ubuntu0.16.04.2 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `supportdesk_faqs` +-- + +DROP TABLE IF EXISTS `supportdesk_faqs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `supportdesk_faqs` ( + `id` int(10) NOT NULL, + `label` varchar(50) NOT NULL, + `body` varchar(50) NOT NULL, + `sort` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `supportdesk_faqs` +-- + +LOCK TABLES `supportdesk_faqs` WRITE; +/*!40000 ALTER TABLE `supportdesk_faqs` DISABLE KEYS */; +INSERT INTO `supportdesk_faqs` VALUES (1,'Testing','Testy Test FAQ!',1); +/*!40000 ALTER TABLE `supportdesk_faqs` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2016-08-19 5:05:33 diff --git a/sql/supportdesk_issues.sql b/sql/supportdesk_issues.sql new file mode 100644 index 00000000..09acaba5 --- /dev/null +++ b/sql/supportdesk_issues.sql @@ -0,0 +1,54 @@ +-- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) +-- +-- Host: localhost Database: ffxiv +-- ------------------------------------------------------ +-- Server version 5.7.13-0ubuntu0.16.04.2 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `supportdesk_issues` +-- + +DROP TABLE IF EXISTS `supportdesk_issues`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `supportdesk_issues` ( + `id` int(11) NOT NULL, + `title` varchar(50) NOT NULL, + `sort` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `supportdesk_issues` +-- + +LOCK TABLES `supportdesk_issues` WRITE; +/*!40000 ALTER TABLE `supportdesk_issues` DISABLE KEYS */; +INSERT INTO `supportdesk_issues` VALUES (1,'Report Harassment',1); +INSERT INTO `supportdesk_issues` VALUES (2,'Report Cheating',2); +INSERT INTO `supportdesk_issues` VALUES (3,'Leave Suggestion',3); +/*!40000 ALTER TABLE `supportdesk_issues` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2016-08-19 5:05:51 diff --git a/sql/supportdesk_tickets.sql b/sql/supportdesk_tickets.sql new file mode 100644 index 00000000..3f3d9c9e --- /dev/null +++ b/sql/supportdesk_tickets.sql @@ -0,0 +1,52 @@ +-- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) +-- +-- Host: localhost Database: ffxiv +-- ------------------------------------------------------ +-- Server version 5.7.13-0ubuntu0.16.04.2 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `supportdesk_tickets` +-- + +DROP TABLE IF EXISTS `supportdesk_tickets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `supportdesk_tickets` ( + `id` int(20) NOT NULL, + `title` varchar(100) NOT NULL, + `body` varchar(100) NOT NULL, + `langCode` varchar(10) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `supportdesk_tickets` +-- + +LOCK TABLES `supportdesk_tickets` WRITE; +/*!40000 ALTER TABLE `supportdesk_tickets` DISABLE KEYS */; +/*!40000 ALTER TABLE `supportdesk_tickets` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2016-08-19 5:06:23 From fb18c1fbe47a7d05063dbb3d64f4872361da9d89 Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Fri, 19 Aug 2016 14:40:43 -0500 Subject: [PATCH 07/19] Added DB Support for Chocobo Lenders --- FFXIVClassic Map Server/Database.cs | 38 ++++++++++++++ .../actors/chara/player/Player.cs | 17 +++++++ .../npc/populace/PopulaceChocoboLender.lua | 51 ++++++++++++++++--- 3 files changed, 100 insertions(+), 6 deletions(-) diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 6c210395..1860ba61 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -1406,5 +1406,43 @@ namespace FFXIVClassic_Map_Server } return issues; } + + public static void IssuePlayerChocobo(Player player, byte appearanceId, string name) + { + string query; + MySqlCommand cmd; + + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + query = @" + INSERT INTO characters_chocobo + (characterId, hasChocobo, chocoboAppearance, chocoboName) + VALUES + (@characterId, @hasChocobo, @chocoboAppearance, @chocoboName) + ON DUPLICATE KEY UPDATE + hasChocobo=@hasChocobo, chocoboAppearance=@chocoboAppearance, chocoboName=@chocoboName"; + + cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@characterId", player.actorId); + cmd.Parameters.AddWithValue("@hasChocobo", 1); + cmd.Parameters.AddWithValue("@chocoboAppearance", appearanceId); + cmd.Parameters.AddWithValue("@chocoboName", name); + + cmd.ExecuteNonQuery(); + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + } + } + } } } diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 6a0f5a22..98cc0cc0 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -704,6 +704,11 @@ namespace FFXIVClassic_Map_Server.Actors QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1)); } + public void ChangeMusicWithEffect(ushort musicId, ushort effect) + { + QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, effect)); + } + public void SendChocoboAppearance() { BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance), true); @@ -1263,5 +1268,17 @@ namespace FFXIVClassic_Map_Server.Actors } + public void issueChocobo(byte appearanceId, string name) + { + Database.IssuePlayerChocobo(this, appearanceId, name); + hasChocobo = true; + chocoboAppearance = appearanceId; + chocoboName = name; + } + + public void changeChocoboAppearance(int appearanceId) + { + + } } } diff --git a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 0440d6da..62ba4f81 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -21,11 +21,50 @@ 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); - + local curLevel = 20; + local hasIssuance = true; + local hasChocobo = player.hasChocobo; + + if (player.isGM and hasChocobo == false) then + hasIssuance = true; + end + + local rentPrice = 800; + local playerFunds = 0; --TODO: pull character's money + local hasFunds = (playerFunds >= rentPrice); + + callClientFunction(player, "eventTalkWelcome", player); + menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, hasChocobo, hasChocobo, 4); + + if (menuChoice == 1) then -- Issuance option + callClientFunction(player, "eventTalkMyChocobo", player); + nameResponse = callClientFunction(player, "eventSetChocoboName", false); + + if (nameResponse == "") then -- Cancel Chocobo naming + callClientFunction(player, "eventCancelChocoboName", player); + end + + appearance = 1; -- TODO: pull correct appearance based on GC + --player:issueChocobo(appearance, nameResponse); + if (nameResponse ~= "") then -- Successfully named Chocobo + callClientFunction(player, "eventAfterChocoboName", player); + end + elseif(menuChoice == 2 and hasChocobo) then -- Summon Bird + player:ChangeMusic(83); + player:SendChocoboAppearance(); + player:SendGameMessage(player, worldMaster, 26001, 0x20); + player:SetMountState(1); + elseif(menuChoice == 3) then -- Change Barding + callClientFunction(player, "eventTalkStepBreak", player); + elseif(menuChoice == 5) then -- Rent Bird + if (hasFunds == false) then -- Not enough money + -- Do not enough money action?? + else + --Issue rental chocobo + end + else + callClientFunction(player, "eventTalkStepBreak", player); + end + player:EndEvent(); end \ No newline at end of file From 46350a0724f216f2a44a151aa6cc6ce88071a4c7 Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Fri, 19 Aug 2016 16:32:14 -0500 Subject: [PATCH 08/19] Fixed Bugs --- FFXIVClassic Map Server/actors/area/Area.cs | 708 ++--- .../actors/chara/player/Player.cs | 2500 ++++++++--------- FFXIVClassic Map Server/lua/LuaPlayer.cs | 5 + 3 files changed, 1604 insertions(+), 1609 deletions(-) diff --git a/FFXIVClassic Map Server/actors/area/Area.cs b/FFXIVClassic Map Server/actors/area/Area.cs index f82ff5a2..04e6be4f 100644 --- a/FFXIVClassic Map Server/actors/area/Area.cs +++ b/FFXIVClassic Map Server/actors/area/Area.cs @@ -1,358 +1,358 @@ -using FFXIVClassic_Map_Server; -using FFXIVClassic.Common; -using FFXIVClassic_Map_Server.packets; -using FFXIVClassic_Map_Server.actors.area; -using FFXIVClassic_Map_Server.actors.chara.npc; -using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Map_Server.dataobjects.chara; -using FFXIVClassic_Map_Server.lua; -using FFXIVClassic_Map_Server.packets.send.actor; -using MoonSharp.Interpreter; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using FFXIVClassic_Map_Server; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; +using FFXIVClassic_Map_Server.actors.area; +using FFXIVClassic_Map_Server.actors.chara.npc; +using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects.chara; +using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.packets.send.actor; +using MoonSharp.Interpreter; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; using FFXIVClassic_Map_Server.packets.send; -namespace FFXIVClassic_Map_Server.Actors -{ - class Area : Actor - { - public string zoneName; - public ushort regionId; - public bool isIsolated, canStealth, isInn, canRideChocobo, isInstanceRaid; - public ushort weatherNormal, weatherCommon, weatherRare; - public ushort bgmDay, bgmNight, bgmBattle; - - protected string classPath; - - public int boundingGridSize = 50; - public int minX = -1000, minY = -1000, maxX = 1000, maxY = 1000; - protected int numXBlocks, numYBlocks; - protected int halfWidth, halfHeight; - - protected List mSpawnLocations = new List(); - protected Dictionary mActorList = new Dictionary(); - protected List[,] mActorBlock; - - LuaScript areaScript; - - public Area(uint id, string zoneName, ushort regionId, string className, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid) - : base(id) - { - - this.zoneName = zoneName; - this.regionId = regionId; - this.canStealth = canStealth; - this.isIsolated = isIsolated; - this.isInn = isInn; - this.canRideChocobo = canRideChocobo; - this.isInstanceRaid = isInstanceRaid; - - this.bgmDay = bgmDay; - this.bgmNight = bgmNight; - this.bgmBattle = bgmBattle; - - this.displayNameId = 0; - this.customDisplayName = "_areaMaster"; - this.actorName = String.Format("_areaMaster@{0:X5}",id<<8); - - this.className = className; - - numXBlocks = (maxX - minX) / boundingGridSize; - numYBlocks = (maxY - minY) / boundingGridSize; - mActorBlock = new List[numXBlocks, numYBlocks]; - halfWidth = numXBlocks / 2; - halfHeight = numYBlocks / 2; - - for (int y = 0; y < numYBlocks; y++) - { - for (int x = 0; x < numXBlocks; x++ ) - { - mActorBlock[x, y] = new List(); - } - } - - } - - public override SubPacket CreateScriptBindPacket(uint playerActorId) - { - List lParams; - lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, "/Area/Zone/ZoneDefault", -1, (byte)1, true, false, false, false, false, false, false, false); - return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, "ZoneDefault", lParams); - } - - public override BasePacket GetSpawnPackets(uint playerActorId) - { - List subpackets = new List(); - subpackets.Add(CreateAddActorPacket(playerActorId, 0)); - subpackets.Add(CreateSpeedPacket(playerActorId)); - subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x1)); - subpackets.Add(CreateNamePacket(playerActorId)); - subpackets.Add(CreateStatePacket(playerActorId)); - subpackets.Add(CreateIsZoneingPacket(playerActorId)); - subpackets.Add(CreateScriptBindPacket(playerActorId)); - return BasePacket.CreatePacket(subpackets, true, false); - } - - #region Actor Management - - public void AddActorToZone(Actor actor) - { - if (!mActorList.ContainsKey(actor.actorId)) - mActorList.Add(actor.actorId, actor); - - int gridX = (int)actor.positionX / boundingGridSize; - int gridY = (int)actor.positionZ / boundingGridSize; - - gridX += halfWidth; - gridY += halfHeight; - - //Boundries - if (gridX < 0) - gridX = 0; - if (gridX >= numXBlocks) - gridX = numXBlocks - 1; - if (gridY < 0) - gridY = 0; - if (gridY >= numYBlocks) - gridY = numYBlocks - 1; - - lock (mActorBlock) - mActorBlock[gridX, gridY].Add(actor); - } - - public void RemoveActorFromZone(Actor actor) - { - mActorList.Remove(actor.actorId); - - int gridX = (int)actor.positionX / boundingGridSize; - int gridY = (int)actor.positionZ / boundingGridSize; - - gridX += halfWidth; - gridY += halfHeight; - - //Boundries - if (gridX < 0) - gridX = 0; - if (gridX >= numXBlocks) - gridX = numXBlocks - 1; - if (gridY < 0) - gridY = 0; - if (gridY >= numYBlocks) - gridY = numYBlocks - 1; - - lock (mActorBlock) - mActorBlock[gridX, gridY].Remove(actor); - } - - public void UpdateActorPosition(Actor actor) - { - int gridX = (int)actor.positionX / boundingGridSize; - int gridY = (int)actor.positionZ / boundingGridSize; - - gridX += halfWidth; - gridY += halfHeight; - - //Boundries - if (gridX < 0) - gridX = 0; - if (gridX >= numXBlocks) - gridX = numXBlocks - 1; - if (gridY < 0) - gridY = 0; - if (gridY >= numYBlocks) - gridY = numYBlocks - 1; - - int gridOldX = (int)actor.oldPositionX / boundingGridSize; - int gridOldY = (int)actor.oldPositionZ / boundingGridSize; - - gridOldX += halfWidth; - gridOldY += halfHeight; - - //Boundries - if (gridOldX < 0) - gridOldX = 0; - if (gridOldX >= numXBlocks) - gridOldX = numXBlocks - 1; - if (gridOldY < 0) - gridOldY = 0; - if (gridOldY >= numYBlocks) - gridOldY = numYBlocks - 1; - - //Still in same block - if (gridX == gridOldX && gridY == gridOldY) - return; - - lock (mActorBlock) - { - mActorBlock[gridOldX, gridOldY].Remove(actor); - mActorBlock[gridX, gridY].Add(actor); - } - } - - public List GetActorsAroundPoint(float x, float y, int checkDistance) - { - checkDistance /= boundingGridSize; - - int gridX = (int)x/boundingGridSize; - int gridY = (int)y/boundingGridSize; - - gridX += halfWidth; - gridY += halfHeight; - - //Boundries - if (gridX < 0) - gridX = 0; - if (gridX >= numXBlocks) - gridX = numXBlocks - 1; - if (gridY < 0) - gridY = 0; - if (gridY >= numYBlocks) - gridY = numYBlocks - 1; - - List result = new List(); - - for (int gx = gridX - checkDistance; gx <= gridX + checkDistance; gx++) - { - for (int gy = gridY - checkDistance; gy <= gridY + checkDistance; gy++) - { - result.AddRange(mActorBlock[gx, gy]); - } - } - - //Remove players if isolation zone - if (isIsolated) - { - for (int i = 0; i < result.Count; i++) - { - if (result[i] is Player) - result.RemoveAt(i); - } - } - - return result; - } - - public List GetActorsAroundActor(Actor actor, int checkDistance) - { - checkDistance /= boundingGridSize; - - int gridX = (int)actor.positionX / boundingGridSize; - int gridY = (int)actor.positionZ / boundingGridSize; - - gridX += halfWidth; - gridY += halfHeight; - - //Boundries - if (gridX < 0) - gridX = 0; - if (gridX >= numXBlocks) - gridX = numXBlocks - 1; - if (gridY < 0) - gridY = 0; - if (gridY >= numYBlocks) - gridY = numYBlocks - 1; - - List result = new List(); - - for (int gy = ((gridY - checkDistance) < 0 ? 0 : (gridY - checkDistance)); gy <= ((gridY + checkDistance) >= numYBlocks ? numYBlocks - 1 : (gridY + checkDistance)); gy++) - { - for (int gx = ((gridX - checkDistance) < 0 ? 0 : (gridX - checkDistance)); gx <= ((gridX + checkDistance) >= numXBlocks ? numXBlocks - 1 : (gridX + checkDistance)); gx++) - { - result.AddRange(mActorBlock[gx, gy]); - } - } - - //Remove players if isolation zone - if (isIsolated) - { - for (int i = 0; i < result.Count; i++) - { - if (result[i] is Player) - result.RemoveAt(i); - } - } - - return result; - } - - #endregion - - public Actor FindActorInZone(uint id) - { - if (!mActorList.ContainsKey(id)) - return null; - return mActorList[id]; - } - - public Player FindPCInZone(string name) - { - foreach (Actor a in mActorList.Values) - { - if (a is Player) - { - if (((Player)a).customDisplayName.ToLower().Equals(name.ToLower())) - return (Player)a; - } - } - return null; - } - - public Player FindPCInZone(uint id) - { - if (!mActorList.ContainsKey(id)) - return null; - return (Player)mActorList[id]; - } - - public void Clear() - { - //Clear All - mActorList.Clear(); - for (int y = 0; y < numYBlocks; y++) - { - for (int x = 0; x < numXBlocks; x++) - { - mActorBlock[x, y].Clear(); - } - } - } - - public void BroadcastPacketAroundActor(Actor actor, SubPacket packet) - { - if (isIsolated) - return; - - List aroundActor = GetActorsAroundActor(actor, 50); - foreach (Actor a in aroundActor) - { - if (a is Player) - { - if (isIsolated && packet.header.sourceId != a.actorId) - continue; - - SubPacket clonedPacket = new SubPacket(packet, actor.actorId); - Player p = (Player)a; - p.QueuePacket(clonedPacket); - } - } - } - - public void SpawnActor(SpawnLocation location) - { - ActorClass actorClass = Server.GetWorldManager().GetActorClass(location.classId); - - if (actorClass == null) +namespace FFXIVClassic_Map_Server.Actors +{ + class Area : Actor + { + public string zoneName; + public ushort regionId; + public bool isIsolated, canStealth, isInn, canRideChocobo, isInstanceRaid; + public ushort weatherNormal, weatherCommon, weatherRare; + public ushort bgmDay, bgmNight, bgmBattle; + + protected string classPath; + + public int boundingGridSize = 50; + public int minX = -1000, minY = -1000, maxX = 1000, maxY = 1000; + protected int numXBlocks, numYBlocks; + protected int halfWidth, halfHeight; + + protected List mSpawnLocations = new List(); + protected Dictionary mActorList = new Dictionary(); + protected List[,] mActorBlock; + + LuaScript areaScript; + + public Area(uint id, string zoneName, ushort regionId, string className, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid) + : base(id) + { + + this.zoneName = zoneName; + this.regionId = regionId; + this.canStealth = canStealth; + this.isIsolated = isIsolated; + this.isInn = isInn; + this.canRideChocobo = canRideChocobo; + this.isInstanceRaid = isInstanceRaid; + + this.bgmDay = bgmDay; + this.bgmNight = bgmNight; + this.bgmBattle = bgmBattle; + + this.displayNameId = 0; + this.customDisplayName = "_areaMaster"; + this.actorName = String.Format("_areaMaster@{0:X5}",id<<8); + + this.className = className; + + numXBlocks = (maxX - minX) / boundingGridSize; + numYBlocks = (maxY - minY) / boundingGridSize; + mActorBlock = new List[numXBlocks, numYBlocks]; + halfWidth = numXBlocks / 2; + halfHeight = numYBlocks / 2; + + for (int y = 0; y < numYBlocks; y++) + { + for (int x = 0; x < numXBlocks; x++ ) + { + mActorBlock[x, y] = new List(); + } + } + + } + + public override SubPacket CreateScriptBindPacket(uint playerActorId) + { + List lParams; + lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, "/Area/Zone/ZoneDefault", -1, (byte)1, true, false, false, false, false, false, false, false); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, "ZoneDefault", lParams); + } + + public override BasePacket GetSpawnPackets(uint playerActorId) + { + List subpackets = new List(); + subpackets.Add(CreateAddActorPacket(playerActorId, 0)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x1)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); + } + + #region Actor Management + + public void AddActorToZone(Actor actor) + { + if (!mActorList.ContainsKey(actor.actorId)) + mActorList.Add(actor.actorId, actor); + + int gridX = (int)actor.positionX / boundingGridSize; + int gridY = (int)actor.positionZ / boundingGridSize; + + gridX += halfWidth; + gridY += halfHeight; + + //Boundries + if (gridX < 0) + gridX = 0; + if (gridX >= numXBlocks) + gridX = numXBlocks - 1; + if (gridY < 0) + gridY = 0; + if (gridY >= numYBlocks) + gridY = numYBlocks - 1; + + lock (mActorBlock) + mActorBlock[gridX, gridY].Add(actor); + } + + public void RemoveActorFromZone(Actor actor) + { + mActorList.Remove(actor.actorId); + + int gridX = (int)actor.positionX / boundingGridSize; + int gridY = (int)actor.positionZ / boundingGridSize; + + gridX += halfWidth; + gridY += halfHeight; + + //Boundries + if (gridX < 0) + gridX = 0; + if (gridX >= numXBlocks) + gridX = numXBlocks - 1; + if (gridY < 0) + gridY = 0; + if (gridY >= numYBlocks) + gridY = numYBlocks - 1; + + lock (mActorBlock) + mActorBlock[gridX, gridY].Remove(actor); + } + + public void UpdateActorPosition(Actor actor) + { + int gridX = (int)actor.positionX / boundingGridSize; + int gridY = (int)actor.positionZ / boundingGridSize; + + gridX += halfWidth; + gridY += halfHeight; + + //Boundries + if (gridX < 0) + gridX = 0; + if (gridX >= numXBlocks) + gridX = numXBlocks - 1; + if (gridY < 0) + gridY = 0; + if (gridY >= numYBlocks) + gridY = numYBlocks - 1; + + int gridOldX = (int)actor.oldPositionX / boundingGridSize; + int gridOldY = (int)actor.oldPositionZ / boundingGridSize; + + gridOldX += halfWidth; + gridOldY += halfHeight; + + //Boundries + if (gridOldX < 0) + gridOldX = 0; + if (gridOldX >= numXBlocks) + gridOldX = numXBlocks - 1; + if (gridOldY < 0) + gridOldY = 0; + if (gridOldY >= numYBlocks) + gridOldY = numYBlocks - 1; + + //Still in same block + if (gridX == gridOldX && gridY == gridOldY) return; - Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, null); - npc.LoadEventConditions(actorClass.eventConditions); - - AddActorToZone(npc); - } - + lock (mActorBlock) + { + mActorBlock[gridOldX, gridOldY].Remove(actor); + mActorBlock[gridX, gridY].Add(actor); + } + } + + public List GetActorsAroundPoint(float x, float y, int checkDistance) + { + checkDistance /= boundingGridSize; + + int gridX = (int)x/boundingGridSize; + int gridY = (int)y/boundingGridSize; + + gridX += halfWidth; + gridY += halfHeight; + + //Boundries + if (gridX < 0) + gridX = 0; + if (gridX >= numXBlocks) + gridX = numXBlocks - 1; + if (gridY < 0) + gridY = 0; + if (gridY >= numYBlocks) + gridY = numYBlocks - 1; + + List result = new List(); + + for (int gx = gridX - checkDistance; gx <= gridX + checkDistance; gx++) + { + for (int gy = gridY - checkDistance; gy <= gridY + checkDistance; gy++) + { + result.AddRange(mActorBlock[gx, gy]); + } + } + + //Remove players if isolation zone + if (isIsolated) + { + for (int i = 0; i < result.Count; i++) + { + if (result[i] is Player) + result.RemoveAt(i); + } + } + + return result; + } + + public List GetActorsAroundActor(Actor actor, int checkDistance) + { + checkDistance /= boundingGridSize; + + int gridX = (int)actor.positionX / boundingGridSize; + int gridY = (int)actor.positionZ / boundingGridSize; + + gridX += halfWidth; + gridY += halfHeight; + + //Boundries + if (gridX < 0) + gridX = 0; + if (gridX >= numXBlocks) + gridX = numXBlocks - 1; + if (gridY < 0) + gridY = 0; + if (gridY >= numYBlocks) + gridY = numYBlocks - 1; + + List result = new List(); + + for (int gy = ((gridY - checkDistance) < 0 ? 0 : (gridY - checkDistance)); gy <= ((gridY + checkDistance) >= numYBlocks ? numYBlocks - 1 : (gridY + checkDistance)); gy++) + { + for (int gx = ((gridX - checkDistance) < 0 ? 0 : (gridX - checkDistance)); gx <= ((gridX + checkDistance) >= numXBlocks ? numXBlocks - 1 : (gridX + checkDistance)); gx++) + { + result.AddRange(mActorBlock[gx, gy]); + } + } + + //Remove players if isolation zone + if (isIsolated) + { + for (int i = 0; i < result.Count; i++) + { + if (result[i] is Player) + result.RemoveAt(i); + } + } + + return result; + } + + #endregion + + public Actor FindActorInZone(uint id) + { + if (!mActorList.ContainsKey(id)) + return null; + return mActorList[id]; + } + + public Player FindPCInZone(string name) + { + foreach (Actor a in mActorList.Values) + { + if (a is Player) + { + if (((Player)a).customDisplayName.ToLower().Equals(name.ToLower())) + return (Player)a; + } + } + return null; + } + + public Player FindPCInZone(uint id) + { + if (!mActorList.ContainsKey(id)) + return null; + return (Player)mActorList[id]; + } + + public void Clear() + { + //Clear All + mActorList.Clear(); + for (int y = 0; y < numYBlocks; y++) + { + for (int x = 0; x < numXBlocks; x++) + { + mActorBlock[x, y].Clear(); + } + } + } + + public void BroadcastPacketAroundActor(Actor actor, SubPacket packet) + { + if (isIsolated) + return; + + List aroundActor = GetActorsAroundActor(actor, 50); + foreach (Actor a in aroundActor) + { + if (a is Player) + { + if (isIsolated && packet.header.sourceId != a.actorId) + continue; + + SubPacket clonedPacket = new SubPacket(packet, actor.actorId); + Player p = (Player)a; + p.QueuePacket(clonedPacket); + } + } + } + + public void SpawnActor(SpawnLocation location) + { + ActorClass actorClass = Server.GetWorldManager().GetActorClass(location.classId); + + if (actorClass == null) + return; + + Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, null); + npc.LoadEventConditions(actorClass.eventConditions); + + AddActorToZone(npc); + } + public void ChangeWeather(ushort weather, ushort transitionTime, Player player, bool zoneWide = false) { weatherNormal = weather; @@ -372,6 +372,6 @@ namespace FFXIVClassic_Map_Server.Actors } } } - } - } -} + } + } +} diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 98cc0cc0..4d7f333b 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1,611 +1,611 @@ -using FFXIVClassic.Common; -using FFXIVClassic_Map_Server.packets; -using FFXIVClassic_Map_Server.actors.chara.player; -using FFXIVClassic_Map_Server.actors.director; -using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Map_Server.dataobjects.chara; -using FFXIVClassic_Map_Server.lua; -using FFXIVClassic_Map_Server.packets.send; -using FFXIVClassic_Map_Server.packets.send.actor; -using FFXIVClassic_Map_Server.packets.send.actor.events; -using FFXIVClassic_Map_Server.packets.send.Actor.inventory; -using FFXIVClassic_Map_Server.packets.send.events; -using FFXIVClassic_Map_Server.packets.send.list; -using FFXIVClassic_Map_Server.packets.send.player; -using FFXIVClassic_Map_Server.utils; -using System; -using System.Collections.Generic; -using MoonSharp.Interpreter; -using FFXIVClassic_Map_Server.packets.receive.events; - -namespace FFXIVClassic_Map_Server.Actors -{ - class Player : Character - { - public const int CLASSID_PUG = 2; - public const int CLASSID_GLA = 3; - public const int CLASSID_MRD = 4; - public const int CLASSID_ARC = 7; - public const int CLASSID_LNC = 8; - public const int CLASSID_THM = 22; - public const int CLASSID_CNJ = 23; - - public const int CLASSID_CRP = 29; - public const int CLASSID_BSM = 30; - public const int CLASSID_ARM = 31; - public const int CLASSID_GSM = 32; - public const int CLASSID_LTW = 33; - public const int CLASSID_WVR = 34; - public const int CLASSID_ALC = 35; - public const int CLASSID_CUL = 36; - - public const int CLASSID_MIN = 39; - public const int CLASSID_BTN = 40; - public const int CLASSID_FSH = 41; - - public const int MAXSIZE_INVENTORY_NORMAL = 200; - public const int MAXSIZE_INVENTORY_CURRANCY = 320; - public const int MAXSIZE_INVENTORY_KEYITEMS = 500; - public const int MAXSIZE_INVENTORY_LOOT = 10; - public const int MAXSIZE_INVENTORY_MELDREQUEST = 4; - public const int MAXSIZE_INVENTORY_BAZAAR = 10; - public const int MAXSIZE_INVENTORY_EQUIPMENT = 35; - - public const int TIMER_TOTORAK = 0; - public const int TIMER_DZEMAEL = 1; - public const int TIMER_BOWL_OF_EMBERS_HARD = 2; - public const int TIMER_BOWL_OF_EMBERS = 3; - public const int TIMER_THORNMARCH = 4; - public const int TIMER_AURUMVALE = 5; - public const int TIMER_CUTTERSCRY = 6; - public const int TIMER_BATTLE_ALEPORT = 7; - public const int TIMER_BATTLE_HYRSTMILL = 8; - public const int TIMER_BATTLE_GOLDENBAZAAR = 9; - public const int TIMER_HOWLING_EYE_HARD = 10; - public const int TIMER_HOWLING_EYE = 11; - public const int TIMER_CASTRUM_TOWER = 12; - public const int TIMER_BOWL_OF_EMBERS_EXTREME = 13; - public const int TIMER_RIVENROAD = 14; - public const int TIMER_RIVENROAD_HARD = 15; - public const int TIMER_BEHEST = 16; - public const int TIMER_COMPANYBEHEST = 17; - public const int TIMER_RETURN = 18; - public const int TIMER_SKIRMISH = 19; - - public static int[] MAXEXP = {570, 700, 880, 1100, 1500, 1800, 2300, 3200, 4300, 5000, //Level <= 10 - 5900, 6800, 7700, 8700, 9700, 11000, 12000, 13000, 15000, 16000, //Level <= 20 - 20000, 22000, 23000, 25000, 27000, 29000, 31000, 33000, 35000, 38000, //Level <= 30 - 45000, 47000, 50000, 53000, 56000, 59000, 62000, 65000, 68000, 71000, //Level <= 40 - 74000, 78000, 81000, 85000, 89000, 92000, 96000, 100000, 100000, 110000}; //Level <= 50 - - //Event Related - public uint currentEventOwner = 0; - public string currentEventName = ""; - - public Coroutine currentEventRunning; - - //Player Info - public uint[] timers = new uint[20]; - public ushort currentJob; - public uint currentTitle; - public uint playTime; - public uint lastPlayTimeUpdate; - public bool isGM = false; - public bool isZoneChanging = true; - - //Inventory - private Dictionary inventories = new Dictionary(); - private Equipment equipment; - - //GC Related - public byte gcCurrent; - public byte gcRankLimsa; - public byte gcRankGridania; - public byte gcRankUldah; - - //Mount Related - public bool hasChocobo; - public bool hasGoobbue; - public byte chocoboAppearance; - public string chocoboName; - public byte mountState = 0; - - public uint achievementPoints; - - //Property Array Request Stuff - private int lastPosition = 0; - private int lastStep = 0; - - //Quest Actors (MUST MATCH playerWork.questScenario/questGuildleve) - public Quest[] questScenario = new Quest[16]; - public Quest[] questGuildleve = new Quest[8]; - - public Director currentDirector; - - public PlayerWork playerWork = new PlayerWork(); - - public ConnectedPlayer playerSession; - - public Player(ConnectedPlayer cp, uint actorID) : base(actorID) - { - playerSession = cp; - actorName = String.Format("_pc{0:00000000}", actorID); - className = "Player"; - currentSubState = SetActorStatePacket.SUB_STATE_PLAYER; - - inventories[Inventory.NORMAL] = new Inventory(this, MAXSIZE_INVENTORY_NORMAL, Inventory.NORMAL); - inventories[Inventory.KEYITEMS] = new Inventory(this, MAXSIZE_INVENTORY_KEYITEMS, Inventory.KEYITEMS); - inventories[Inventory.CURRENCY] = new Inventory(this, MAXSIZE_INVENTORY_CURRANCY, Inventory.CURRENCY); - inventories[Inventory.MELDREQUEST] = new Inventory(this, MAXSIZE_INVENTORY_MELDREQUEST, Inventory.MELDREQUEST); - inventories[Inventory.BAZAAR] = new Inventory(this, MAXSIZE_INVENTORY_BAZAAR, Inventory.BAZAAR); - inventories[Inventory.LOOT] = new Inventory(this, MAXSIZE_INVENTORY_LOOT, Inventory.LOOT); - - equipment = new Equipment(this, inventories[Inventory.NORMAL], MAXSIZE_INVENTORY_EQUIPMENT, Inventory.EQUIPMENT); - - //Set the Skill level caps of all FFXIV (classes)skills to 50 - for (int i = 0; i < charaWork.battleSave.skillLevelCap.Length; i++) - { - if (i != CLASSID_PUG && - i != CLASSID_MRD && - i != CLASSID_GLA && - i != CLASSID_MRD && - i != CLASSID_ARC && - i != CLASSID_LNC && - i != CLASSID_THM && - i != CLASSID_CNJ && - i != CLASSID_CRP && - i != CLASSID_BSM && - i != CLASSID_ARM && - i != CLASSID_GSM && - i != CLASSID_LTW && - i != CLASSID_WVR && - i != CLASSID_ALC && - i != CLASSID_CUL && - i != CLASSID_MIN && - i != CLASSID_BTN && - i != CLASSID_FSH) - charaWork.battleSave.skillLevelCap[i] = 0xFF; - else - charaWork.battleSave.skillLevelCap[i] = 50; - - } - - charaWork.property[0] = 1; - charaWork.property[1] = 1; - charaWork.property[2] = 1; - charaWork.property[4] = 1; - - charaWork.command[0] = 0xA0F00000 | 21001; - charaWork.command[1] = 0xA0F00000 | 21001; - - charaWork.command[2] = 0xA0F00000 | 21002; - charaWork.command[3] = 0xA0F00000 | 12004; - charaWork.command[4] = 0xA0F00000 | 21005; - charaWork.command[5] = 0xA0F00000 | 21006; - charaWork.command[6] = 0xA0F00000 | 21007; - charaWork.command[7] = 0xA0F00000 | 12009; - charaWork.command[8] = 0xA0F00000 | 12010; - charaWork.command[9] = 0xA0F00000 | 12005; - charaWork.command[10] = 0xA0F00000 | 12007; - charaWork.command[11] = 0xA0F00000 | 12011; - charaWork.command[12] = 0xA0F00000 | 22012; - charaWork.command[13] = 0xA0F00000 | 22013; - charaWork.command[14] = 0xA0F00000 | 29497; - charaWork.command[15] = 0xA0F00000 | 22015; - - charaWork.command[32] = 0xA0F00000 | 27191; - charaWork.command[33] = 0xA0F00000 | 22302; - charaWork.command[34] = 0xA0F00000 | 28466; - - charaWork.commandAcquired[27150 - 26000] = true; - - playerWork.questScenarioComplete[110001 - 110001] = true; - playerWork.questGuildleveComplete[120050 - 120001] = true; - - for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++ ) - charaWork.additionalCommandAcquired[i] = true; - - for (int i = 0; i < charaWork.commandCategory.Length; i++) - charaWork.commandCategory[i] = 1; - - charaWork.battleTemp.generalParameter[3] = 1; - - charaWork.eventSave.bazaarTax = 5; - charaWork.battleSave.potencial = 6.6f; - - charaWork.commandCategory[0] = 1; - charaWork.commandCategory[1] = 1; - charaWork.commandCategory[32] = 1; - charaWork.commandCategory[33] = 1; - charaWork.commandCategory[34] = 1; - - charaWork.parameterSave.commandSlot_compatibility[0] = true; - charaWork.parameterSave.commandSlot_compatibility[1] = true; - charaWork.parameterSave.commandSlot_compatibility[32] = true; - - charaWork.commandBorder = 0x20; - - charaWork.parameterTemp.tp = 3000; - - Database.LoadPlayerCharacter(this); - lastPlayTimeUpdate = Utils.UnixTimeStampUTC(); - } - - public List Create0x132Packets(uint playerActorId) - { - List packets = new List(); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0xB, "commandForced")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0xA, "commandDefault")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x6, "commandWeak")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x4, "commandContent")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x6, "commandJudgeMode")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "commandRequest")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "widgetCreate")); - packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "macroRequest")); - return packets; - } - - public override SubPacket CreateScriptBindPacket(uint playerActorId) - { - List lParams; - if (IsMyPlayer(playerActorId)) - { - if (currentDirector != null) - lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, true, currentDirector, true, 0, false, timers, true); - else - lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true); - } - else - lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true); - return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); - } - - public override BasePacket GetSpawnPackets(uint playerActorId, uint spawnType) - { - List subpackets = new List(); - subpackets.Add(CreateAddActorPacket(playerActorId, 8)); - if (IsMyPlayer(playerActorId)) - subpackets.AddRange(Create0x132Packets(playerActorId)); - subpackets.Add(CreateSpeedPacket(playerActorId)); - subpackets.Add(CreateSpawnPositonPacket(playerActorId, spawnType)); - subpackets.Add(CreateAppearancePacket(playerActorId)); - subpackets.Add(CreateNamePacket(playerActorId)); - subpackets.Add(_0xFPacket.BuildPacket(playerActorId, playerActorId)); - subpackets.Add(CreateStatePacket(playerActorId)); - subpackets.Add(CreateIdleAnimationPacket(playerActorId)); - subpackets.Add(CreateInitStatusPacket(playerActorId)); - subpackets.Add(CreateSetActorIconPacket(playerActorId)); - subpackets.Add(CreateIsZoneingPacket(playerActorId)); - subpackets.AddRange(CreatePlayerRelatedPackets(playerActorId)); - subpackets.Add(CreateScriptBindPacket(playerActorId)); - return BasePacket.CreatePacket(subpackets, true, false); - } - - public List CreatePlayerRelatedPackets(uint playerActorId) - { - List subpackets = new List(); - - if (gcCurrent != 0) - subpackets.Add(SetGrandCompanyPacket.BuildPacket(actorId, playerActorId, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah)); - - if (currentTitle != 0) - subpackets.Add(SetPlayerTitlePacket.BuildPacket(actorId, playerActorId, currentTitle)); - - if (currentJob != 0) - subpackets.Add(SetCurrentJobPacket.BuildPacket(actorId, playerActorId, currentJob)); - - if (IsMyPlayer(playerActorId)) - { - subpackets.Add(_0x196Packet.BuildPacket(playerActorId, playerActorId)); - - if (hasChocobo && chocoboName != null && !chocoboName.Equals("")) - { - subpackets.Add(SetChocoboNamePacket.BuildPacket(actorId, playerActorId, chocoboName)); - subpackets.Add(SetHasChocoboPacket.BuildPacket(playerActorId, hasChocobo)); - } - - if (hasGoobbue) - subpackets.Add(SetHasGoobbuePacket.BuildPacket(playerActorId, hasGoobbue)); - - subpackets.Add(SetAchievementPointsPacket.BuildPacket(playerActorId, achievementPoints)); - subpackets.Add(Database.GetLatestAchievements(this)); - subpackets.Add(Database.GetAchievementsPacket(this)); - } - - return subpackets; - } - - public override BasePacket GetInitPackets(uint playerActorId) - { - ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this, playerActorId); - - propPacketUtil.AddProperty("charaWork.eventSave.bazaarTax"); - propPacketUtil.AddProperty("charaWork.battleSave.potencial"); - - //Properties - for (int i = 0; i < charaWork.property.Length; i++) - { - if (charaWork.property[i] != 0) - propPacketUtil.AddProperty(String.Format("charaWork.property[{0}]", i)); - } - - //Parameters - propPacketUtil.AddProperty("charaWork.parameterSave.hp[0]"); - propPacketUtil.AddProperty("charaWork.parameterSave.hpMax[0]"); - propPacketUtil.AddProperty("charaWork.parameterSave.mp"); - propPacketUtil.AddProperty("charaWork.parameterSave.mpMax"); - propPacketUtil.AddProperty("charaWork.parameterTemp.tp"); - propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); - propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); - - //Status Times - for (int i = 0; i < charaWork.statusShownTime.Length; i++) - { - if (charaWork.statusShownTime[i] != 0xFFFFFFFF) - propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i)); - } - - //General Parameters - for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++) - { - if (charaWork.battleTemp.generalParameter[i] != 0) - propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i)); - } - - propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[0]"); - propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[1]"); - - //Battle Save Skillpoint - - //Commands - propPacketUtil.AddProperty("charaWork.commandBorder"); - - - for (int i = 0; i < charaWork.command.Length; i++) - { - if (charaWork.command[i] != 0) - propPacketUtil.AddProperty(String.Format("charaWork.command[{0}]", i)); - } - - - for (int i = 0; i < charaWork.commandCategory.Length; i++) - { - charaWork.commandCategory[i] = 1; - if (charaWork.commandCategory[i] != 0) - propPacketUtil.AddProperty(String.Format("charaWork.commandCategory[{0}]", i)); - } - - for (int i = 0; i < charaWork.commandAcquired.Length; i++) - { - if (charaWork.commandAcquired[i] != false) - propPacketUtil.AddProperty(String.Format("charaWork.commandAcquired[{0}]", i)); - } - - - for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++) - { - if (charaWork.additionalCommandAcquired[i] != false) - propPacketUtil.AddProperty(String.Format("charaWork.additionalCommandAcquired[{0}]", i)); - } - - for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++) - { - charaWork.parameterSave.commandSlot_compatibility[i] = true; - if (charaWork.parameterSave.commandSlot_compatibility[i]) - propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i)); - } - - /* - for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++) - { - if (charaWork.parameterSave.commandSlot_recastTime[i] != 0) - propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i)); - } - */ - - //System - propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[0]"); - propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[1]"); - propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[0]"); - propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[1]"); - - charaWork.parameterTemp.otherClassAbilityCount[0] = 4; - charaWork.parameterTemp.otherClassAbilityCount[1] = 5; - charaWork.parameterTemp.giftCount[1] = 5; - - propPacketUtil.AddProperty("charaWork.parameterTemp.otherClassAbilityCount[0]"); - propPacketUtil.AddProperty("charaWork.parameterTemp.otherClassAbilityCount[1]"); - propPacketUtil.AddProperty("charaWork.parameterTemp.giftCount[1]"); - - propPacketUtil.AddProperty("charaWork.depictionJudge"); - - //Scenario - for (int i = 0; i < playerWork.questScenario.Length; i++) - { - if (playerWork.questScenario[i] != 0) - propPacketUtil.AddProperty(String.Format("playerWork.questScenario[{0}]", i)); - } - - //Guildleve - Local - for (int i = 0; i < playerWork.questGuildleve.Length; i++) - { - if (playerWork.questGuildleve[i] != 0) - propPacketUtil.AddProperty(String.Format("playerWork.questGuildleve[{0}]", i)); - } - - //Guildleve - Regional - for (int i = 0; i < work.guildleveId.Length; i++) - { - if (work.guildleveId[i] != 0) - propPacketUtil.AddProperty(String.Format("work.guildleveId[{0}]", i)); - if (work.guildleveDone[i] != false) - propPacketUtil.AddProperty(String.Format("work.guildleveDone[{0}]", i)); - if (work.guildleveChecked[i] != false) - propPacketUtil.AddProperty(String.Format("work.guildleveChecked[{0}]", i)); - } - - //NPC Linkshell - for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++) - { - if (playerWork.npcLinkshellChatCalling[i] != false) - propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i)); - if (playerWork.npcLinkshellChatExtra[i] != false) - propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i)); - } - - propPacketUtil.AddProperty("playerWork.restBonusExpRate"); - - //Profile - propPacketUtil.AddProperty("playerWork.tribe"); - propPacketUtil.AddProperty("playerWork.guardian"); - propPacketUtil.AddProperty("playerWork.birthdayMonth"); - propPacketUtil.AddProperty("playerWork.birthdayDay"); - propPacketUtil.AddProperty("playerWork.initialTown"); - - return BasePacket.CreatePacket(propPacketUtil.Done(), true, false); - } - +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; +using FFXIVClassic_Map_Server.actors.chara.player; +using FFXIVClassic_Map_Server.actors.director; +using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects.chara; +using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.packets.send; +using FFXIVClassic_Map_Server.packets.send.actor; +using FFXIVClassic_Map_Server.packets.send.actor.events; +using FFXIVClassic_Map_Server.packets.send.Actor.inventory; +using FFXIVClassic_Map_Server.packets.send.events; +using FFXIVClassic_Map_Server.packets.send.list; +using FFXIVClassic_Map_Server.packets.send.player; +using FFXIVClassic_Map_Server.utils; +using System; +using System.Collections.Generic; +using MoonSharp.Interpreter; +using FFXIVClassic_Map_Server.packets.receive.events; + +namespace FFXIVClassic_Map_Server.Actors +{ + class Player : Character + { + public const int CLASSID_PUG = 2; + public const int CLASSID_GLA = 3; + public const int CLASSID_MRD = 4; + public const int CLASSID_ARC = 7; + public const int CLASSID_LNC = 8; + public const int CLASSID_THM = 22; + public const int CLASSID_CNJ = 23; + + public const int CLASSID_CRP = 29; + public const int CLASSID_BSM = 30; + public const int CLASSID_ARM = 31; + public const int CLASSID_GSM = 32; + public const int CLASSID_LTW = 33; + public const int CLASSID_WVR = 34; + public const int CLASSID_ALC = 35; + public const int CLASSID_CUL = 36; + + public const int CLASSID_MIN = 39; + public const int CLASSID_BTN = 40; + public const int CLASSID_FSH = 41; + + public const int MAXSIZE_INVENTORY_NORMAL = 200; + public const int MAXSIZE_INVENTORY_CURRANCY = 320; + public const int MAXSIZE_INVENTORY_KEYITEMS = 500; + public const int MAXSIZE_INVENTORY_LOOT = 10; + public const int MAXSIZE_INVENTORY_MELDREQUEST = 4; + public const int MAXSIZE_INVENTORY_BAZAAR = 10; + public const int MAXSIZE_INVENTORY_EQUIPMENT = 35; + + public const int TIMER_TOTORAK = 0; + public const int TIMER_DZEMAEL = 1; + public const int TIMER_BOWL_OF_EMBERS_HARD = 2; + public const int TIMER_BOWL_OF_EMBERS = 3; + public const int TIMER_THORNMARCH = 4; + public const int TIMER_AURUMVALE = 5; + public const int TIMER_CUTTERSCRY = 6; + public const int TIMER_BATTLE_ALEPORT = 7; + public const int TIMER_BATTLE_HYRSTMILL = 8; + public const int TIMER_BATTLE_GOLDENBAZAAR = 9; + public const int TIMER_HOWLING_EYE_HARD = 10; + public const int TIMER_HOWLING_EYE = 11; + public const int TIMER_CASTRUM_TOWER = 12; + public const int TIMER_BOWL_OF_EMBERS_EXTREME = 13; + public const int TIMER_RIVENROAD = 14; + public const int TIMER_RIVENROAD_HARD = 15; + public const int TIMER_BEHEST = 16; + public const int TIMER_COMPANYBEHEST = 17; + public const int TIMER_RETURN = 18; + public const int TIMER_SKIRMISH = 19; + + public static int[] MAXEXP = {570, 700, 880, 1100, 1500, 1800, 2300, 3200, 4300, 5000, //Level <= 10 + 5900, 6800, 7700, 8700, 9700, 11000, 12000, 13000, 15000, 16000, //Level <= 20 + 20000, 22000, 23000, 25000, 27000, 29000, 31000, 33000, 35000, 38000, //Level <= 30 + 45000, 47000, 50000, 53000, 56000, 59000, 62000, 65000, 68000, 71000, //Level <= 40 + 74000, 78000, 81000, 85000, 89000, 92000, 96000, 100000, 100000, 110000}; //Level <= 50 + + //Event Related + public uint currentEventOwner = 0; + public string currentEventName = ""; + + public Coroutine currentEventRunning; + + //Player Info + public uint[] timers = new uint[20]; + public ushort currentJob; + public uint currentTitle; + public uint playTime; + public uint lastPlayTimeUpdate; + public bool isGM = false; + public bool isZoneChanging = true; + + //Inventory + private Dictionary inventories = new Dictionary(); + private Equipment equipment; + + //GC Related + public byte gcCurrent; + public byte gcRankLimsa; + public byte gcRankGridania; + public byte gcRankUldah; + + //Mount Related + public bool hasChocobo; + public bool hasGoobbue; + public byte chocoboAppearance; + public string chocoboName; + public byte mountState = 0; + + public uint achievementPoints; + + //Property Array Request Stuff + private int lastPosition = 0; + private int lastStep = 0; + + //Quest Actors (MUST MATCH playerWork.questScenario/questGuildleve) + public Quest[] questScenario = new Quest[16]; + public Quest[] questGuildleve = new Quest[8]; + + public Director currentDirector; + + public PlayerWork playerWork = new PlayerWork(); + + public ConnectedPlayer playerSession; + + public Player(ConnectedPlayer cp, uint actorID) : base(actorID) + { + playerSession = cp; + actorName = String.Format("_pc{0:00000000}", actorID); + className = "Player"; + currentSubState = SetActorStatePacket.SUB_STATE_PLAYER; + + inventories[Inventory.NORMAL] = new Inventory(this, MAXSIZE_INVENTORY_NORMAL, Inventory.NORMAL); + inventories[Inventory.KEYITEMS] = new Inventory(this, MAXSIZE_INVENTORY_KEYITEMS, Inventory.KEYITEMS); + inventories[Inventory.CURRENCY] = new Inventory(this, MAXSIZE_INVENTORY_CURRANCY, Inventory.CURRENCY); + inventories[Inventory.MELDREQUEST] = new Inventory(this, MAXSIZE_INVENTORY_MELDREQUEST, Inventory.MELDREQUEST); + inventories[Inventory.BAZAAR] = new Inventory(this, MAXSIZE_INVENTORY_BAZAAR, Inventory.BAZAAR); + inventories[Inventory.LOOT] = new Inventory(this, MAXSIZE_INVENTORY_LOOT, Inventory.LOOT); + + equipment = new Equipment(this, inventories[Inventory.NORMAL], MAXSIZE_INVENTORY_EQUIPMENT, Inventory.EQUIPMENT); + + //Set the Skill level caps of all FFXIV (classes)skills to 50 + for (int i = 0; i < charaWork.battleSave.skillLevelCap.Length; i++) + { + if (i != CLASSID_PUG && + i != CLASSID_MRD && + i != CLASSID_GLA && + i != CLASSID_MRD && + i != CLASSID_ARC && + i != CLASSID_LNC && + i != CLASSID_THM && + i != CLASSID_CNJ && + i != CLASSID_CRP && + i != CLASSID_BSM && + i != CLASSID_ARM && + i != CLASSID_GSM && + i != CLASSID_LTW && + i != CLASSID_WVR && + i != CLASSID_ALC && + i != CLASSID_CUL && + i != CLASSID_MIN && + i != CLASSID_BTN && + i != CLASSID_FSH) + charaWork.battleSave.skillLevelCap[i] = 0xFF; + else + charaWork.battleSave.skillLevelCap[i] = 50; + + } + + charaWork.property[0] = 1; + charaWork.property[1] = 1; + charaWork.property[2] = 1; + charaWork.property[4] = 1; + + charaWork.command[0] = 0xA0F00000 | 21001; + charaWork.command[1] = 0xA0F00000 | 21001; + + charaWork.command[2] = 0xA0F00000 | 21002; + charaWork.command[3] = 0xA0F00000 | 12004; + charaWork.command[4] = 0xA0F00000 | 21005; + charaWork.command[5] = 0xA0F00000 | 21006; + charaWork.command[6] = 0xA0F00000 | 21007; + charaWork.command[7] = 0xA0F00000 | 12009; + charaWork.command[8] = 0xA0F00000 | 12010; + charaWork.command[9] = 0xA0F00000 | 12005; + charaWork.command[10] = 0xA0F00000 | 12007; + charaWork.command[11] = 0xA0F00000 | 12011; + charaWork.command[12] = 0xA0F00000 | 22012; + charaWork.command[13] = 0xA0F00000 | 22013; + charaWork.command[14] = 0xA0F00000 | 29497; + charaWork.command[15] = 0xA0F00000 | 22015; + + charaWork.command[32] = 0xA0F00000 | 27191; + charaWork.command[33] = 0xA0F00000 | 22302; + charaWork.command[34] = 0xA0F00000 | 28466; + + charaWork.commandAcquired[27150 - 26000] = true; + + playerWork.questScenarioComplete[110001 - 110001] = true; + playerWork.questGuildleveComplete[120050 - 120001] = true; + + for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++ ) + charaWork.additionalCommandAcquired[i] = true; + + for (int i = 0; i < charaWork.commandCategory.Length; i++) + charaWork.commandCategory[i] = 1; + + charaWork.battleTemp.generalParameter[3] = 1; + + charaWork.eventSave.bazaarTax = 5; + charaWork.battleSave.potencial = 6.6f; + + charaWork.commandCategory[0] = 1; + charaWork.commandCategory[1] = 1; + charaWork.commandCategory[32] = 1; + charaWork.commandCategory[33] = 1; + charaWork.commandCategory[34] = 1; + + charaWork.parameterSave.commandSlot_compatibility[0] = true; + charaWork.parameterSave.commandSlot_compatibility[1] = true; + charaWork.parameterSave.commandSlot_compatibility[32] = true; + + charaWork.commandBorder = 0x20; + + charaWork.parameterTemp.tp = 3000; + + Database.LoadPlayerCharacter(this); + lastPlayTimeUpdate = Utils.UnixTimeStampUTC(); + } + + public List Create0x132Packets(uint playerActorId) + { + List packets = new List(); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0xB, "commandForced")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0xA, "commandDefault")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x6, "commandWeak")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x4, "commandContent")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x6, "commandJudgeMode")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "commandRequest")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "widgetCreate")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "macroRequest")); + return packets; + } + + public override SubPacket CreateScriptBindPacket(uint playerActorId) + { + List lParams; + if (IsMyPlayer(playerActorId)) + { + if (currentDirector != null) + lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, true, currentDirector, true, 0, false, timers, true); + else + lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true); + } + else + lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); + } + + public override BasePacket GetSpawnPackets(uint playerActorId, uint spawnType) + { + List subpackets = new List(); + subpackets.Add(CreateAddActorPacket(playerActorId, 8)); + if (IsMyPlayer(playerActorId)) + subpackets.AddRange(Create0x132Packets(playerActorId)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, spawnType)); + subpackets.Add(CreateAppearancePacket(playerActorId)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(_0xFPacket.BuildPacket(playerActorId, playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIdleAnimationPacket(playerActorId)); + subpackets.Add(CreateInitStatusPacket(playerActorId)); + subpackets.Add(CreateSetActorIconPacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.AddRange(CreatePlayerRelatedPackets(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); + } + + public List CreatePlayerRelatedPackets(uint playerActorId) + { + List subpackets = new List(); + + if (gcCurrent != 0) + subpackets.Add(SetGrandCompanyPacket.BuildPacket(actorId, playerActorId, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah)); + + if (currentTitle != 0) + subpackets.Add(SetPlayerTitlePacket.BuildPacket(actorId, playerActorId, currentTitle)); + + if (currentJob != 0) + subpackets.Add(SetCurrentJobPacket.BuildPacket(actorId, playerActorId, currentJob)); + + if (IsMyPlayer(playerActorId)) + { + subpackets.Add(_0x196Packet.BuildPacket(playerActorId, playerActorId)); + + if (hasChocobo && chocoboName != null && !chocoboName.Equals("")) + { + subpackets.Add(SetChocoboNamePacket.BuildPacket(actorId, playerActorId, chocoboName)); + subpackets.Add(SetHasChocoboPacket.BuildPacket(playerActorId, hasChocobo)); + } + + if (hasGoobbue) + subpackets.Add(SetHasGoobbuePacket.BuildPacket(playerActorId, hasGoobbue)); + + subpackets.Add(SetAchievementPointsPacket.BuildPacket(playerActorId, achievementPoints)); + subpackets.Add(Database.GetLatestAchievements(this)); + subpackets.Add(Database.GetAchievementsPacket(this)); + } + + return subpackets; + } + + public override BasePacket GetInitPackets(uint playerActorId) + { + ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this, playerActorId); + + propPacketUtil.AddProperty("charaWork.eventSave.bazaarTax"); + propPacketUtil.AddProperty("charaWork.battleSave.potencial"); + + //Properties + for (int i = 0; i < charaWork.property.Length; i++) + { + if (charaWork.property[i] != 0) + propPacketUtil.AddProperty(String.Format("charaWork.property[{0}]", i)); + } + + //Parameters + propPacketUtil.AddProperty("charaWork.parameterSave.hp[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.hpMax[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.mp"); + propPacketUtil.AddProperty("charaWork.parameterSave.mpMax"); + propPacketUtil.AddProperty("charaWork.parameterTemp.tp"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); + + //Status Times + for (int i = 0; i < charaWork.statusShownTime.Length; i++) + { + if (charaWork.statusShownTime[i] != 0xFFFFFFFF) + propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i)); + } + + //General Parameters + for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++) + { + if (charaWork.battleTemp.generalParameter[i] != 0) + propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i)); + } + + propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[0]"); + propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[1]"); + + //Battle Save Skillpoint + + //Commands + propPacketUtil.AddProperty("charaWork.commandBorder"); + + + for (int i = 0; i < charaWork.command.Length; i++) + { + if (charaWork.command[i] != 0) + propPacketUtil.AddProperty(String.Format("charaWork.command[{0}]", i)); + } + + + for (int i = 0; i < charaWork.commandCategory.Length; i++) + { + charaWork.commandCategory[i] = 1; + if (charaWork.commandCategory[i] != 0) + propPacketUtil.AddProperty(String.Format("charaWork.commandCategory[{0}]", i)); + } + + for (int i = 0; i < charaWork.commandAcquired.Length; i++) + { + if (charaWork.commandAcquired[i] != false) + propPacketUtil.AddProperty(String.Format("charaWork.commandAcquired[{0}]", i)); + } + + + for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++) + { + if (charaWork.additionalCommandAcquired[i] != false) + propPacketUtil.AddProperty(String.Format("charaWork.additionalCommandAcquired[{0}]", i)); + } + + for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++) + { + charaWork.parameterSave.commandSlot_compatibility[i] = true; + if (charaWork.parameterSave.commandSlot_compatibility[i]) + propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i)); + } + + /* + for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++) + { + if (charaWork.parameterSave.commandSlot_recastTime[i] != 0) + propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i)); + } + */ + + //System + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[0]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[1]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[0]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[1]"); + + charaWork.parameterTemp.otherClassAbilityCount[0] = 4; + charaWork.parameterTemp.otherClassAbilityCount[1] = 5; + charaWork.parameterTemp.giftCount[1] = 5; + + propPacketUtil.AddProperty("charaWork.parameterTemp.otherClassAbilityCount[0]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.otherClassAbilityCount[1]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.giftCount[1]"); + + propPacketUtil.AddProperty("charaWork.depictionJudge"); + + //Scenario + for (int i = 0; i < playerWork.questScenario.Length; i++) + { + if (playerWork.questScenario[i] != 0) + propPacketUtil.AddProperty(String.Format("playerWork.questScenario[{0}]", i)); + } + + //Guildleve - Local + for (int i = 0; i < playerWork.questGuildleve.Length; i++) + { + if (playerWork.questGuildleve[i] != 0) + propPacketUtil.AddProperty(String.Format("playerWork.questGuildleve[{0}]", i)); + } + + //Guildleve - Regional + for (int i = 0; i < work.guildleveId.Length; i++) + { + if (work.guildleveId[i] != 0) + propPacketUtil.AddProperty(String.Format("work.guildleveId[{0}]", i)); + if (work.guildleveDone[i] != false) + propPacketUtil.AddProperty(String.Format("work.guildleveDone[{0}]", i)); + if (work.guildleveChecked[i] != false) + propPacketUtil.AddProperty(String.Format("work.guildleveChecked[{0}]", i)); + } + + //NPC Linkshell + for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++) + { + if (playerWork.npcLinkshellChatCalling[i] != false) + propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i)); + if (playerWork.npcLinkshellChatExtra[i] != false) + propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i)); + } + + propPacketUtil.AddProperty("playerWork.restBonusExpRate"); + + //Profile + propPacketUtil.AddProperty("playerWork.tribe"); + propPacketUtil.AddProperty("playerWork.guardian"); + propPacketUtil.AddProperty("playerWork.birthdayMonth"); + propPacketUtil.AddProperty("playerWork.birthdayDay"); + propPacketUtil.AddProperty("playerWork.initialTown"); + + return BasePacket.CreatePacket(propPacketUtil.Done(), true, false); + } + public void SendSeamlessZoneInPackets() { QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, SetMusicPacket.EFFECT_FADEIN)); QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); - } - - public void SendZoneInPackets(WorldManager world, ushort spawnType) - { - QueuePacket(SetActorIsZoningPacket.BuildPacket(actorId, actorId, false)); - QueuePacket(_0x10Packet.BuildPacket(actorId, 0xFF)); - QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, 0x01)); - QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); - - QueuePacket(SetMapPacket.BuildPacket(actorId, zone.regionId, zone.actorId)); - - QueuePacket(GetSpawnPackets(actorId, spawnType)); - GetSpawnPackets(actorId, spawnType).DebugPrintPacket(); - - #region grouptest - //Retainers - List retainerListEntries = new List(); - retainerListEntries.Add(new ListEntry(actorId, 0xFFFFFFFF, 0x139E, false, true, customDisplayName)); - retainerListEntries.Add(new ListEntry(0x23, 0x0, 0xFFFFFFFF, false, false, "TEST1")); - retainerListEntries.Add(new ListEntry(0x24, 0x0, 0xFFFFFFFF, false, false, "TEST2")); - retainerListEntries.Add(new ListEntry(0x25, 0x0, 0xFFFFFFFF, false, false, "TEST3")); - BasePacket retainerListPacket = BasePacket.CreatePacket(ListUtils.CreateRetainerList(actorId, 0xF4, 1, 0x800000000004e639, retainerListEntries), true, false); - playerSession.QueuePacket(retainerListPacket); - - //Party - List partyListEntries = new List(); - partyListEntries.Add(new ListEntry(actorId, 0xFFFFFFFF, 0xFFFFFFFF, false, true, customDisplayName)); - partyListEntries.Add(new ListEntry(0x029B27D3, 0xFFFFFFFF, 0x195, false, true, "Valentine Bluefeather")); - BasePacket partyListPacket = BasePacket.CreatePacket(ListUtils.CreatePartyList(actorId, 0xF4, 1, 0x8000000000696df2, partyListEntries), true, false); - playerSession.QueuePacket(partyListPacket); - #endregion - - #region Inventory & Equipment - QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId)); - inventories[Inventory.NORMAL].SendFullInventory(); - inventories[Inventory.CURRENCY].SendFullInventory(); - inventories[Inventory.KEYITEMS].SendFullInventory(); - inventories[Inventory.BAZAAR].SendFullInventory(); - inventories[Inventory.MELDREQUEST].SendFullInventory(); - inventories[Inventory.LOOT].SendFullInventory(); - equipment.SendFullEquipment(false); - playerSession.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId), true, false); - #endregion - - playerSession.QueuePacket(GetInitPackets(actorId)); - - - BasePacket areaMasterSpawn = zone.GetSpawnPackets(actorId); - BasePacket debugSpawn = world.GetDebugActor().GetSpawnPackets(actorId); - BasePacket worldMasterSpawn = world.GetActor().GetSpawnPackets(actorId); - BasePacket weatherDirectorSpawn = new WeatherDirector(this, 8003).GetSpawnPackets(actorId); - BasePacket directorSpawn = null; - - if (currentDirector != null) - directorSpawn = currentDirector.GetSpawnPackets(actorId); - - playerSession.QueuePacket(areaMasterSpawn); - playerSession.QueuePacket(debugSpawn); - if (directorSpawn != null) - { - //directorSpawn.DebugPrintPacket(); - // currentDirector.GetInitPackets(actorId).DebugPrintPacket(); - QueuePacket(directorSpawn); - QueuePacket(currentDirector.GetInitPackets(actorId)); - //QueuePacket(currentDirector.GetSetEventStatusPackets(actorId)); - } - playerSession.QueuePacket(worldMasterSpawn); - - if (zone.isInn) - { - SetCutsceneBookPacket cutsceneBookPacket = new SetCutsceneBookPacket(); - for (int i = 0; i < 2048; i++) - cutsceneBookPacket.cutsceneFlags[i] = true; - - SubPacket packet = cutsceneBookPacket.BuildPacket(actorId, "", 11, 1, 1); - - packet.DebugPrintSubPacket(); - QueuePacket(packet); - } - - playerSession.QueuePacket(weatherDirectorSpawn); - -/* - #region hardcode - BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door Created - BasePacket reply11 = new BasePacket("./packets/login/login11.bin"); //NPC Create ??? Final init - reply10.ReplaceActorID(actorId); - reply11.ReplaceActorID(actorId); - //playerSession.QueuePacket(reply10); - // playerSession.QueuePacket(reply11); - #endregion -*/ - } - - private void SendRemoveInventoryPackets(List slots) - { - int currentIndex = 0; - - while (true) - { - if (slots.Count - currentIndex >= 64) - QueuePacket(InventoryRemoveX64Packet.BuildPacket(actorId, slots, ref currentIndex)); - else if (slots.Count - currentIndex >= 32) - QueuePacket(InventoryRemoveX32Packet.BuildPacket(actorId, slots, ref currentIndex)); - else if (slots.Count - currentIndex >= 16) - QueuePacket(InventoryRemoveX16Packet.BuildPacket(actorId, slots, ref currentIndex)); - else if (slots.Count - currentIndex >= 8) - QueuePacket(InventoryRemoveX08Packet.BuildPacket(actorId, slots, ref currentIndex)); - else if (slots.Count - currentIndex == 1) - QueuePacket(InventoryRemoveX01Packet.BuildPacket(actorId, slots[currentIndex])); - else - break; - } - - } - - public bool IsMyPlayer(uint otherActorId) - { - return actorId == otherActorId; - } - - public void QueuePacket(BasePacket packet) - { - playerSession.QueuePacket(packet); - } - - public void QueuePacket(SubPacket packet) - { - playerSession.QueuePacket(packet, true, false); - } - - public void QueuePackets(List packets) - { - foreach (SubPacket subpacket in packets) - playerSession.QueuePacket(subpacket, true, false); - } - + } + + public void SendZoneInPackets(WorldManager world, ushort spawnType) + { + QueuePacket(SetActorIsZoningPacket.BuildPacket(actorId, actorId, false)); + QueuePacket(_0x10Packet.BuildPacket(actorId, 0xFF)); + QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, 0x01)); + QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); + + QueuePacket(SetMapPacket.BuildPacket(actorId, zone.regionId, zone.actorId)); + + QueuePacket(GetSpawnPackets(actorId, spawnType)); + GetSpawnPackets(actorId, spawnType).DebugPrintPacket(); + + #region grouptest + //Retainers + List retainerListEntries = new List(); + retainerListEntries.Add(new ListEntry(actorId, 0xFFFFFFFF, 0x139E, false, true, customDisplayName)); + retainerListEntries.Add(new ListEntry(0x23, 0x0, 0xFFFFFFFF, false, false, "TEST1")); + retainerListEntries.Add(new ListEntry(0x24, 0x0, 0xFFFFFFFF, false, false, "TEST2")); + retainerListEntries.Add(new ListEntry(0x25, 0x0, 0xFFFFFFFF, false, false, "TEST3")); + BasePacket retainerListPacket = BasePacket.CreatePacket(ListUtils.CreateRetainerList(actorId, 0xF4, 1, 0x800000000004e639, retainerListEntries), true, false); + playerSession.QueuePacket(retainerListPacket); + + //Party + List partyListEntries = new List(); + partyListEntries.Add(new ListEntry(actorId, 0xFFFFFFFF, 0xFFFFFFFF, false, true, customDisplayName)); + partyListEntries.Add(new ListEntry(0x029B27D3, 0xFFFFFFFF, 0x195, false, true, "Valentine Bluefeather")); + BasePacket partyListPacket = BasePacket.CreatePacket(ListUtils.CreatePartyList(actorId, 0xF4, 1, 0x8000000000696df2, partyListEntries), true, false); + playerSession.QueuePacket(partyListPacket); + #endregion + + #region Inventory & Equipment + QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId)); + inventories[Inventory.NORMAL].SendFullInventory(); + inventories[Inventory.CURRENCY].SendFullInventory(); + inventories[Inventory.KEYITEMS].SendFullInventory(); + inventories[Inventory.BAZAAR].SendFullInventory(); + inventories[Inventory.MELDREQUEST].SendFullInventory(); + inventories[Inventory.LOOT].SendFullInventory(); + equipment.SendFullEquipment(false); + playerSession.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId), true, false); + #endregion + + playerSession.QueuePacket(GetInitPackets(actorId)); + + + BasePacket areaMasterSpawn = zone.GetSpawnPackets(actorId); + BasePacket debugSpawn = world.GetDebugActor().GetSpawnPackets(actorId); + BasePacket worldMasterSpawn = world.GetActor().GetSpawnPackets(actorId); + BasePacket weatherDirectorSpawn = new WeatherDirector(this, 8003).GetSpawnPackets(actorId); + BasePacket directorSpawn = null; + + if (currentDirector != null) + directorSpawn = currentDirector.GetSpawnPackets(actorId); + + playerSession.QueuePacket(areaMasterSpawn); + playerSession.QueuePacket(debugSpawn); + if (directorSpawn != null) + { + //directorSpawn.DebugPrintPacket(); + // currentDirector.GetInitPackets(actorId).DebugPrintPacket(); + QueuePacket(directorSpawn); + QueuePacket(currentDirector.GetInitPackets(actorId)); + //QueuePacket(currentDirector.GetSetEventStatusPackets(actorId)); + } + playerSession.QueuePacket(worldMasterSpawn); + + if (zone.isInn) + { + SetCutsceneBookPacket cutsceneBookPacket = new SetCutsceneBookPacket(); + for (int i = 0; i < 2048; i++) + cutsceneBookPacket.cutsceneFlags[i] = true; + + SubPacket packet = cutsceneBookPacket.BuildPacket(actorId, "", 11, 1, 1); + + packet.DebugPrintSubPacket(); + QueuePacket(packet); + } + + playerSession.QueuePacket(weatherDirectorSpawn); + +/* + #region hardcode + BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door Created + BasePacket reply11 = new BasePacket("./packets/login/login11.bin"); //NPC Create ??? Final init + reply10.ReplaceActorID(actorId); + reply11.ReplaceActorID(actorId); + //playerSession.QueuePacket(reply10); + // playerSession.QueuePacket(reply11); + #endregion +*/ + } + + private void SendRemoveInventoryPackets(List slots) + { + int currentIndex = 0; + + while (true) + { + if (slots.Count - currentIndex >= 64) + QueuePacket(InventoryRemoveX64Packet.BuildPacket(actorId, slots, ref currentIndex)); + else if (slots.Count - currentIndex >= 32) + QueuePacket(InventoryRemoveX32Packet.BuildPacket(actorId, slots, ref currentIndex)); + else if (slots.Count - currentIndex >= 16) + QueuePacket(InventoryRemoveX16Packet.BuildPacket(actorId, slots, ref currentIndex)); + else if (slots.Count - currentIndex >= 8) + QueuePacket(InventoryRemoveX08Packet.BuildPacket(actorId, slots, ref currentIndex)); + else if (slots.Count - currentIndex == 1) + QueuePacket(InventoryRemoveX01Packet.BuildPacket(actorId, slots[currentIndex])); + else + break; + } + + } + + public bool IsMyPlayer(uint otherActorId) + { + return actorId == otherActorId; + } + + public void QueuePacket(BasePacket packet) + { + playerSession.QueuePacket(packet); + } + + public void QueuePacket(SubPacket packet) + { + playerSession.QueuePacket(packet, true, false); + } + + public void QueuePackets(List packets) + { + foreach (SubPacket subpacket in packets) + playerSession.QueuePacket(subpacket, true, false); + } + public void SendPacket(string path) { try @@ -619,666 +619,656 @@ namespace FFXIVClassic_Map_Server.Actors { this.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "[SendPacket]", "Unable to send packet."); } - } - - public void BroadcastPacket(SubPacket packet, bool sendToSelf) - { - if (sendToSelf) - QueuePacket(packet); - - foreach (Actor a in playerSession.actorInstanceList) - { - if (a is Player) - { - Player p = (Player)a; - SubPacket clonedPacket = new SubPacket(packet, a.actorId); - p.QueuePacket(clonedPacket); - } - } - } - - public void SetDCFlag(bool flag) - { - if (flag) - { - BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, SetActorIconPacket.DISCONNECTING), true); - } - else - { - if (isGM) - BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, SetActorIconPacket.ISGM), true); - else - BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, 0), true); - } - } - - public void CleanupAndSave() - { - //Remove actor from zone and main server list - zone.RemoveActorFromZone(this); - Server.GetServer().RemovePlayer(this); - - //Save Player - Database.SavePlayerPlayTime(this); - Database.SavePlayerPosition(this); - - Program.Log.Info("{0} has been logged out and saved.", this.customDisplayName); - } - - public Area GetZone() - { - return zone; - } - - public void SendMessage(uint logType, string sender, string message) - { - QueuePacket(SendMessagePacket.BuildPacket(actorId, actorId, logType, sender, message)); - } - - public void Logout() - { - QueuePacket(LogoutPacket.BuildPacket(actorId)); - CleanupAndSave(); - } - - public void QuitGame() - { - QueuePacket(QuitPacket.BuildPacket(actorId)); - CleanupAndSave(); - } - - public uint GetPlayTime(bool doUpdate) - { - if (doUpdate) - { - uint curTime = Utils.UnixTimeStampUTC(); - playTime += curTime - lastPlayTimeUpdate; - lastPlayTimeUpdate = curTime; - } - - return playTime; - } - - public void ChangeMusic(ushort musicId) - { - QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1)); - } - - public void ChangeMusicWithEffect(ushort musicId, ushort effect) + } + + public void BroadcastPacket(SubPacket packet, bool sendToSelf) { - QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, effect)); - } - - public void SendChocoboAppearance() - { - BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance), true); - } - - public void SendGoobbueAppearance() - { - BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1), true); - } - - public void SetMountState(byte mountState) - { - this.mountState = mountState; - } - - public byte GetMountState() - { - return mountState; - } - - public void DoEmote(uint emoteId) - { - BroadcastPacket(ActorDoEmotePacket.BuildPacket(actorId, actorId, currentTarget, emoteId), true); - } - - public void SendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams) - { - if (msgParams.Length == 0) - { - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log)); - } - else - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); - } - - public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams) - { - if (msgParams.Length == 0) - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log)); - else - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); - } - - public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams) - { - if (msgParams.Length == 0) - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log)); - else - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams))); - } - - public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams) - { - if (msgParams.Length == 0) - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log)); - else - QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams))); - } - - public void BroadcastWorldMessage(ushort worldMasterId, params object[] msgParams) - { - //SubPacket worldMasterMessage = - //zone.BroadcastPacketAroundActor(this, worldMasterMessage); - } - - public void GraphicChange(uint slot, uint graphicId) - { - appearanceIds[slot] = graphicId; - } - - public void GraphicChange(uint slot, uint weapId, uint equipId, uint variantId, uint colorId) - { - - uint mixedVariantId; - - if (weapId == 0) - mixedVariantId = ((variantId & 0x1F) << 5) | colorId; - else - mixedVariantId = variantId; - - uint graphicId = - (weapId & 0x3FF) << 20 | - (equipId & 0x3FF) << 10 | - (mixedVariantId & 0x3FF); - - appearanceIds[slot] = graphicId; - - } - - public void SendAppearance() - { - BroadcastPacket(CreateAppearancePacket(actorId), true); - } - - public void SendCharaExpInfo() - { - if (lastStep == 0) - { - int maxLength; - if ((sizeof(short) * charaWork.battleSave.skillLevel.Length)-lastPosition < 0x5E) - maxLength = (sizeof(short) * charaWork.battleSave.skillLevel.Length) - lastPosition; - else - maxLength = 0x5E; - - byte[] skillLevelBuffer = new byte[maxLength]; - Buffer.BlockCopy(charaWork.battleSave.skillLevel, 0, skillLevelBuffer, 0, skillLevelBuffer.Length); - SetActorPropetyPacket charaInfo1 = new SetActorPropetyPacket("charaWork/exp"); - - charaInfo1.SetIsArrayMode(true); - if (maxLength == 0x5E) - { - charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x0); - lastPosition += maxLength; - } - else - { - charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x3); - lastPosition = 0; - lastStep++; - } - - charaInfo1.AddTarget(); - - QueuePacket(charaInfo1.BuildPacket(actorId, actorId)); - } - else if (lastStep == 1) - { - int maxLength; - if ((sizeof(short) * charaWork.battleSave.skillLevelCap.Length) - lastPosition < 0x5E) - maxLength = (sizeof(short) * charaWork.battleSave.skillLevelCap.Length) - lastPosition; - else - maxLength = 0x5E; - - byte[] skillCapBuffer = new byte[maxLength]; - Buffer.BlockCopy(charaWork.battleSave.skillLevelCap, lastPosition, skillCapBuffer, 0, skillCapBuffer.Length); - SetActorPropetyPacket charaInfo1 = new SetActorPropetyPacket("charaWork/exp"); - - - if (maxLength == 0x5E) - { - charaInfo1.SetIsArrayMode(true); - charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x1); - lastPosition += maxLength; - } - else - { - charaInfo1.SetIsArrayMode(false); - charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x3); - lastStep = 0; - lastPosition = 0; - } - - charaInfo1.AddTarget(); - - QueuePacket(charaInfo1.BuildPacket(actorId, actorId)); - } - - } - - public InventoryItem[] GetGearset(ushort classId) - { - return Database.GetEquipment(this, classId); - } - - public void PrepareClassChange(byte classId) - { - //If new class, init abilties and level - - SendCharaExpInfo(); - } - - public void DoClassChange(byte classId) - { - //load hotbars - //Calculate stats - //Calculate hp/mp - - //Get Potenciel ?????? - - //Set HP/MP/TP PARAMS - - //Set mainskill and level - - //Set Parameters - - //Set current EXP - - //Set Hotbar Commands 1 - //Set Hotbar Commands 2 - //Set Hotbar Commands 3 - - //Check if bonus point available... set - - //Set rested EXP - - charaWork.parameterSave.state_mainSkill[0] = classId; - charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1]; - - playerWork.restBonusExpRate = 0.0f; - - ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this, actorId); - - propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); - propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); - propertyBuilder.NewTarget("playerWork/expBonus"); - propertyBuilder.AddProperty("playerWork.restBonusExpRate"); - - List packets = propertyBuilder.Done(); - - foreach (SubPacket packet in packets) - BroadcastPacket(packet, true); - - Database.SavePlayerCurrentClass(this); - } - - public void GraphicChange(int slot, InventoryItem invItem) - { - if (invItem == null) - appearanceIds[slot] = 0; - else - { - Item item = Server.GetItemGamedata(invItem.itemId); - if (item is EquipmentItem) - { - EquipmentItem eqItem = (EquipmentItem)item; - - uint mixedVariantId; - - if (eqItem.graphicsWeaponId == 0) - mixedVariantId = ((eqItem.graphicsVariantId & 0x1F) << 5) | eqItem.graphicsColorId; - else - mixedVariantId = eqItem.graphicsVariantId; - - uint graphicId = - (eqItem.graphicsWeaponId & 0x3FF) << 20 | - (eqItem.graphicsEquipmentId & 0x3FF) << 10 | - (mixedVariantId & 0x3FF); - - appearanceIds[slot] = graphicId; - } - } - - Database.SavePlayerAppearance(this); - - BroadcastPacket(CreateAppearancePacket(actorId), true); - } - - public Inventory GetInventory(ushort type) - { - if (inventories.ContainsKey(type)) - return inventories[type]; - else - return null; - } - - public Actor GetActorInInstance(uint actorId) - { - foreach (Actor a in playerSession.actorInstanceList) - { - if (a.actorId == actorId) - return a; - } - - return null; - } - - public void SetZoneChanging(bool flag) - { - isZoneChanging = flag; - } - - public bool IsInZoneChange() - { - return isZoneChanging; - } - - public Equipment GetEquipment() - { - return equipment; - } - - public byte GetInitialTown() - { - return playerWork.initialTown; - } - - public int GetFreeQuestSlot() - { - for (int i = 0; i < questScenario.Length; i++) - { - if (questScenario[i] == null) - return i; - } - - return -1; - } - - public void AddQuest(uint id) - { - Actor actor = Server.GetStaticActors((0xA0F00000 | id)); - AddQuest(actor.actorName); - } - - public void AddQuest(string name) - { - Actor actor = Server.GetStaticActors(name); - - if (actor == null) - return; - - uint id = actor.actorId; - - int freeSlot = GetFreeQuestSlot(); - - if (freeSlot == -1) - return; - - playerWork.questScenario[freeSlot] = id; - questScenario[freeSlot] = new Quest(this, playerWork.questScenario[freeSlot], name, null, 0); - Database.SaveQuest(this, questScenario[freeSlot]); - } - - public Quest GetQuest(uint id) - { - for (int i = 0; i < questScenario.Length; i++) - { - if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) - return questScenario[i]; - } - - return null; - } - - public Quest GetQuest(string name) - { - for (int i = 0; i < questScenario.Length; i++) - { - if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower())) - return questScenario[i]; - } - - return null; - } - - public bool HasQuest(string name) - { - for (int i = 0; i < questScenario.Length; i++) - { - if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower())) - return true; - } - - return false; - } - - public bool HasQuest(uint id) - { - for (int i = 0; i < questScenario.Length; i++) - { - if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) - return true; - } - - return false; - } - - public int GetQuestSlot(uint id) - { - for (int i = 0; i < questScenario.Length; i++) - { - if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) - return i; - } - - return -1; - } - - public void SetDirector(string directorType, bool sendPackets) - { - if (directorType.Equals("openingDirector")) - { - currentDirector = new OpeningDirector(this, 0x46080012); - } - else if (directorType.Equals("QuestDirectorMan0l001")) - { - currentDirector = new QuestDirectorMan0l001(this, 0x46080012); - } - else if (directorType.Equals("QuestDirectorMan0g001")) - { - currentDirector = new QuestDirectorMan0g001(this, 0x46080012); - } - else if (directorType.Equals("QuestDirectorMan0u001")) - { - currentDirector = new QuestDirectorMan0u001(this, 0x46080012); - } - - if (sendPackets) - { - QueuePacket(RemoveActorPacket.BuildPacket(actorId, 0x46080012)); - QueuePacket(currentDirector.GetSpawnPackets(actorId)); - QueuePacket(currentDirector.GetInitPackets(actorId)); - //QueuePacket(currentDirector.GetSetEventStatusPackets(actorId)); - //currentDirector.GetSpawnPackets(actorId).DebugPrintPacket(); - //currentDirector.GetInitPackets(actorId).DebugPrintPacket(); - } - - } - - public Director GetDirector() - { - return currentDirector; - } - - public void ExaminePlayer(Actor examinee) - { - Player toBeExamined; - if (examinee is Player) - toBeExamined = (Player)examinee; - else - return; - - QueuePacket(InventoryBeginChangePacket.BuildPacket(toBeExamined.actorId, actorId)); - toBeExamined.GetEquipment().SendCheckEquipmentToPlayer(this); - QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId)); - } - - public void SendRequestedInfo(params object[] parameters) - { - List lParams = LuaUtils.CreateLuaParamList(parameters); - SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams); - spacket.DebugPrintSubPacket(); - QueuePacket(spacket); - } - - public void StartEvent(Actor owner, EventStartPacket start) - { - //Have to do this to combine LuaParams - List objects = new List(); - objects.Add(this); - objects.Add(owner); - objects.Add(start.triggerName); - - if (start.luaParams != null) - objects.AddRange(LuaUtils.CreateLuaParamObjectList(start.luaParams)); - - if (owner is Npc) - { - currentEventRunning = ((Npc)owner).GetEventStartCoroutine(this); - - if (currentEventRunning != null) - { - try - { - currentEventRunning.Resume(objects.ToArray()); - } - catch (ScriptRuntimeException e) - { - Program.Log.Error("[LUA] {0}", e.DecoratedMessage); - EndEvent(); - } - } - else - { - EndEvent(); - } - } - else - { - currentEventRunning = LuaEngine.DoActorOnEventStarted(this, owner, start); - - if (currentEventRunning != null) - { - try - { - currentEventRunning.Resume(objects.ToArray()); - } - catch (ScriptRuntimeException e) - { - Program.Log.Error("[LUA] {0}", e.DecoratedMessage); - EndEvent(); - } - } - else - { - EndEvent(); - } - } - - } - - public void UpdateEvent(EventUpdatePacket update) - { - if (currentEventRunning == null) - return; - - if (currentEventRunning.State == CoroutineState.Suspended) - { - try - { - currentEventRunning.Resume(LuaUtils.CreateLuaParamObjectList(update.luaParams)); - } - catch (ScriptRuntimeException e) - { - Program.Log.Error("[LUA] {0}", e.DecoratedMessage); - EndEvent(); - } - } - } - - public void KickEvent(Actor actor, string conditionName, params object[] parameters) - { - if (actor == null) - return; - - List lParams = LuaUtils.CreateLuaParamList(parameters); - SubPacket spacket = KickEventPacket.BuildPacket(actorId, actor.actorId, conditionName, lParams); - spacket.DebugPrintSubPacket(); - QueuePacket(spacket); - } - - public void SetEventStatus(Actor actor, string conditionName, bool enabled, byte unknown) - { - QueuePacket(packets.send.actor.events.SetEventStatus.BuildPacket(actorId, actor.actorId, enabled, unknown, conditionName)); - } - - public void RunEventFunction(string functionName, params object[] parameters) - { - List lParams = LuaUtils.CreateLuaParamList(parameters); - SubPacket spacket = RunEventFunctionPacket.BuildPacket(actorId, currentEventOwner, currentEventName, functionName, lParams); - spacket.DebugPrintSubPacket(); - QueuePacket(spacket); - } - - public void EndEvent() - { - SubPacket p = EndEventPacket.BuildPacket(actorId, currentEventOwner, currentEventName); - p.DebugPrintSubPacket(); - QueuePacket(p); - - currentEventOwner = 0; - currentEventName = ""; - currentEventRunning = null; - } - - public void SendInstanceUpdate() + if (sendToSelf) + QueuePacket(packet); + + foreach (Actor a in playerSession.actorInstanceList) + { + if (a is Player) + { + Player p = (Player)a; + SubPacket clonedPacket = new SubPacket(packet, a.actorId); + p.QueuePacket(clonedPacket); + } + } + } + + public void SetDCFlag(bool flag) + { + if (flag) + { + BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, SetActorIconPacket.DISCONNECTING), true); + } + else + { + if (isGM) + BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, SetActorIconPacket.ISGM), true); + else + BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, 0), true); + } + } + + public void CleanupAndSave() + { + //Remove actor from zone and main server list + zone.RemoveActorFromZone(this); + Server.GetServer().RemovePlayer(this); + + //Save Player + Database.SavePlayerPlayTime(this); + Database.SavePlayerPosition(this); + + Program.Log.Info("{0} has been logged out and saved.", this.customDisplayName); + } + + public Area GetZone() + { + return zone; + } + + public void SendMessage(uint logType, string sender, string message) + { + QueuePacket(SendMessagePacket.BuildPacket(actorId, actorId, logType, sender, message)); + } + + public void Logout() + { + QueuePacket(LogoutPacket.BuildPacket(actorId)); + CleanupAndSave(); + } + + public void QuitGame() + { + QueuePacket(QuitPacket.BuildPacket(actorId)); + CleanupAndSave(); + } + + public uint GetPlayTime(bool doUpdate) + { + if (doUpdate) + { + uint curTime = Utils.UnixTimeStampUTC(); + playTime += curTime - lastPlayTimeUpdate; + lastPlayTimeUpdate = curTime; + } + + return playTime; + } + + public void ChangeMusic(ushort musicId) + { + QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1)); + } + + public void SendChocoboAppearance() + { + BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance), true); + } + + public void SendGoobbueAppearance() + { + BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1), true); + } + + public void SetMountState(byte mountState) + { + this.mountState = mountState; + } + + public byte GetMountState() + { + return mountState; + } + + public void DoEmote(uint emoteId) + { + BroadcastPacket(ActorDoEmotePacket.BuildPacket(actorId, actorId, currentTarget, emoteId), true); + } + + public void SendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams) + { + if (msgParams.Length == 0) + { + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log)); + } + else + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); + } + + public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams) + { + if (msgParams.Length == 0) + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log)); + else + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); + } + + public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams) + { + if (msgParams.Length == 0) + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log)); + else + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams))); + } + + public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams) + { + if (msgParams.Length == 0) + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log)); + else + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams))); + } + + public void BroadcastWorldMessage(ushort worldMasterId, params object[] msgParams) + { + //SubPacket worldMasterMessage = + //zone.BroadcastPacketAroundActor(this, worldMasterMessage); + } + + public void GraphicChange(uint slot, uint graphicId) + { + appearanceIds[slot] = graphicId; + } + + public void GraphicChange(uint slot, uint weapId, uint equipId, uint variantId, uint colorId) { - Server.GetWorldManager().SeamlessCheck(this); - + uint mixedVariantId; + + if (weapId == 0) + mixedVariantId = ((variantId & 0x1F) << 5) | colorId; + else + mixedVariantId = variantId; + + uint graphicId = + (weapId & 0x3FF) << 20 | + (equipId & 0x3FF) << 10 | + (mixedVariantId & 0x3FF); + + appearanceIds[slot] = graphicId; + + } + + public void SendAppearance() + { + BroadcastPacket(CreateAppearancePacket(actorId), true); + } + + public void SendCharaExpInfo() + { + if (lastStep == 0) + { + int maxLength; + if ((sizeof(short) * charaWork.battleSave.skillLevel.Length)-lastPosition < 0x5E) + maxLength = (sizeof(short) * charaWork.battleSave.skillLevel.Length) - lastPosition; + else + maxLength = 0x5E; + + byte[] skillLevelBuffer = new byte[maxLength]; + Buffer.BlockCopy(charaWork.battleSave.skillLevel, 0, skillLevelBuffer, 0, skillLevelBuffer.Length); + SetActorPropetyPacket charaInfo1 = new SetActorPropetyPacket("charaWork/exp"); + + charaInfo1.SetIsArrayMode(true); + if (maxLength == 0x5E) + { + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x0); + lastPosition += maxLength; + } + else + { + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x3); + lastPosition = 0; + lastStep++; + } + + charaInfo1.AddTarget(); + + QueuePacket(charaInfo1.BuildPacket(actorId, actorId)); + } + else if (lastStep == 1) + { + int maxLength; + if ((sizeof(short) * charaWork.battleSave.skillLevelCap.Length) - lastPosition < 0x5E) + maxLength = (sizeof(short) * charaWork.battleSave.skillLevelCap.Length) - lastPosition; + else + maxLength = 0x5E; + + byte[] skillCapBuffer = new byte[maxLength]; + Buffer.BlockCopy(charaWork.battleSave.skillLevelCap, lastPosition, skillCapBuffer, 0, skillCapBuffer.Length); + SetActorPropetyPacket charaInfo1 = new SetActorPropetyPacket("charaWork/exp"); + + + if (maxLength == 0x5E) + { + charaInfo1.SetIsArrayMode(true); + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x1); + lastPosition += maxLength; + } + else + { + charaInfo1.SetIsArrayMode(false); + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x3); + lastStep = 0; + lastPosition = 0; + } + + charaInfo1.AddTarget(); + + QueuePacket(charaInfo1.BuildPacket(actorId, actorId)); + } + + } + + public InventoryItem[] GetGearset(ushort classId) + { + return Database.GetEquipment(this, classId); + } + + public void PrepareClassChange(byte classId) + { + //If new class, init abilties and level + + SendCharaExpInfo(); + } + + public void DoClassChange(byte classId) + { + //load hotbars + //Calculate stats + //Calculate hp/mp + + //Get Potenciel ?????? + + //Set HP/MP/TP PARAMS + + //Set mainskill and level + + //Set Parameters + + //Set current EXP + + //Set Hotbar Commands 1 + //Set Hotbar Commands 2 + //Set Hotbar Commands 3 + + //Check if bonus point available... set + + //Set rested EXP + + charaWork.parameterSave.state_mainSkill[0] = classId; + charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1]; + + playerWork.restBonusExpRate = 0.0f; + + ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this, actorId); + + propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); + propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); + propertyBuilder.NewTarget("playerWork/expBonus"); + propertyBuilder.AddProperty("playerWork.restBonusExpRate"); + + List packets = propertyBuilder.Done(); + + foreach (SubPacket packet in packets) + BroadcastPacket(packet, true); + + Database.SavePlayerCurrentClass(this); + } + + public void GraphicChange(int slot, InventoryItem invItem) + { + if (invItem == null) + appearanceIds[slot] = 0; + else + { + Item item = Server.GetItemGamedata(invItem.itemId); + if (item is EquipmentItem) + { + EquipmentItem eqItem = (EquipmentItem)item; + + uint mixedVariantId; + + if (eqItem.graphicsWeaponId == 0) + mixedVariantId = ((eqItem.graphicsVariantId & 0x1F) << 5) | eqItem.graphicsColorId; + else + mixedVariantId = eqItem.graphicsVariantId; + + uint graphicId = + (eqItem.graphicsWeaponId & 0x3FF) << 20 | + (eqItem.graphicsEquipmentId & 0x3FF) << 10 | + (mixedVariantId & 0x3FF); + + appearanceIds[slot] = graphicId; + } + } + + Database.SavePlayerAppearance(this); + + BroadcastPacket(CreateAppearancePacket(actorId), true); + } + + public Inventory GetInventory(ushort type) + { + if (inventories.ContainsKey(type)) + return inventories[type]; + else + return null; + } + + public Actor GetActorInInstance(uint actorId) + { + foreach (Actor a in playerSession.actorInstanceList) + { + if (a.actorId == actorId) + return a; + } + + return null; + } + + public void SetZoneChanging(bool flag) + { + isZoneChanging = flag; + } + + public bool IsInZoneChange() + { + return isZoneChanging; + } + + public Equipment GetEquipment() + { + return equipment; + } + + public byte GetInitialTown() + { + return playerWork.initialTown; + } + + public int GetFreeQuestSlot() + { + for (int i = 0; i < questScenario.Length; i++) + { + if (questScenario[i] == null) + return i; + } + + return -1; + } + + public void AddQuest(uint id) + { + Actor actor = Server.GetStaticActors((0xA0F00000 | id)); + AddQuest(actor.actorName); + } + + public void AddQuest(string name) + { + Actor actor = Server.GetStaticActors(name); + + if (actor == null) + return; + + uint id = actor.actorId; + + int freeSlot = GetFreeQuestSlot(); + + if (freeSlot == -1) + return; + + playerWork.questScenario[freeSlot] = id; + questScenario[freeSlot] = new Quest(this, playerWork.questScenario[freeSlot], name, null, 0); + Database.SaveQuest(this, questScenario[freeSlot]); + } + + public Quest GetQuest(uint id) + { + for (int i = 0; i < questScenario.Length; i++) + { + if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) + return questScenario[i]; + } + + return null; + } + + public Quest GetQuest(string name) + { + for (int i = 0; i < questScenario.Length; i++) + { + if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower())) + return questScenario[i]; + } + + return null; + } + + public bool HasQuest(string name) + { + for (int i = 0; i < questScenario.Length; i++) + { + if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower())) + return true; + } + + return false; + } + + public bool HasQuest(uint id) + { + for (int i = 0; i < questScenario.Length; i++) + { + if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) + return true; + } + + return false; + } + + public int GetQuestSlot(uint id) + { + for (int i = 0; i < questScenario.Length; i++) + { + if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) + return i; + } + + return -1; + } + + public void SetDirector(string directorType, bool sendPackets) + { + if (directorType.Equals("openingDirector")) + { + currentDirector = new OpeningDirector(this, 0x46080012); + } + else if (directorType.Equals("QuestDirectorMan0l001")) + { + currentDirector = new QuestDirectorMan0l001(this, 0x46080012); + } + else if (directorType.Equals("QuestDirectorMan0g001")) + { + currentDirector = new QuestDirectorMan0g001(this, 0x46080012); + } + else if (directorType.Equals("QuestDirectorMan0u001")) + { + currentDirector = new QuestDirectorMan0u001(this, 0x46080012); + } + + if (sendPackets) + { + QueuePacket(RemoveActorPacket.BuildPacket(actorId, 0x46080012)); + QueuePacket(currentDirector.GetSpawnPackets(actorId)); + QueuePacket(currentDirector.GetInitPackets(actorId)); + //QueuePacket(currentDirector.GetSetEventStatusPackets(actorId)); + //currentDirector.GetSpawnPackets(actorId).DebugPrintPacket(); + //currentDirector.GetInitPackets(actorId).DebugPrintPacket(); + } + + } + + public Director GetDirector() + { + return currentDirector; + } + + public void ExaminePlayer(Actor examinee) + { + Player toBeExamined; + if (examinee is Player) + toBeExamined = (Player)examinee; + else + return; + + QueuePacket(InventoryBeginChangePacket.BuildPacket(toBeExamined.actorId, actorId)); + toBeExamined.GetEquipment().SendCheckEquipmentToPlayer(this); + QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId)); + } + + public void SendRequestedInfo(params object[] parameters) + { + List lParams = LuaUtils.CreateLuaParamList(parameters); + SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams); + spacket.DebugPrintSubPacket(); + QueuePacket(spacket); + } + + public void StartEvent(Actor owner, EventStartPacket start) + { + //Have to do this to combine LuaParams + List objects = new List(); + objects.Add(this); + objects.Add(owner); + objects.Add(start.triggerName); + + if (start.luaParams != null) + objects.AddRange(LuaUtils.CreateLuaParamObjectList(start.luaParams)); + + if (owner is Npc) + { + currentEventRunning = ((Npc)owner).GetEventStartCoroutine(this); + + if (currentEventRunning != null) + { + try + { + currentEventRunning.Resume(objects.ToArray()); + } + catch (ScriptRuntimeException e) + { + Program.Log.Error("[LUA] {0}", e.DecoratedMessage); + EndEvent(); + } + } + else + { + EndEvent(); + } + } + else + { + currentEventRunning = LuaEngine.DoActorOnEventStarted(this, owner, start); + + if (currentEventRunning != null) + { + try + { + currentEventRunning.Resume(objects.ToArray()); + } + catch (ScriptRuntimeException e) + { + Program.Log.Error("[LUA] {0}", e.DecoratedMessage); + EndEvent(); + } + } + else + { + EndEvent(); + } + } + + } + + public void UpdateEvent(EventUpdatePacket update) + { + if (currentEventRunning == null) + return; + + if (currentEventRunning.State == CoroutineState.Suspended) + { + try + { + currentEventRunning.Resume(LuaUtils.CreateLuaParamObjectList(update.luaParams)); + } + catch (ScriptRuntimeException e) + { + Program.Log.Error("[LUA] {0}", e.DecoratedMessage); + EndEvent(); + } + } + } + + public void KickEvent(Actor actor, string conditionName, params object[] parameters) + { + if (actor == null) + return; + + List lParams = LuaUtils.CreateLuaParamList(parameters); + SubPacket spacket = KickEventPacket.BuildPacket(actorId, actor.actorId, conditionName, lParams); + spacket.DebugPrintSubPacket(); + QueuePacket(spacket); + } + + public void SetEventStatus(Actor actor, string conditionName, bool enabled, byte unknown) + { + QueuePacket(packets.send.actor.events.SetEventStatus.BuildPacket(actorId, actor.actorId, enabled, unknown, conditionName)); + } + + public void RunEventFunction(string functionName, params object[] parameters) + { + List lParams = LuaUtils.CreateLuaParamList(parameters); + SubPacket spacket = RunEventFunctionPacket.BuildPacket(actorId, currentEventOwner, currentEventName, functionName, lParams); + spacket.DebugPrintSubPacket(); + QueuePacket(spacket); + } + + public void EndEvent() + { + SubPacket p = EndEventPacket.BuildPacket(actorId, currentEventOwner, currentEventName); + p.DebugPrintSubPacket(); + QueuePacket(p); + + currentEventOwner = 0; + currentEventName = ""; + currentEventRunning = null; + } + + public void SendInstanceUpdate() + { + + Server.GetWorldManager().SeamlessCheck(this); + //Update Instance List aroundMe = new List(); aroundMe.AddRange(zone.GetActorsAroundActor(this, 50)); if (zone2 != null) aroundMe.AddRange(zone2.GetActorsAroundActor(this, 50)); - playerSession.UpdateInstance(aroundMe); - - } - - public void issueChocobo(byte appearanceId, string name) + playerSession.UpdateInstance(aroundMe); + + } + + public void IssueChocobo(byte appearanceId, string nameResponse) { - Database.IssuePlayerChocobo(this, appearanceId, name); + Database.IssuePlayerChocobo(this, appearanceId, nameResponse); hasChocobo = true; chocoboAppearance = appearanceId; - chocoboName = name; - } - - public void changeChocoboAppearance(int appearanceId) - { - - } - } -} + chocoboName = nameResponse; + } + } +} diff --git a/FFXIVClassic Map Server/lua/LuaPlayer.cs b/FFXIVClassic Map Server/lua/LuaPlayer.cs index 5ad16978..aa2aa5b7 100644 --- a/FFXIVClassic Map Server/lua/LuaPlayer.cs +++ b/FFXIVClassic Map Server/lua/LuaPlayer.cs @@ -25,6 +25,11 @@ namespace FFXIVClassic_Map_Server.lua player.playerSession.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weatherID, 1), true, false); } + public void IssueChocobo(int appearanceId, string name) + { + player.IssueChocobo((byte) appearanceId, name); + } + public void GetParameter(string paramName) { From 00e5e4f642bcf3f7dddae6766c61ca259e74462d Mon Sep 17 00:00:00 2001 From: Jordan Maxwell Date: Fri, 19 Aug 2016 17:43:04 -0500 Subject: [PATCH 09/19] Updated Chocobo Lender script --- FFXIVClassic Map Server/WorldManager.cs | 2 - .../npc/populace/PopulaceChocoboLender.lua | 55 ++++++++++++++----- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/FFXIVClassic Map Server/WorldManager.cs b/FFXIVClassic Map Server/WorldManager.cs index aa5bdfe5..34e0f189 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -735,7 +735,5 @@ namespace FFXIVClassic_Map_Server else return null; } - } - } diff --git a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 62ba4f81..9f73179f 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -21,39 +21,45 @@ end function onEventStarted(player, npc, triggerName) - local curLevel = 20; - local hasIssuance = true; + local curLevel = 20; -- TODO: pull from character + local hasIssuance = true; -- TODO: pull from character local hasChocobo = player.hasChocobo; - if (player.isGM and hasChocobo == false) then + if (player.isGM and hasChocobo == false) then -- Let GMs auto have the issuance for debugging hasIssuance = true; end + if (hasChocobo) then + hasIssuance = false; + end + local rentPrice = 800; local playerFunds = 0; --TODO: pull character's money local hasFunds = (playerFunds >= rentPrice); callClientFunction(player, "eventTalkWelcome", player); - menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, hasChocobo, hasChocobo, 4); + local menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, hasChocobo, hasChocobo, 4); if (menuChoice == 1) then -- Issuance option callClientFunction(player, "eventTalkMyChocobo", player); - nameResponse = callClientFunction(player, "eventSetChocoboName", false); + local nameResponse = callClientFunction(player, "eventSetChocoboName", false); if (nameResponse == "") then -- Cancel Chocobo naming - callClientFunction(player, "eventCancelChocoboName", player); + local cancelState = callClientFunction(player, "eventCancelChocoboName", player); + --Do anything with cancel state? end - appearance = 1; -- TODO: pull correct appearance based on GC - --player:issueChocobo(appearance, nameResponse); + local appearance = 1; -- TODO: pull correct appearance based on GC + player:IssueChocobo(appearance, nameResponse); if (nameResponse ~= "") then -- Successfully named Chocobo callClientFunction(player, "eventAfterChocoboName", player); end - elseif(menuChoice == 2 and hasChocobo) then -- Summon Bird - player:ChangeMusic(83); - player:SendChocoboAppearance(); - player:SendGameMessage(player, worldMaster, 26001, 0x20); - player:SetMountState(1); + + mountChocobo(player); + teleportOutOfCity(player); + elseif(menuChoice == 2) then -- Summon Bird + mountChocobo(player); + teleportOutOfCity(player); elseif(menuChoice == 3) then -- Change Barding callClientFunction(player, "eventTalkStepBreak", player); elseif(menuChoice == 5) then -- Rent Bird @@ -67,4 +73,27 @@ function onEventStarted(player, npc, triggerName) end player:EndEvent(); +end + +function mountChocobo(player) + --TODO fix this + --[[ + player:ChangeMusic(83); + player:SendChocoboAppearance(); + player:SendGameMessage(player, worldMaster, 26001, 0x20); + player:SetMountState(1); + ]] +end + +function teleportOutOfCity(player) + --TODO: Teleport out of city + local zoneId = player:GetPos()[4]; + local worldManager = GetWorldManager(); + if(zoneId == 155) then --Gridania + worldManager:DoZoneChange(player, 150, nil, 0x02, 319, 4, -996, 0.00); + elseif(zoneId == 133) then -- Limsa + worldManager:DoZoneChange(player, 133, nil, 0x02, -73, 30, 169, 2); + elseif(zoneId == 175) then -- Ul'dah + + end end \ No newline at end of file From 685fe7dd5ae050fc143fae8241c7df40c613d919 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 20 Aug 2016 19:16:33 -0400 Subject: [PATCH 10/19] Fixed and improved a bunch of the recently commit Support Desk tables and database accessors. Removed a file that doesn't exist added from last commit. --- FFXIVClassic Map Server/Database.cs | 36 +++++----- .../FFXIVClassic Map Server.csproj | 1 - sql/supportdesk_faqs.sql | 70 ++++++------------- sql/supportdesk_issues.sql | 70 ++++++------------- sql/supportdesk_tickets.sql | 68 ++++++------------ 5 files changed, 79 insertions(+), 166 deletions(-) diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 1860ba61..1a3b80da 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -1260,12 +1260,11 @@ namespace FFXIVClassic_Map_Server query = @" INSERT INTO supportdesk_tickets - (id, title, body, langCode) + (title, body, langCode) VALUES - (@id, @title, @body, @langCode)"; + (@title, @body, @langCode)"; cmd = new MySqlCommand(query, conn); - cmd.Parameters.AddWithValue("@id", gmTicket.ticketIssueIndex); cmd.Parameters.AddWithValue("@title", gmTicket.ticketTitle); cmd.Parameters.AddWithValue("@body", gmTicket.ticketBody); cmd.Parameters.AddWithValue("@langCode", gmTicket.langCode); @@ -1283,7 +1282,7 @@ namespace FFXIVClassic_Map_Server } } - public static string[] getFAQNames(uint lanCode = 1) + public static string[] getFAQNames(uint langCode = 1) { string[] faqs = null; List raw = new List(); @@ -1295,20 +1294,21 @@ namespace FFXIVClassic_Map_Server string query = @" SELECT - id, - label, - sort + title FROM supportdesk_faqs - ORDER BY sort"; + WHERE languageCode = @langCode + ORDER BY slot + "; MySqlCommand cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@langCode", langCode); + using (MySqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { - uint id = reader.GetUInt32(0); - string label = reader.GetString(1); + string label = reader.GetString(0); raw.Add(label); } } @@ -1326,7 +1326,7 @@ namespace FFXIVClassic_Map_Server return faqs; } - public static string getFAQBody(uint id, uint lanCode = 1) + public static string getFAQBody(uint slot, uint langCode = 1) { string body = string.Empty; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -1339,10 +1339,11 @@ namespace FFXIVClassic_Map_Server SELECT body FROM supportdesk_faqs - WHERE id=@id"; + WHERE slot=@slot and languageCode=@langCode"; MySqlCommand cmd = new MySqlCommand(query, conn); - cmd.Parameters.AddWithValue("@id", id); + cmd.Parameters.AddWithValue("@slot", slot); + cmd.Parameters.AddWithValue("@langCode", langCode); using (MySqlDataReader reader = cmd.ExecuteReader()) { @@ -1376,11 +1377,9 @@ namespace FFXIVClassic_Map_Server string query = @" SELECT - id, - title, - sort + title FROM supportdesk_issues - ORDER BY sort"; + ORDER BY slot"; MySqlCommand cmd = new MySqlCommand(query, conn); @@ -1388,8 +1387,7 @@ namespace FFXIVClassic_Map_Server { while (reader.Read()) { - uint id = reader.GetUInt32(0); - string label = reader.GetString(1); + string label = reader.GetString(0); raw.Add(label); } } diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 740eefb9..2bd335eb 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -123,7 +123,6 @@ - diff --git a/sql/supportdesk_faqs.sql b/sql/supportdesk_faqs.sql index e623ea27..ed04b9e6 100644 --- a/sql/supportdesk_faqs.sql +++ b/sql/supportdesk_faqs.sql @@ -1,53 +1,25 @@ --- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) --- --- Host: localhost Database: ffxiv --- ------------------------------------------------------ --- Server version 5.7.13-0ubuntu0.16.04.2 +/* +MySQL Data Transfer +Source Host: localhost +Source Database: ffxiv_server +Target Host: localhost +Target Database: ffxiv_server +Date: 8/20/2016 7:15:35 PM +*/ -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `supportdesk_faqs` --- - -DROP TABLE IF EXISTS `supportdesk_faqs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; +SET FOREIGN_KEY_CHECKS=0; +-- ---------------------------- +-- Table structure for supportdesk_faqs +-- ---------------------------- CREATE TABLE `supportdesk_faqs` ( - `id` int(10) NOT NULL, - `label` varchar(50) NOT NULL, - `body` varchar(50) NOT NULL, - `sort` int(11) NOT NULL, - PRIMARY KEY (`id`) + `slot` tinyint(4) NOT NULL, + `languageCode` tinyint(4) NOT NULL, + `title` varchar(128) NOT NULL, + `body` text NOT NULL, + PRIMARY KEY (`slot`,`languageCode`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; --- --- Dumping data for table `supportdesk_faqs` --- - -LOCK TABLES `supportdesk_faqs` WRITE; -/*!40000 ALTER TABLE `supportdesk_faqs` DISABLE KEYS */; -INSERT INTO `supportdesk_faqs` VALUES (1,'Testing','Testy Test FAQ!',1); -/*!40000 ALTER TABLE `supportdesk_faqs` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2016-08-19 5:05:33 +-- ---------------------------- +-- Records +-- ---------------------------- +INSERT INTO `supportdesk_faqs` VALUES ('0', '1', 'Welcome to FFXIV Classic', 'Welcome to the FFXIV 1.0 server emulator FFXIVClassic!\r\n\r\nThis is still currently a work in progress, and you may find bugs or issues as you play with this server. Keep in mind that this is not even remotely close to being finished, and that it is a work in progress.\r\n\r\nCheck out the blog at: \r\nhttp://ffxivclassic.fragmenterworks.com/ \r\nCheck out videos at: \r\nhttps://www.youtube.com/channel/UCr2703_er1Dj7Lx5pzpQpfg'); diff --git a/sql/supportdesk_issues.sql b/sql/supportdesk_issues.sql index 09acaba5..d8575dd8 100644 --- a/sql/supportdesk_issues.sql +++ b/sql/supportdesk_issues.sql @@ -1,54 +1,26 @@ --- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) --- --- Host: localhost Database: ffxiv --- ------------------------------------------------------ --- Server version 5.7.13-0ubuntu0.16.04.2 +/* +MySQL Data Transfer +Source Host: localhost +Source Database: ffxiv_server +Target Host: localhost +Target Database: ffxiv_server +Date: 8/20/2016 7:15:41 PM +*/ -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `supportdesk_issues` --- - -DROP TABLE IF EXISTS `supportdesk_issues`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; +SET FOREIGN_KEY_CHECKS=0; +-- ---------------------------- +-- Table structure for supportdesk_issues +-- ---------------------------- CREATE TABLE `supportdesk_issues` ( - `id` int(11) NOT NULL, + `slot` smallint(4) unsigned NOT NULL, `title` varchar(50) NOT NULL, - `sort` int(11) NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`slot`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; --- --- Dumping data for table `supportdesk_issues` --- - -LOCK TABLES `supportdesk_issues` WRITE; -/*!40000 ALTER TABLE `supportdesk_issues` DISABLE KEYS */; -INSERT INTO `supportdesk_issues` VALUES (1,'Report Harassment',1); -INSERT INTO `supportdesk_issues` VALUES (2,'Report Cheating',2); -INSERT INTO `supportdesk_issues` VALUES (3,'Leave Suggestion',3); -/*!40000 ALTER TABLE `supportdesk_issues` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2016-08-19 5:05:51 +-- ---------------------------- +-- Records +-- ---------------------------- +INSERT INTO `supportdesk_issues` VALUES ('0', 'Report Harassment'); +INSERT INTO `supportdesk_issues` VALUES ('1', 'Report Cheating'); +INSERT INTO `supportdesk_issues` VALUES ('2', 'Report a Bug or Glitch'); +INSERT INTO `supportdesk_issues` VALUES ('3', 'Leave Suggestion'); diff --git a/sql/supportdesk_tickets.sql b/sql/supportdesk_tickets.sql index 3f3d9c9e..717fa9f1 100644 --- a/sql/supportdesk_tickets.sql +++ b/sql/supportdesk_tickets.sql @@ -1,52 +1,24 @@ --- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64) --- --- Host: localhost Database: ffxiv --- ------------------------------------------------------ --- Server version 5.7.13-0ubuntu0.16.04.2 +/* +MySQL Data Transfer +Source Host: localhost +Source Database: ffxiv_server +Target Host: localhost +Target Database: ffxiv_server +Date: 8/20/2016 7:15:46 PM +*/ -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `supportdesk_tickets` --- - -DROP TABLE IF EXISTS `supportdesk_tickets`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; +SET FOREIGN_KEY_CHECKS=0; +-- ---------------------------- +-- Table structure for supportdesk_tickets +-- ---------------------------- CREATE TABLE `supportdesk_tickets` ( - `id` int(20) NOT NULL, - `title` varchar(100) NOT NULL, - `body` varchar(100) NOT NULL, - `langCode` varchar(10) NOT NULL, + `id` int(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(128) NOT NULL, + `body` text NOT NULL, + `langCode` smallint(4) unsigned NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; --- --- Dumping data for table `supportdesk_tickets` --- - -LOCK TABLES `supportdesk_tickets` WRITE; -/*!40000 ALTER TABLE `supportdesk_tickets` DISABLE KEYS */; -/*!40000 ALTER TABLE `supportdesk_tickets` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2016-08-19 5:06:23 +-- ---------------------------- +-- Records +-- ---------------------------- From 316e326d71a70ad39898bf3cdf112ce30fd34773 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sun, 21 Aug 2016 18:16:54 -0400 Subject: [PATCH 11/19] GM tickets can now be in an open/closed state. Added some helper functions for currancy, and added functions to allow changing chocobo appearance. --- FFXIVClassic Map Server/Database.cs | 121 +++++++++++++++++- FFXIVClassic Map Server/PacketProcessor.cs | 11 +- .../actors/chara/player/Inventory.cs | 16 ++- .../actors/chara/player/Player.cs | 14 ++ 4 files changed, 152 insertions(+), 10 deletions(-) diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 1a3b80da..569889dc 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -829,7 +829,7 @@ namespace FFXIVClassic_Map_Server { ushort equipSlot = reader.GetUInt16(0); ulong uniqueItemId = reader.GetUInt16(1); - InventoryItem item = player.GetInventory(Inventory.NORMAL).GetItemById(uniqueItemId); + InventoryItem item = player.GetInventory(Inventory.NORMAL).GetItemByUniqueId(uniqueItemId); equipment[equipSlot] = item; } } @@ -1247,10 +1247,11 @@ namespace FFXIVClassic_Map_Server return cheevosPacket.BuildPacket(player.actorId); } - public static void SaveSupportTicket(GMSupportTicketPacket gmTicket) + public static bool SaveSupportTicket(GMSupportTicketPacket gmTicket, string playerName) { string query; MySqlCommand cmd; + bool wasError = false; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -1260,11 +1261,12 @@ namespace FFXIVClassic_Map_Server query = @" INSERT INTO supportdesk_tickets - (title, body, langCode) + (name, title, body, langCode) VALUES - (@title, @body, @langCode)"; + (@name, @title, @body, @langCode)"; cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@name", playerName); cmd.Parameters.AddWithValue("@title", gmTicket.ticketTitle); cmd.Parameters.AddWithValue("@body", gmTicket.ticketBody); cmd.Parameters.AddWithValue("@langCode", gmTicket.langCode); @@ -1272,6 +1274,81 @@ namespace FFXIVClassic_Map_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + wasError = true; + } + finally + { + conn.Dispose(); + } + } + + return wasError; + } + + public static bool isTicketOpen(string playerName) + { + bool isOpen = false; + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + string query = @" + SELECT + isOpen + FROM supportdesk_tickets + WHERE name = @name + "; + + MySqlCommand cmd = new MySqlCommand(query, conn); + + cmd.Parameters.AddWithValue("@name", playerName); + + using (MySqlDataReader reader = cmd.ExecuteReader()) + { + while (reader.Read()) + { + isOpen = reader.GetBoolean(0); + } + } + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + } + } + + return isOpen; + } + + public static void closeTicket(string playerName) + { + bool isOpen = false; + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + string query = @" + UPDATE + supportdesk_tickets + SET isOpen = 0 + WHERE name = @name + "; + + MySqlCommand cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@name", playerName); + cmd.ExecuteNonQuery(); + } + catch (MySqlException e) { Program.Log.Error(e.ToString()); } @@ -1442,5 +1519,41 @@ namespace FFXIVClassic_Map_Server } } } + + public static void ChangePlayerChocoboAppearance(Player player, byte appearanceId) + { + string query; + MySqlCommand cmd; + + using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) + { + try + { + conn.Open(); + + query = @" + UPDATE characters_chocobo + SET + chocoboAppearance=@chocoboAppearance + WHERE + characterId = @characterId"; + + cmd = new MySqlCommand(query, conn); + cmd.Parameters.AddWithValue("@characterId", player.actorId); + cmd.Parameters.AddWithValue("@chocoboAppearance", appearanceId); + + cmd.ExecuteNonQuery(); + } + catch (MySqlException e) + { + Program.Log.Error(e.ToString()); + } + finally + { + conn.Dispose(); + } + } + } + } } diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index b999b639..1c17fb51 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -388,7 +388,7 @@ namespace FFXIVClassic_Map_Server break; //Request if GM ticket exists case 0x01D3: - client.QueuePacket(BasePacket.CreatePacket(StartGMTicketPacket.BuildPacket(player.actorID, false), true, false)); + client.QueuePacket(BasePacket.CreatePacket(StartGMTicketPacket.BuildPacket(player.actorID, Database.isTicketOpen(player.GetActor().customDisplayName)), true, false)); break; //Request for GM response message case 0x01D4: @@ -398,11 +398,16 @@ namespace FFXIVClassic_Map_Server case 0x01D5: GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data); Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); - Database.SaveSupportTicket(gmTicket); - client.QueuePacket(BasePacket.CreatePacket(GMTicketSentResponsePacket.BuildPacket(player.actorID, true), true, false)); + bool wasError = Database.SaveSupportTicket(gmTicket, player.GetActor().customDisplayName); + client.QueuePacket(BasePacket.CreatePacket(GMTicketSentResponsePacket.BuildPacket(player.actorID, !wasError), true, false)); + + if (!wasError) + client.QueuePacket(BasePacket.CreatePacket(StartGMTicketPacket.BuildPacket(player.actorID, true), true, false)); + break; //Request to end ticket case 0x01D6: + Database.closeTicket(player.GetActor().customDisplayName); client.QueuePacket(BasePacket.CreatePacket(EndGMTicketPacket.BuildPacket(player.actorID), true, false)); break; default: diff --git a/FFXIVClassic Map Server/actors/chara/player/Inventory.cs b/FFXIVClassic Map Server/actors/chara/player/Inventory.cs index 19538ae4..9d317cc8 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Inventory.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Inventory.cs @@ -46,14 +46,24 @@ namespace FFXIVClassic_Map_Server.actors.chara.player return null; } - public InventoryItem GetItemById(ulong itemId) + public InventoryItem GetItemByUniqueId(ulong uniqueItemId) { foreach (InventoryItem item in list) - { - if (item.uniqueId == itemId) + { + if (item.uniqueId == uniqueItemId) return item; } return null; + } + + public InventoryItem GetItemByCatelogId(ulong catelogId) + { + foreach (InventoryItem item in list) + { + if (item.itemId == catelogId) + return item; + } + return null; } public void RefreshItem(InventoryItem item) diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 4d7f333b..00db9417 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -959,6 +959,14 @@ namespace FFXIVClassic_Map_Server.Actors return null; } + public int GetCurrentGil() + { + if (GetInventory(Inventory.CURRENCY).HasItem(1000001)) + return GetInventory(Inventory.CURRENCY).GetItemByCatelogId(1000001).quantity; + else + return 0; + } + public Actor GetActorInInstance(uint actorId) { foreach (Actor a in playerSession.actorInstanceList) @@ -1270,5 +1278,11 @@ namespace FFXIVClassic_Map_Server.Actors chocoboAppearance = appearanceId; chocoboName = nameResponse; } + + public void ChangeChocoboAppearance(byte appearanceId) + { + Database.ChangePlayerChocoboAppearance(this, appearanceId); + chocoboAppearance = appearanceId; + } } } From d6277bc7222bf72ee72c47d7840d33a7e8c17b53 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sun, 21 Aug 2016 18:18:11 -0400 Subject: [PATCH 12/19] Sql update for the last commit. --- sql/supportdesk_tickets.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/supportdesk_tickets.sql b/sql/supportdesk_tickets.sql index 717fa9f1..93a2d7c9 100644 --- a/sql/supportdesk_tickets.sql +++ b/sql/supportdesk_tickets.sql @@ -4,7 +4,7 @@ Source Host: localhost Source Database: ffxiv_server Target Host: localhost Target Database: ffxiv_server -Date: 8/20/2016 7:15:46 PM +Date: 8/21/2016 6:17:47 PM */ SET FOREIGN_KEY_CHECKS=0; @@ -13,11 +13,13 @@ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- CREATE TABLE `supportdesk_tickets` ( `id` int(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, `title` varchar(128) NOT NULL, `body` text NOT NULL, `langCode` smallint(4) unsigned NOT NULL, + `isOpen` tinyint(1) unsigned NOT NULL DEFAULT '1', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records From d5f17c01a8f5cf2d391db9cb953d377bd180ca5a Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sun, 21 Aug 2016 18:21:00 -0400 Subject: [PATCH 13/19] Added changes to the chocobolender script and global script. Working off of "thetestgames" code. --- .../npc/populace/PopulaceChocoboLender.lua | 89 ++++++++++--------- data/scripts/global.lua | 18 ++++ 2 files changed, 67 insertions(+), 40 deletions(-) diff --git a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 9f73179f..065f7f20 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -15,6 +15,18 @@ eventTalkStepBreak(player) - Finishes talkTurn and says a goodbye require ("global") +local gcIssuances = { + [1500006] = 2001004, + [1500061] = 2001005, + [1000840] = 2001006 +}; + +local startAppearances = { + [1500006] = CHOCOBO_LIMSA1, + [1500061] = CHOCOBO_GRIDANIA1, + [1000840] = CHOCOBO_ULDAH1 +}; + function init(npc) return false, false, 0, 0; end @@ -22,52 +34,44 @@ end function onEventStarted(player, npc, triggerName) local curLevel = 20; -- TODO: pull from character - local hasIssuance = true; -- TODO: pull from character + local hasIssuance = player:GetInventory(INVENTORY_KEYITEMS):HasItem(gcIssuances[npc:GetActorClassId()]); local hasChocobo = player.hasChocobo; - + if (player.isGM and hasChocobo == false) then -- Let GMs auto have the issuance for debugging hasIssuance = true; - end - - if (hasChocobo) then - hasIssuance = false; - end + end local rentPrice = 800; - local playerFunds = 0; --TODO: pull character's money - local hasFunds = (playerFunds >= rentPrice); + local hasFunds = (player:GetCurrentGil() >= rentPrice); callClientFunction(player, "eventTalkWelcome", player); - local menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, hasChocobo, hasChocobo, 4); + + local menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, true, true, player.chocoboAppearance); if (menuChoice == 1) then -- Issuance option callClientFunction(player, "eventTalkMyChocobo", player); - local nameResponse = callClientFunction(player, "eventSetChocoboName", false); + local nameResponse = callClientFunction(player, "eventSetChocoboName", true); if (nameResponse == "") then -- Cancel Chocobo naming - local cancelState = callClientFunction(player, "eventCancelChocoboName", player); - --Do anything with cancel state? + callClientFunction(player, "eventCancelChocoboName", player); + callClientFunction(player, "eventTalkStepBreak", player); + player:EndEvent(); + return; + else + local appearance = startAppearances[npc:GetActorClassId()]; + player:IssueChocobo(appearance, nameResponse); + callClientFunction(player, "eventAfterChocoboName", player); + mountChocobo(player); + teleportOutOfCity(player, npc); end - - local appearance = 1; -- TODO: pull correct appearance based on GC - player:IssueChocobo(appearance, nameResponse); - if (nameResponse ~= "") then -- Successfully named Chocobo - callClientFunction(player, "eventAfterChocoboName", player); - end - - mountChocobo(player); - teleportOutOfCity(player); + elseif(menuChoice == 2) then -- Summon Bird + teleportOutOfCity(player, npc); mountChocobo(player); - teleportOutOfCity(player); elseif(menuChoice == 3) then -- Change Barding callClientFunction(player, "eventTalkStepBreak", player); elseif(menuChoice == 5) then -- Rent Bird - if (hasFunds == false) then -- Not enough money - -- Do not enough money action?? - else - --Issue rental chocobo - end + issueRentalChocobo(player); else callClientFunction(player, "eventTalkStepBreak", player); end @@ -76,24 +80,29 @@ function onEventStarted(player, npc, triggerName) end function mountChocobo(player) - --TODO fix this - --[[ + local worldMaster = GetWorldMaster(); player:ChangeMusic(83); player:SendChocoboAppearance(); player:SendGameMessage(player, worldMaster, 26001, 0x20); player:SetMountState(1); - ]] end -function teleportOutOfCity(player) - --TODO: Teleport out of city +function issueRentalChocobo(player) + --TODO: Write issue rental chocobo code +end + +function teleportOutOfCity(player, npc) local zoneId = player:GetPos()[4]; local worldManager = GetWorldManager(); - if(zoneId == 155) then --Gridania - worldManager:DoZoneChange(player, 150, nil, 0x02, 319, 4, -996, 0.00); - elseif(zoneId == 133) then -- Limsa - worldManager:DoZoneChange(player, 133, nil, 0x02, -73, 30, 169, 2); - elseif(zoneId == 175) then -- Ul'dah - + local exitPoints = { + [1500061] = {150, 319, 4, 996, 0.00}, -- Gridania + [1500006] = {133, -83, 30, 169, 2.00}, -- Limsa + [1000840] = {170, -32, 183, -74, 2} -- Ul'dah + }; + --print "Getting exit point for npc [" ..npc:GetActorClassId().."]"; + local exitPoint = exitPoints[npc:GetActorClassId()]; + if (exitPoint == nil) then + return end -end \ No newline at end of file + worldManager:DoZoneChange(player, exitPoint[0], nil, 0x02, exitPoint[1], exitPoint[2], exitPoint[3], exitPoint[4]); +end diff --git a/data/scripts/global.lua b/data/scripts/global.lua index 7f9c8211..48f2cfe6 100644 --- a/data/scripts/global.lua +++ b/data/scripts/global.lua @@ -51,6 +51,24 @@ INVENTORY_KEYITEMS = 0x0064; --Max 0x500 INVENTORY_EQUIPMENT = 0x00FE; --Max 0x23 INVENTORY_EQUIPMENT_OTHERPLAYER = 0x00F9; --Max 0x23 +-- CHOCOBO APPEARANCE +CHOCOBO_NORMAL = 0; + +CHOCOBO_LIMSA1 = 0x1; +CHOCOBO_LIMSA2 = 0x2; +CHOCOBO_LIMSA3 = 0x3; +CHOCOBO_LIMSA4 = 0x4; + +CHOCOBO_GRIDANIA1 = 0x1F; +CHOCOBO_GRIDANIA2 = 0x20; +CHOCOBO_GRIDANIA3 = 0x21; +CHOCOBO_GRIDANIA4 = 0x22; + +CHOCOBO_ULDAH1 = 0x3D; +CHOCOBO_ULDAH2 = 0x3E; +CHOCOBO_ULDAH3 = 0x3F; +CHOCOBO_ULDAH4 = 0x40; + --UTILS function callClientFunction(player, functionName, ...) From 87253771685ceb71002fda11a83289f5daa060ab Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sun, 21 Aug 2016 19:51:49 -0400 Subject: [PATCH 14/19] Changed InfoRequestResponsePacket to GenericDataPacket as that is the proper use/term. Added the city exit spawn locations. Did more work on the chocobolender script. Most of the issuing portion is done. Also can now summon through the lender. --- .../FFXIVClassic Map Server.csproj | 2 +- .../actors/chara/player/Player.cs | 4 +- ...ResponsePacket.cs => GenericDataPacket.cs} | 2 +- .../npc/populace/PopulaceChocoboLender.lua | 37 ++++++++----------- sql/server_zones_spawnlocations.sql | 13 +++---- 5 files changed, 25 insertions(+), 33 deletions(-) rename FFXIVClassic Map Server/packets/send/player/{InfoRequestResponsePacket.cs => GenericDataPacket.cs} (95%) diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 2bd335eb..6afd806e 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -200,7 +200,7 @@ - + diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 00db9417..e4d57460 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1138,10 +1138,10 @@ namespace FFXIVClassic_Map_Server.Actors QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId)); } - public void SendRequestedInfo(params object[] parameters) + public void SendDataPacket(params object[] parameters) { List lParams = LuaUtils.CreateLuaParamList(parameters); - SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams); + SubPacket spacket = GenericDataPacket.BuildPacket(actorId, actorId, lParams); spacket.DebugPrintSubPacket(); QueuePacket(spacket); } diff --git a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs b/FFXIVClassic Map Server/packets/send/player/GenericDataPacket.cs similarity index 95% rename from FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs rename to FFXIVClassic Map Server/packets/send/player/GenericDataPacket.cs index 73780b4c..679f0f08 100644 --- a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/GenericDataPacket.cs @@ -4,7 +4,7 @@ using System.IO; namespace FFXIVClassic_Map_Server.packets.send.player { - class InfoRequestResponsePacket + class GenericDataPacket { public const ushort OPCODE = 0x0133; public const uint PACKET_SIZE = 0xE0; diff --git a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 065f7f20..939073ac 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -27,6 +27,12 @@ local startAppearances = { [1000840] = CHOCOBO_ULDAH1 }; +local cityExits = { + [1500006] = 15, + [1500061] = 14, + [1000840] = 16 +}; + function init(npc) return false, false, 0, 0; end @@ -60,14 +66,18 @@ function onEventStarted(player, npc, triggerName) else local appearance = startAppearances[npc:GetActorClassId()]; player:IssueChocobo(appearance, nameResponse); - callClientFunction(player, "eventAfterChocoboName", player); + callClientFunction(player, "eventAfterChocoboName", player); mountChocobo(player); - teleportOutOfCity(player, npc); + GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()]); + player:SendGameMessage(player, GetWorldMaster(), 25248, 0x20, 2001007); + player:SendDataPacket("attention", GetWorldMaster(), "", 25248, 2001007); + player:EndEvent(); + return; end elseif(menuChoice == 2) then -- Summon Bird - teleportOutOfCity(player, npc); mountChocobo(player); + GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()]); elseif(menuChoice == 3) then -- Change Barding callClientFunction(player, "eventTalkStepBreak", player); elseif(menuChoice == 5) then -- Rent Bird @@ -80,29 +90,12 @@ function onEventStarted(player, npc, triggerName) end function mountChocobo(player) - local worldMaster = GetWorldMaster(); - player:ChangeMusic(83); player:SendChocoboAppearance(); - player:SendGameMessage(player, worldMaster, 26001, 0x20); player:SetMountState(1); + player:ChangeSpeed(0.0, 5.0, 10.0); + player:ChangeState(15); end function issueRentalChocobo(player) --TODO: Write issue rental chocobo code end - -function teleportOutOfCity(player, npc) - local zoneId = player:GetPos()[4]; - local worldManager = GetWorldManager(); - local exitPoints = { - [1500061] = {150, 319, 4, 996, 0.00}, -- Gridania - [1500006] = {133, -83, 30, 169, 2.00}, -- Limsa - [1000840] = {170, -32, 183, -74, 2} -- Ul'dah - }; - --print "Getting exit point for npc [" ..npc:GetActorClassId().."]"; - local exitPoint = exitPoints[npc:GetActorClassId()]; - if (exitPoint == nil) then - return - end - worldManager:DoZoneChange(player, exitPoint[0], nil, 0x02, exitPoint[1], exitPoint[2], exitPoint[3], exitPoint[4]); -end diff --git a/sql/server_zones_spawnlocations.sql b/sql/server_zones_spawnlocations.sql index 6aaa8298..dbe9e0b2 100644 --- a/sql/server_zones_spawnlocations.sql +++ b/sql/server_zones_spawnlocations.sql @@ -4,12 +4,10 @@ Source Host: localhost Source Database: ffxiv_server Target Host: localhost Target Database: ffxiv_server -Date: 8/14/2016 9:43:22 AM +Date: 8/21/2016 7:50:14 PM */ -SET FOREIGN_KEY_CHECKS = 0; -SET autocommit = 0; - +SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for server_zones_spawnlocations -- ---------------------------- @@ -23,7 +21,7 @@ CREATE TABLE `server_zones_spawnlocations` ( `spawnZ` float NOT NULL, `spawnRotation` float NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records @@ -41,5 +39,6 @@ INSERT INTO `server_zones_spawnlocations` VALUES ('10', '166', null, '16', '356. INSERT INTO `server_zones_spawnlocations` VALUES ('11', '244', null, '15', '0.048', '0', '-5.737', '0'); INSERT INTO `server_zones_spawnlocations` VALUES ('12', '244', null, '15', '-160.048', '0', '-165.737', '0'); INSERT INTO `server_zones_spawnlocations` VALUES ('13', '244', null, '15', '160.048', '0', '154.263', '0'); - -COMMIT; \ No newline at end of file +INSERT INTO `server_zones_spawnlocations` VALUES ('14', '150', null, '15', '333.271', '5.889', '-943.275', '0.794'); +INSERT INTO `server_zones_spawnlocations` VALUES ('15', '133', null, '15', '-8.062', '45.429', '139.364', '2.955'); +INSERT INTO `server_zones_spawnlocations` VALUES ('16', '170', null, '15', '-27.015', '181.798', '-79.72', '2.513'); From 62cc343f5158dbef803e7e132b59b25dc812dd82 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sun, 21 Aug 2016 20:11:50 -0400 Subject: [PATCH 15/19] Player chocobo issuance is now removed, and you are given a chocobo whistle if you didn't have one. --- .../base/chara/npc/populace/PopulaceChocoboLender.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 939073ac..dbb2078e 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -71,6 +71,13 @@ function onEventStarted(player, npc, triggerName) GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()]); player:SendGameMessage(player, GetWorldMaster(), 25248, 0x20, 2001007); player:SendDataPacket("attention", GetWorldMaster(), "", 25248, 2001007); + + if (player:GetInventory(INVENTORY_KEYITEMS):HasItem(2001007) == false) then + player:GetInventory(INVENTORY_KEYITEMS):AddItem(2001007); + end + + player:GetInventory(INVENTORY_KEYITEMS):RemoveItem(gcIssuances[npc:GetActorClassId()], 1); + player:EndEvent(); return; end From 92be59d02077816211d2a7b990de0283fe5a388c Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Sat, 27 Aug 2016 03:50:02 +0100 Subject: [PATCH 16/19] fixed linux build and import script --- .../FFXIVClassic Common Class Lib.csproj | 6 +- .../FFXIVClassic Lobby Server.csproj | 8 +- .../FFXIVClassic Map Server.csproj | 120 +++++++++--------- sql/import.sh | 50 ++++---- 4 files changed, 92 insertions(+), 92 deletions(-) diff --git a/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj b/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj index e4f4e80c..5bbaa613 100644 --- a/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj +++ b/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj @@ -1,7 +1,7 @@  - - + + Debug AnyCPU @@ -82,4 +82,4 @@ --> - \ No newline at end of file + diff --git a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj index e8d78846..5849b66b 100644 --- a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj +++ b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj @@ -1,7 +1,7 @@  - - + + Debug AnyCPU @@ -135,7 +135,7 @@ - copy "$(SolutionDir)data\lobby_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" + copy "$(SolutionDir)data\lobby_config.ini" "$(SolutionDir)$(ProjectName)$(OutDir)" @@ -150,4 +150,4 @@ --> - \ No newline at end of file + diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 6afd806e..36bed891 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -1,7 +1,7 @@  - - + + Debug AnyCPU @@ -144,51 +144,51 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -206,18 +206,18 @@ - - - - - - - + + + + + + + - - - - + + + + @@ -295,7 +295,7 @@ - copy "$(SolutionDir)data\map_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" + copy "$(SolutionDir)data\map_config.ini" "$(SolutionDir)$(ProjectName)$(OutDir)" @@ -310,4 +310,4 @@ --> - \ No newline at end of file + diff --git a/sql/import.sh b/sql/import.sh index a26f768b..93ea5e8c 100644 --- a/sql/import.sh +++ b/sql/import.sh @@ -1,25 +1,25 @@ -#!/bin/bash -IMPORT_PATH="C://coding//repositories//ffxiv related//ffxivclassic//ffxiv-classic-server//sql//" -USER=root -PASS=root -DBNAME=ffxiv_server - -ECHO Creating Database $DBNAME -mysqladmin -h localhost -u $USER -p$PASS DROP $DBNAME - -ECHO Creating Database $DBNAME -mysqladmin -h localhost -u $USER -p$PASS CREATE $DBNAME IF NOT EXISTS $DBNAME - -ECHO Loading $DBNAME tables into the database -sh cd $IMPORT_PATH - -for X in '*.sql'; -do - for Y in $X - do - echo Importing $Y; - "C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS < $Y - done -done - -ECHO Finished! \ No newline at end of file +#!/bin/bash +IMPORT_PATH="path/to/ffxiv-classic-server/sql/" +USER=root +PASS=root +DBNAME=ffxiv_server + +echo Creating Database $DBNAME +mysql -h localhost -u $USER -p$PASS DROP $DBNAME + +echo Creating Database $DBNAME +mysql -h localhost -u $USER -p$PASS CREATE $DBNAME IF NOT EXISTS $DBNAME + +echo Loading $DBNAME tables into the database + +for X in $IMPORT_PATH'*.sql'; +do + for Y in $X + do + echo Importing $Y; + mysql $DBNAME -h localhost -u $USER -p$PASS < $Y + done +done + +echo Finished! + From 0f093235f8355d440d772091694a53cee174cf69 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sun, 28 Aug 2016 08:06:10 -0400 Subject: [PATCH 17/19] Default speeds were not being set, and on actor load *currentSpeed* wasn't being loaded. --- FFXIVClassic Map Server/actors/Actor.cs | 2 +- FFXIVClassic Map Server/actors/chara/player/Player.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/FFXIVClassic Map Server/actors/Actor.cs b/FFXIVClassic Map Server/actors/Actor.cs index d2cad928..ce407231 100644 --- a/FFXIVClassic Map Server/actors/Actor.cs +++ b/FFXIVClassic Map Server/actors/Actor.cs @@ -68,7 +68,7 @@ namespace FFXIVClassic_Map_Server.Actors public SubPacket CreateSpeedPacket(uint playerActorId) { - return SetActorSpeedPacket.BuildPacket(actorId, playerActorId); + return SetActorSpeedPacket.BuildPacket(actorId, playerActorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2]); } public SubPacket CreateSpawnPositonPacket(uint playerActorId, uint spawnType) diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index e4d57460..0e20d572 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -133,6 +133,11 @@ namespace FFXIVClassic_Map_Server.Actors className = "Player"; currentSubState = SetActorStatePacket.SUB_STATE_PLAYER; + moveSpeeds[0] = SetActorSpeedPacket.DEFAULT_STOP; + moveSpeeds[1] = SetActorSpeedPacket.DEFAULT_WALK; + moveSpeeds[2] = SetActorSpeedPacket.DEFAULT_RUN; + moveSpeeds[3] = SetActorSpeedPacket.DEFAULT_RUN; + inventories[Inventory.NORMAL] = new Inventory(this, MAXSIZE_INVENTORY_NORMAL, Inventory.NORMAL); inventories[Inventory.KEYITEMS] = new Inventory(this, MAXSIZE_INVENTORY_KEYITEMS, Inventory.KEYITEMS); inventories[Inventory.CURRENCY] = new Inventory(this, MAXSIZE_INVENTORY_CURRANCY, Inventory.CURRENCY); From 6e7459a2f850886aeca7b9c3be856ee7bab99b2f Mon Sep 17 00:00:00 2001 From: dude22072 Date: Tue, 4 Oct 2016 06:03:33 +0000 Subject: [PATCH 18/19] MarketEntrance.lua syntax error --- data/scripts/base/chara/npc/object/MarketEntrance.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/scripts/base/chara/npc/object/MarketEntrance.lua b/data/scripts/base/chara/npc/object/MarketEntrance.lua index 9a26d2d2..aa697270 100644 --- a/data/scripts/base/chara/npc/object/MarketEntrance.lua +++ b/data/scripts/base/chara/npc/object/MarketEntrance.lua @@ -16,7 +16,7 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - callClientFunction(player, "eventPushChoiceAreaOrQuest", 0xc13, 0xc1a, 0xdba,0, false, 0)); + callClientFunction(player, "eventPushChoiceAreaOrQuest", 0xc13, 0xc1a, 0xdba,0, false, 0); player:EndEvent(); end \ No newline at end of file From 6642ed7e122a5a84a118eb080f0eeecdc2a4e1a9 Mon Sep 17 00:00:00 2001 From: Robert Baker Date: Sun, 2 Apr 2017 11:34:14 -0700 Subject: [PATCH 19/19] Fixed postbuild typos. Automatically copy the scripts folder. Pre-edited player.lua to disable addQuest / Directors. --- FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj | 4 ++-- FFXIVClassic Map Server/FFXIVClassic Map Server.csproj | 6 ++++-- data/scripts/player.lua | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj index 5849b66b..b1c342c9 100644 --- a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj +++ b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj @@ -135,7 +135,7 @@ - copy "$(SolutionDir)data\lobby_config.ini" "$(SolutionDir)$(ProjectName)$(OutDir)" + xcopy "$(SolutionDir)data\lobby_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" /d @@ -150,4 +150,4 @@ --> - + \ No newline at end of file diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 36bed891..30a1b428 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -295,7 +295,9 @@ - copy "$(SolutionDir)data\map_config.ini" "$(SolutionDir)$(ProjectName)$(OutDir)" + xcopy "$(SolutionDir)data\map_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" /d +xcopy "$(SolutionDir)data\scripts" "$(SolutionDir)$(ProjectName)\$(OutDir)scripts\" /e /d /y /s +xcopy "$(SolutionDir)data\staticactors.bin" "$(SolutionDir)$(ProjectName)\$(OutDir)" /d @@ -310,4 +312,4 @@ --> - + \ No newline at end of file diff --git a/data/scripts/player.lua b/data/scripts/player.lua index 9fce66e5..c07da19a 100644 --- a/data/scripts/player.lua +++ b/data/scripts/player.lua @@ -1,7 +1,7 @@ local initClassItems, initRaceItems; function onBeginLogin(player) - + --[[ --New character, set the initial quest if (player:GetPlayTime(false) == 0) then initialTown = player:GetInitialTown(); @@ -43,7 +43,7 @@ function onBeginLogin(player) player:GetQuest(110009):ClearQuestData(); player:GetQuest(110009):ClearQuestFlags(); end - + --]] end