mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Fixed issue where spawn packets were sent on zone out. Added all npcs to Camp Bearded Rock. Rewrote how mapobjs get loaded in, no more hardcodes. Added tons mapobjs to the DB. Added ferry npcs.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
require ("global")
|
||||
require ("utils")
|
||||
|
||||
--[[
|
||||
|
||||
AttackWeaponSkill Script
|
||||
@@ -6,19 +9,110 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
|
||||
if (player:GetState() != 2) then
|
||||
player:SendGameMessage(worldMaster, 32503, 0x20);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
local function handlePummel(player, target)
|
||||
player:SendMessage(0x20, "", "DOING PUMMEL!!!!");
|
||||
|
||||
params = {};
|
||||
params.range = 10.0;
|
||||
params.recast = 10;
|
||||
|
||||
params.hpCost = 0;
|
||||
params.mpCost = 0;
|
||||
params.tpCost = 1000;
|
||||
|
||||
params.targetType = 2;
|
||||
params.canCrit = true;
|
||||
params.animationId = 0x12312312;
|
||||
|
||||
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
local function handleSkullSunder(player)
|
||||
player:SendMessage(0x20, "", "DOING SKULL SUNDER!!!!");
|
||||
end
|
||||
|
||||
local weaponskillHandlers = {
|
||||
[0xA0F069E6] = handlePummel,
|
||||
[0xA0F069E7] = nil,
|
||||
[0xA0F069E8] = nil,
|
||||
[0xA0F069E9] = nil,
|
||||
[0xA0F069EA] = nil,
|
||||
[0xA0F069EB] = nil,
|
||||
[0xA0F069EC] = nil,
|
||||
[0xA0F069ED] = nil,
|
||||
[0xA0F069EE] = nil,
|
||||
[0xA0F069EF] = nil,
|
||||
[0xA0F06A0E] = nil,
|
||||
[0xA0F06A0F] = nil,
|
||||
[0xA0F06A10] = nil,
|
||||
[0xA0F06A11] = nil,
|
||||
[0xA0F06A12] = nil,
|
||||
[0xA0F06A13] = nil,
|
||||
[0xA0F06A14] = nil,
|
||||
[0xA0F06A15] = nil,
|
||||
[0xA0F06A16] = nil,
|
||||
[0xA0F06A17] = nil,
|
||||
[0xA0F06A36] = nil,
|
||||
[0xA0F06A37] = handleSkullSunder,
|
||||
[0xA0F06A38] = nil,
|
||||
[0xA0F06A39] = nil,
|
||||
[0xA0F06A3A] = nil,
|
||||
[0xA0F06A3B] = nil,
|
||||
[0xA0F06A3C] = nil,
|
||||
[0xA0F06A3D] = nil,
|
||||
[0xA0F06A3E] = nil,
|
||||
[0xA0F06A3F] = nil,
|
||||
[0xA0F06A5C] = nil,
|
||||
[0xA0F06A5D] = nil,
|
||||
[0xA0F06A5E] = nil,
|
||||
[0xA0F06A60] = nil,
|
||||
[0xA0F06A61] = nil,
|
||||
[0xA0F06A62] = nil,
|
||||
[0xA0F06A63] = nil,
|
||||
[0xA0F06A64] = nil,
|
||||
[0xA0F06A85] = nil,
|
||||
[0xA0F06A86] = nil,
|
||||
[0xA0F06A87] = nil,
|
||||
[0xA0F06A88] = nil,
|
||||
[0xA0F06A89] = nil,
|
||||
[0xA0F06A8A] = nil,
|
||||
[0xA0F06A8B] = nil,
|
||||
[0xA0F06A8C] = nil,
|
||||
[0xA0F06A8D] = nil,
|
||||
[0xA0F06A8E] = nil,
|
||||
[0xA0F06A8F] = nil
|
||||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
--Are they in active mode?
|
||||
if (player:GetState() != 2) then
|
||||
player:SendGameMessage(GetWorldMaster(), 32503, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
--Does the target exist
|
||||
target = player:getZone():FindActorInArea(targetActor);
|
||||
if (target == nil) then
|
||||
player:SendGameMessage(GetWorldMaster(), 30203, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
--Are you too far away?
|
||||
if (getDistanceBetweenActors(player, target) > 7) then
|
||||
player:SendGameMessage(GetWorldMaster(), 32539, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
if (weaponskillHandlers[command.actorId] ~= nil) then
|
||||
weaponskillHandlers[command.actorId](player);
|
||||
else
|
||||
player:SendMessage(0x20, "", "That weaponskill is not implemented yet.");
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
|
||||
end
|
144
data/scripts/commands/CmnAttackWeaponSkill.lua
Normal file
144
data/scripts/commands/CmnAttackWeaponSkill.lua
Normal file
@@ -0,0 +1,144 @@
|
||||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
CmnAttackWeaponSkill Script
|
||||
|
||||
Finds the correct weaponskill subscript to fire when a weaponskill actor is activated.
|
||||
|
||||
--]]
|
||||
|
||||
local function handleTEST(player)
|
||||
end
|
||||
|
||||
local weaponskillHandlers = {
|
||||
[0xA0F067F4] = nil,
|
||||
[0xA0F067F5] = nil,
|
||||
[0xA0F067F7] = nil,
|
||||
[0xA0F067F8] = nil,
|
||||
[0xA0F067FA] = nil,
|
||||
[0xA0F067FB] = nil,
|
||||
[0xA0F067FD] = nil,
|
||||
[0xA0F067FE] = nil,
|
||||
[0xA0F06800] = nil,
|
||||
[0xA0F06801] = nil,
|
||||
[0xA0F06802] = nil,
|
||||
[0xA0F06804] = nil,
|
||||
[0xA0F06805] = nil,
|
||||
[0xA0F06806] = nil,
|
||||
[0xA0F06808] = nil,
|
||||
[0xA0F0680A] = nil,
|
||||
[0xA0F0680B] = nil,
|
||||
[0xA0F0680D] = nil,
|
||||
[0xA0F0680E] = nil,
|
||||
[0xA0F06810] = nil,
|
||||
[0xA0F06812] = nil,
|
||||
[0xA0F06814] = nil,
|
||||
[0xA0F068A8] = nil,
|
||||
[0xA0F068A9] = nil,
|
||||
[0xA0F068AB] = nil,
|
||||
[0xA0F068AC] = nil,
|
||||
[0xA0F068AE] = nil,
|
||||
[0xA0F068AF] = nil,
|
||||
[0xA0F068B2] = nil,
|
||||
[0xA0F068B3] = nil,
|
||||
[0xA0F068B5] = nil,
|
||||
[0xA0F068B7] = nil,
|
||||
[0xA0F068B8] = nil,
|
||||
[0xA0F068B9] = nil,
|
||||
[0xA0F068BB] = nil,
|
||||
[0xA0F068BC] = nil,
|
||||
[0xA0F068BE] = nil,
|
||||
[0xA0F068BF] = nil,
|
||||
[0xA0F068C1] = nil,
|
||||
[0xA0F068C3] = nil,
|
||||
[0xA0F068C5] = nil,
|
||||
[0xA0F0695C] = nil,
|
||||
[0xA0F0695D] = nil,
|
||||
[0xA0F0695E] = nil,
|
||||
[0xA0F06960] = nil,
|
||||
[0xA0F06961] = nil,
|
||||
[0xA0F06963] = nil,
|
||||
[0xA0F06964] = nil,
|
||||
[0xA0F06966] = nil,
|
||||
[0xA0F06967] = nil,
|
||||
[0xA0F06968] = nil,
|
||||
[0xA0F0696A] = nil,
|
||||
[0xA0F0696B] = nil,
|
||||
[0xA0F0696D] = nil,
|
||||
[0xA0F0696E] = nil,
|
||||
[0xA0F06970] = nil,
|
||||
[0xA0F06971] = nil,
|
||||
[0xA0F06973] = nil,
|
||||
[0xA0F06974] = nil,
|
||||
[0xA0F06976] = nil,
|
||||
[0xA0F06978] = nil,
|
||||
[0xA0F06B78] = nil,
|
||||
[0xA0F06B79] = nil,
|
||||
[0xA0F06B7B] = nil,
|
||||
[0xA0F06B7C] = nil,
|
||||
[0xA0F06B7E] = nil,
|
||||
[0xA0F06B7F] = nil,
|
||||
[0xA0F06B81] = nil,
|
||||
[0xA0F06B82] = nil,
|
||||
[0xA0F06B84] = nil,
|
||||
[0xA0F06B85] = nil,
|
||||
[0xA0F06B8A] = nil,
|
||||
[0xA0F06B8C] = nil,
|
||||
[0xA0F06B8E] = nil,
|
||||
[0xA0F06B90] = nil,
|
||||
[0xA0F06B91] = nil,
|
||||
[0xA0F06B93] = nil,
|
||||
[0xA0F06B95] = nil,
|
||||
[0xA0F06B97] = nil,
|
||||
[0xA0F06C2C] = nil,
|
||||
[0xA0F06C2D] = nil,
|
||||
[0xA0F06C2F] = nil,
|
||||
[0xA0F06C31] = nil,
|
||||
[0xA0F06C32] = nil,
|
||||
[0xA0F06C34] = nil,
|
||||
[0xA0F06C35] = nil,
|
||||
[0xA0F06C36] = nil,
|
||||
[0xA0F06C38] = nil,
|
||||
[0xA0F06C39] = nil,
|
||||
[0xA0F06C3B] = nil,
|
||||
[0xA0F06C3C] = nil,
|
||||
[0xA0F06C3E] = nil,
|
||||
[0xA0F06C3F] = nil,
|
||||
[0xA0F06C41] = nil,
|
||||
[0xA0F06C43] = nil,
|
||||
[0xA0F06C45] = nil,
|
||||
[0xA0F06C47] = nil,
|
||||
[0xA0F06C49] = nil,
|
||||
[0xA0F06C4B] = nil,
|
||||
[0xA0F06D94] = nil,
|
||||
[0xA0F06D95] = nil,
|
||||
[0xA0F06D96] = nil,
|
||||
[0xA0F06F92] = nil,
|
||||
[0xA0F06F93] = nil,
|
||||
[0xA0F06F95] = nil,
|
||||
[0xA0F06F96] = nil,
|
||||
[0xA0F070E6] = nil,
|
||||
[0xA0F070E7] = nil,
|
||||
[0xA0F070E9] = nil,
|
||||
[0xA0F070EA] = nil
|
||||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName)
|
||||
|
||||
--Are they in active mode?
|
||||
if (player:GetState() != 2) then
|
||||
player:SendGameMessage(GetWorldMaster(), 32503, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
if (weaponskillHandlers[command.actorId] ~= nil) then
|
||||
weaponskillHandlers[command.actorId](player);
|
||||
else
|
||||
player:SendMessage(0x20, "", "That weaponskill is not implemented yet.");
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
|
||||
end
|
@@ -2,11 +2,11 @@ require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "ssss",
|
||||
parameters = "sssss",
|
||||
description = ""
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, actorClassId, regionId, layoutId, maxLayoutId)
|
||||
function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId)
|
||||
layoutId = tonumber(layoutId);
|
||||
|
||||
if (maxLayoutId ~= nil) then
|
||||
@@ -15,6 +15,7 @@ function onTrigger(player, argc, actorClassId, regionId, layoutId, maxLayoutId)
|
||||
maxLayoutId = layoutId;
|
||||
end
|
||||
|
||||
actorClassId = 5900001;
|
||||
while (layoutId <= maxLayoutId) do
|
||||
if (actorClassId == nil) then
|
||||
player:SendMessage(0x20, "", "No actor class id provided.");
|
||||
@@ -33,7 +34,7 @@ function onTrigger(player, argc, actorClassId, regionId, layoutId, maxLayoutId)
|
||||
zone = player:GetZone();
|
||||
actor = zone:SpawnActor(actorClassId, "mapobj", pos[0], pos[1], pos[2], tonumber(regionId), tonumber(layoutId));
|
||||
wait(0.8);
|
||||
actor:PlayMapObjAnimation(player, "open");
|
||||
actor:PlayMapObjAnimation(player, animation);
|
||||
zone:DespawnActor("mapobj");
|
||||
wait(0.5);
|
||||
player:SendMessage(0x20, "", "Layout ID: "..layoutId);
|
||||
@@ -46,8 +47,8 @@ end;
|
||||
--dun4 (0x19e) - Copperbell Mines
|
||||
--dun1 - Mun Tuy
|
||||
--dun2 - Tam Tara
|
||||
--debug:_getAllCharacter("MapObjStandard")[1]
|
||||
|
||||
|
||||
--Ferry (Thanalan, Z=-130): 5145, 252
|
||||
--Ferry (La Noscea, Z=+130): 5144, 201
|
||||
--Ferry (5142, Z=-130) Doors: 323, 326,
|
||||
--Ferry (5143, Z=+130) Doors: 323, 326,
|
||||
--Ferry (La Noscea, Z=+130): 5144, 201
|
Reference in New Issue
Block a user