mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Merge branch 'ioncannon/quest_system' into Jorge/quest_system
This commit is contained in:
commit
2cbb48621b
97 changed files with 673 additions and 532 deletions
|
@ -14,6 +14,6 @@ local attackMagicHandlers = {
|
|||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Ability(command.actorId, targetActor);
|
||||
player.Ability(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end
|
|
@ -14,7 +14,7 @@ local attackMagicHandlers = {
|
|||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Ability(command.actorId, targetActor);
|
||||
player.Ability(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
|
||||
end
|
|
@ -14,6 +14,6 @@ local attackMagicHandlers = {
|
|||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end;
|
|
@ -21,6 +21,6 @@ function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, ta
|
|||
if not player.aiContainer.IsEngaged() then
|
||||
player.Engage(targetActor);
|
||||
end;
|
||||
player.WeaponSkill(command.actorId, targetActor);
|
||||
player.WeaponSkill(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end;
|
|
@ -13,9 +13,9 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, baza
|
|||
local bazaarActor = nil;
|
||||
|
||||
if (name ~= nil) then
|
||||
bazaarActor = player:GetZone():FindPCInZone(name);
|
||||
bazaarActor = player.CurrentArea:FindPCInZone(name);
|
||||
elseif (bazaarActorId ~= nil) then
|
||||
bazaarActor = player:GetZone():FindActorInArea(bazaarActorId);
|
||||
bazaarActor = player.CurrentArea:FindActorInArea(bazaarActorId);
|
||||
end
|
||||
|
||||
if (bazaarActor ~= nil) then
|
||||
|
|
|
@ -18,7 +18,7 @@ function onEventStarted(player, actor, triggerName, rewardItem, seekItemOrCost,
|
|||
|
||||
--Get the bazaar actor
|
||||
if (bazaarActorId ~= nil) then
|
||||
bazaarActor = player:GetZone():FindActorInArea(bazaarActorId);
|
||||
bazaarActor = player.CurrentArea:FindActorInArea(bazaarActorId);
|
||||
end
|
||||
|
||||
--Abort if no actor
|
||||
|
|
|
@ -10,6 +10,7 @@ require ("global")
|
|||
|
||||
function onEventStarted(player, actor, triggerName, isGoobbue)
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (player:GetState() == 0) then
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
|
@ -48,4 +49,44 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
|
|||
|
||||
player:EndEvent();
|
||||
|
||||
=======
|
||||
if (player:GetState() == 0) then
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
|
||||
if (isGoobbue ~= true) then
|
||||
player:ChangeMusic(83);
|
||||
player:SendGameMessage(player, worldMaster, 26001, 0x20);
|
||||
player:SetMountState(1);
|
||||
else
|
||||
player:ChangeMusic(98);
|
||||
player:SendGameMessage(player, worldMaster, 26019, 0x20);
|
||||
player:SetMountState(2);
|
||||
end
|
||||
|
||||
player:ChangeSpeed(0.0, 5.0, 10.0, 10.0);
|
||||
player:ChangeState(15);
|
||||
else
|
||||
player:ChangeMusic(player.CurrentArea.bgmDay);
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
|
||||
if (player.rentalExpireTime != 0) then
|
||||
player:SendGameMessage(player, worldMaster, 26004, 0x20); --You dismount.
|
||||
else
|
||||
if (player:GetMountState() == 1) then
|
||||
player:SendGameMessage(player, worldMaster, 26003, 0x20); --You dismount X.
|
||||
else
|
||||
player:SendGameMessage(player, worldMaster, 26021, 0x20); --You dismount your Gobbue.
|
||||
end
|
||||
end
|
||||
|
||||
player:SetMountState(0);
|
||||
player:ChangeSpeed(0.0, 2.0, 5.0, 5.0)
|
||||
player:ChangeState(0);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
>>>>>>> ioncannon/quest_system
|
||||
end
|
|
@ -133,8 +133,8 @@ function onEventStarted(player, command, triggerName)
|
|||
return;
|
||||
end
|
||||
|
||||
if (weaponskillHandlers[command.actorId] ~= nil) then
|
||||
weaponskillHandlers[command.actorId](player);
|
||||
if (weaponskillHandlers[command.Id] ~= nil) then
|
||||
weaponskillHandlers[command.Id](player);
|
||||
else
|
||||
player:SendMessage(0x20, "", "That weaponskill is not implemented yet.");
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
|
||||
player:endEvent();
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
|
||||
player:endEvent();
|
||||
end
|
|
@ -21,6 +21,6 @@ function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, ta
|
|||
if not player.aiContainer.IsEngaged() then
|
||||
player.Engage(targetActor);
|
||||
end;
|
||||
player.WeaponSkill(command.actorId, targetActor);
|
||||
player.WeaponSkill(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end;
|
|
@ -1,5 +1,5 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
|
||||
player:endEvent();
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
|
||||
player:endEvent();
|
||||
end
|
|
@ -2,6 +2,6 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
|
||||
player:endEvent();
|
||||
end
|
|
@ -10,6 +10,6 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
|
|||
--]]
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Ability(command.actorId, targetActor);
|
||||
player.Ability(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end;
|
|
@ -14,6 +14,6 @@ local attackMagicHandlers = {
|
|||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player.Cast(command.Id, targetActor);
|
||||
player:endEvent();
|
||||
end;
|
|
@ -12,10 +12,10 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, acto
|
|||
|
||||
--ActorID Search
|
||||
if (actorId ~= nil) then
|
||||
otherActor = player:GetZone():FindActorInArea(actorId);
|
||||
otherActor = player.CurrentArea):FindActorInArea(actorId);
|
||||
--Name Search
|
||||
elseif (name ~= nil) then
|
||||
otherActor = player:GetZone():FindPCInZone(name);
|
||||
otherActor = player.CurrentArea:FindPCInZone(name);
|
||||
end
|
||||
|
||||
if (otherActor ~= nil) then
|
||||
|
|
|
@ -24,7 +24,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
local amount = buff.GetExtra();
|
||||
caster.AddMP(amount);
|
||||
|
||||
actionContainer.AddMPAction(caster.actorId, 33007, amount);
|
||||
actionContainer.AddMPAction(caster.Id, 33007, amount);
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--Blissful mind takes 25% of CURRENT HP and begins storing MP up to that point, at which point the buff changes to indicate its full
|
||||
|
|
|
@ -15,7 +15,7 @@ function onTrigger(player, argc)
|
|||
if player then
|
||||
if player.target then
|
||||
print("hi")
|
||||
local id = player.target.actorId
|
||||
local id = player.target.Id
|
||||
print("hi")
|
||||
player.currentParty:AddMember(id);
|
||||
player.target.currentParty = player.currentParty;
|
||||
|
|
|
@ -8,9 +8,8 @@ properties = {
|
|||
|
||||
function onTrigger(player, argc, actorName)
|
||||
|
||||
if (actorName ~= nil) then
|
||||
zone = player:GetZone();
|
||||
actor = zone:DespawnActor(actorName);
|
||||
if (actorName ~= nil) then
|
||||
actor = player.CurrentArea:DespawnActor(actorName);
|
||||
end
|
||||
|
||||
end;
|
|
@ -23,7 +23,7 @@ function onTrigger(player)
|
|||
|
||||
|
||||
player:SendMessage(messageID, sender, string.format("Position (XYZ-O): %.3f, %.3f, %.3f - %.3f", targetActor.positionX, targetActor.positionY, targetActor.positionZ, targetActor.rotation));
|
||||
player:SendMessage(messageID, sender, string.format("Actor ID: 0x%X", targetActor.actorId));
|
||||
player:SendMessage(messageID, sender, string.format("Actor ID: 0x%X", targetActor.Id));
|
||||
player:SendMessage(messageID, sender, string.format("Class ID: %d", targetActor:GetActorClassId()));
|
||||
player:SendMessage(messageID, sender, string.format("Class Name: %s", targetActor.className));
|
||||
end
|
|
@ -46,13 +46,13 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
q2 = GetStaticActor(var1);
|
||||
|
||||
if q2 ~= nil then
|
||||
q3 = q2.actorId;
|
||||
q3 = q2.Id;
|
||||
message = ("removing quest "..var1);
|
||||
printf(q3);
|
||||
q4 = bit32.band(q3, 0xA0F00000);
|
||||
printf(q4);
|
||||
|
||||
--player:RemoveQuest(quest.actorName);
|
||||
--player:RemoveQuest(quest.Name);
|
||||
end
|
||||
else
|
||||
message = ("remove error: either incorrect ID or quest "..var1.." isn't active on character");
|
||||
|
|
|
@ -18,11 +18,11 @@ function onTrigger(player, argc, zone)
|
|||
|
||||
if player then
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
zone = zone or player:GetZoneID();
|
||||
zone = zone or player.CurrentArea.ZoneId;
|
||||
player:SendMessage(messageID, "[reloadzones] ", string.format("Reloading zone: %u", zone));
|
||||
--[[ todo: get this working legit
|
||||
player:GetZone():Clear();
|
||||
player:GetZone():AddActorToZone(player);
|
||||
player.CurrentArea:Clear();
|
||||
player.CurrentArea:AddActorToZone(player);
|
||||
player:SendInstanceUpdate();
|
||||
]]
|
||||
end;
|
||||
|
|
|
@ -20,16 +20,24 @@ function onTrigger(player, argc, actorClassId, width, height)
|
|||
local rot = pos[4];
|
||||
local zone = pos[5];
|
||||
|
||||
<<<<<<< HEAD
|
||||
actorClassId = tonumber(actorClassId);
|
||||
|
||||
if (actorClassId ~= nil) then
|
||||
zone = player:GetZone();
|
||||
local w = tonumber(width) or 0;
|
||||
=======
|
||||
actorClassId = tonumber(actorClassId);
|
||||
|
||||
if (actorClassId ~= nil) then
|
||||
local w = tonumber(width) or 0;
|
||||
>>>>>>> ioncannon/quest_system
|
||||
local h = tonumber(height) or 0;
|
||||
printf("%f %f %f", x, y, z);
|
||||
--local x, y, z = player.GetPos();
|
||||
for i = 0, w do
|
||||
for j = 0, h do
|
||||
<<<<<<< HEAD
|
||||
actor = zone:SpawnActor(actorClassId, "test", x + (i - (w / 2) * 3), y, z + (j - (h / 2) * 3), rot);
|
||||
actor.SetAppearance(1001149)
|
||||
end
|
||||
|
@ -40,4 +48,16 @@ function onTrigger(player, argc, actorClassId, width, height)
|
|||
player:SendMessage(0x20, "", "This actor class id cannot be spawned.");
|
||||
end
|
||||
|
||||
=======
|
||||
actor = player.CurrentArea:SpawnActor(actorClassId, "test", pos[0] + (i - (w / 2) * 3), pos[1], pos[2] + (j - (h / 2) * 3), pos[3]);
|
||||
actor.SetAppearance(1001149)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (actor == nil) then
|
||||
player:SendMessage(0x20, "", "This actor class id cannot be spawned.");
|
||||
end
|
||||
|
||||
>>>>>>> ioncannon/quest_system
|
||||
end;
|
|
@ -108,7 +108,7 @@ function onTrigger(player, argc, name, width, height, blockCount)
|
|||
for b = 0, blocks do
|
||||
for i = 0, w do
|
||||
for j = 0, h do
|
||||
local actor = player.GetZone().SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
|
||||
local actor = player.CurrentArea:SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
|
||||
actor.ChangeNpcAppearance(modelIds[name]);
|
||||
actor.SetMaxHP(5000);
|
||||
actor.SetHP(5000);
|
||||
|
|
|
@ -18,7 +18,7 @@ function onTrigger(player, argc)
|
|||
player:SendGameMessage(player, worldMaster, 34108, 0x20);
|
||||
player:SendGameMessage(player, worldMaster, 50011, 0x20);
|
||||
|
||||
director = player:GetZone():CreateDirector("Quest/QuestDirectorMan0l001");
|
||||
director = player.CurrentArea:CreateDirector("Quest/QuestDirectorMan0l001");
|
||||
player:AddDirector(director);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId)
|
|||
actorClassId = tonumber(actorClassId);
|
||||
|
||||
if (actorClassId ~= nil) then
|
||||
zone = player:GetZone();
|
||||
zone = player.CurrentArea;
|
||||
actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(regionId), tonumber(layoutId));
|
||||
|
||||
print("test");
|
||||
|
|
|
@ -16,7 +16,7 @@ function onTrigger(player, argc)
|
|||
|
||||
if player and player.currentTarget then
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
actor.Ability(23459, actor.actorId);
|
||||
actor.Ability(23459, actor.Id);
|
||||
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
|
|
|
@ -24,13 +24,13 @@ function onTrigger(player, argc, weather, updateTime, zonewide)
|
|||
message = string.format("changed weather to %u ", weather);
|
||||
|
||||
if zonewide ~= 0 then
|
||||
message = string.format(message.."for zone %u", player:GetZoneID());
|
||||
message = string.format(message.."for zone %u", player.CurrentArea.ZoneId);
|
||||
else
|
||||
message = message..player:GetName();
|
||||
end;
|
||||
|
||||
-- weatherid, updateTime
|
||||
player:GetZone():ChangeWeather(weather, updateTime, player, zonewide ~= 0);
|
||||
player.CurrentArea:ChangeWeather(weather, updateTime, player, zonewide ~= 0);
|
||||
player:SendMessage(messageID, sender, message);
|
||||
end;
|
||||
print(sender..message);
|
||||
|
|
|
@ -159,7 +159,7 @@ function onTrigger(player, argc, width, height, blockCount)
|
|||
for b = 0, blocks do
|
||||
for i = 0, w do
|
||||
for j = 0, h do
|
||||
local actor = player.GetZone().SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
|
||||
local actor = player.CurrentArea.SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
|
||||
--actor.ChangeNpcAppearance(2200905);
|
||||
actor.SetMaxHP(500);
|
||||
actor.SetHP(500);
|
||||
|
|
|
@ -24,6 +24,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
if caster != target then
|
||||
caster.AddHP(action.amount / 2)
|
||||
--33012: You recover [amount] HP.
|
||||
actionContainer.AddHPAbsorbAction(caster.actorId, 33012, (action.amount / 2));
|
||||
actionContainer.AddHPAbsorbAction(caster.Id, 33012, (action.amount / 2));
|
||||
end
|
||||
end;
|
|
@ -39,6 +39,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
|
||||
caster.AddMP(mpToReturn);
|
||||
--30452: You recover x MP.
|
||||
actionContainer.AddMPAbsorbAction(caster.actorId, 30452, mpToReturn);
|
||||
actionContainer.AddMPAbsorbAction(caster.Id, 30452, mpToReturn);
|
||||
end
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue