Updated Scripts, removed all the old unique ones for the opening quest.

This commit is contained in:
Filip Maj 2022-01-25 22:54:44 -05:00
parent 2279ee7017
commit 958a87edf2
31 changed files with 985 additions and 792 deletions

View file

@ -0,0 +1,30 @@
require("global");
properties = {
permissions = 0,
parameters = "ddd",
description =
[[
Sets anim id for current target
!anim <animID> |
]],
}
function onTrigger(player, argc, aType, a1, a2)
npc = player;--GetWorldManager():GetActorInWorldByUniqueId("test");
aType = tonumber(aType);
a1 = tonumber(a1);
a2 = tonumber(a2);
a1 = bit32.band(a1, 0xFFF);
a2 = bit32.band(a2, 0xFFF);
aType = bit32.band(aType, 0xFF);
animId = bit32.bor(bit32.lshift(a2, 12), a1);
animId = bit32.bor(bit32.lshift(aType, 24), animId);
print("AHHH");
player:PlayAnimation(0x10005000);
end;

View file

@ -46,7 +46,7 @@ function onTrigger(player, argc, item, qty, location, name, lastName)
location = INVENTORY_NORMAL;
end;
local invCheck = player:getItemPackage(location):addItem(item, qty, 1);
local invCheck = player:getItemPackage(location):addItem(item, qty, 1);
if (invCheck == INV_ERROR_FULL) then
-- Your inventory is full.

View file

@ -18,24 +18,20 @@ function onTrigger(player, argc, slot, wId, eId, vId, cId)
wId = tonumber(wId) or 0;
eId = tonumber(eId) or 0;
vId = tonumber(vId) or 0;
cId = tonumber(cId) or 0;
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
if player and actor then
if player and argc > 0 then
-- player.appearanceIds[5] = player.achievementPoints;
if argc > 2 then
actor:GraphicChange(slot, wId, eId, vId, cId);
--player.achievementPoints = player.achievementPoints + 1;
actor:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
actor:SendMessage(messageID, sender, string.format("points %u", player.appearanceIds[5]));
else
actor.appearanceIds[slot] = wId;
end
actor:SendAppearance();
else
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
end;
end;
cId = tonumber(cId) or 0;
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or player;
if player and argc > 0 then
if argc > 2 then
actor:GraphicChange(slot, wId, eId, vId, cId);
player:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
else
actor:GraphicChange(slot, wId);
player:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
end
actor:SendAppearance();
else
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
end;
end;

View file

@ -8,12 +8,12 @@ properties = {
function onTrigger(player)
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 x = pos[1];
local y = pos[2];
local z = pos[3];
local rot = pos[4];
local zone = pos[5];
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
local sender = "[mypos] ";
local message = string.format("X:%.3f Y:%.3f Z:%.3f (Rotation: %.3f) Zone:%d", x, y, z, rot, zone);

View file

@ -14,14 +14,7 @@ Sets player or <targetname>'s maximum tp to <tp> and heals them to full.
function onTrigger(player, argc, tp)
local sender = "[setmaxtp] ";
tp = tonumber(tp) or 0;
player:AddTP(tp);
if player then
tp = tonumber(tp) or 0;
location = INVENTORY_CURRENCY;
player:SetTP(tp);
else
print(sender.."unable to add experience, ensure player name is valid.");
end;
end;

View file

@ -160,9 +160,9 @@ function onTrigger(player, argc, width, height, blockCount)
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);
actor.ChangeNpcAppearance(2200905);
actor.SetMaxHP(5000);
actor.SetHP(5000);
--actor.ChangeNpcAppearance(2200905);
actor.SetMaxHP(500);
actor.SetHP(500);
actor.SetMod(modifiersGlobal.CanBlock, 1);
actor.SetMod(modifiersGlobal.AttackRange, 3);
actor.SetMod(modifiersGlobal.MovementSpeed, 5);