I had some issues with the recent update and the script working on multiplayer. With the help of chatgpt, I've got things working again.
If you open up the main.lua file and replace the contents with the code below, it should work.
local PalUtility = nil local hooked = false
-- Function to load PalUtility dynamically function LoadPalUtility() PalUtility = StaticFindObject("/Script/Pal.Default__PalUtility") if not PalUtility or not PalUtility:IsValid() then ExecuteWithDelay(1000, LoadPalUtility) return end print("Debug: PalUtility loaded.") end
-- Function to handle the OnStartAim event RegisterHook("/Script/Pal.PalPlayerController:OnStartAim", function(Context) -- Load PalUtility if not already loaded if not PalUtility then LoadPalUtility() return end
-- Retrieve the player triggering the event local Player = Context:get().Pawn if not Player then print("Debug: Player is nil. Exiting script.") return end
-- Retrieve the PlayerState from PalUtility local PlayerState = PalUtility:GetPlayerState(Player) if not PlayerState then print("Debug: PlayerState is nil. Exiting script.") return end
-- Debug: Log the PlayerState print("Debug: PlayerState found:", PlayerState)
-- Access the player's inventory data local PalPlayerInventoryData = PlayerState:GetInventoryData() if not PalPlayerInventoryData then print("Debug: Inventory data is nil. Exiting script.") return end
-- Debug: Log the inventory data print("Debug: Inventory data object found:", PalPlayerInventoryData)
-- Check the count of "PalSphere_Ultimate" items local PalSphere_Refill = PalPlayerInventoryData:CountItemNum(FName("PalSphere_Ultimate")) print("Debug: PalSphere_Ultimate count for player:", PalSphere_Refill)
-- Add items if the count is less than 1 if PalSphere_Refill < 1 then PalPlayerInventoryData:AddItem_ServerInternal(FName("PalSphere_Ultimate"), 99, false) print("Debug: Added 99 PalSphere_Ultimate to player's inventory.") else print("Debug: Player already has sufficient PalSphere_Ultimate.") end end)
-- Hook ClientRestart to initialize PalUtility RegisterHook("/Script/Engine.PlayerController:ClientRestart", function(Context) if not hooked then hooked = true LoadPalUtility() end end)
my bad it does work with nexusmods but when i am trying to use it without nexus and edit what i need , for some reason it doesnt work , i am not even sure what is the problem with it, i have even change the things , i will try another thing and hope that works in that way cuz i didnt wanted to use the nexus mods, if not i guess its the only way for me lol
sorry for my bad english, what you mean is you edit the file but the mod doesn't work or the file can't be edited, here is the file i edited and it works you can try it: https://drive.google.com/file/d/1A_HV1eMvS8Nat-K6bF7g5bcY4Q9mrAE_/view?usp=sharing
Post by MethaMode For me it worked great in multiplayer after doing the above procedure It worked. For those who can't get it working, remove all ultimate spheres in your inventory then just simply press Q(Pal Sphere Aim) and it will refill the ultimate spheres. You can only refill it if you don't have any ultimate spheres in your inventory so you have to remove it first if you want a refill.
39 comments
If you open up the main.lua file and replace the contents with the code below, it should work.
local PalUtility = nil
local hooked = false
-- Function to load PalUtility dynamically
function LoadPalUtility()
PalUtility = StaticFindObject("/Script/Pal.Default__PalUtility")
if not PalUtility or not PalUtility:IsValid() then
ExecuteWithDelay(1000, LoadPalUtility)
return
end
print("Debug: PalUtility loaded.")
end
-- Function to handle the OnStartAim event
RegisterHook("/Script/Pal.PalPlayerController:OnStartAim", function(Context)
-- Load PalUtility if not already loaded
if not PalUtility then
LoadPalUtility()
return
end
-- Retrieve the player triggering the event
local Player = Context:get().Pawn
if not Player then
print("Debug: Player is nil. Exiting script.")
return
end
-- Retrieve the PlayerState from PalUtility
local PlayerState = PalUtility:GetPlayerState(Player)
if not PlayerState then
print("Debug: PlayerState is nil. Exiting script.")
return
end
-- Debug: Log the PlayerState
print("Debug: PlayerState found:", PlayerState)
-- Access the player's inventory data
local PalPlayerInventoryData = PlayerState:GetInventoryData()
if not PalPlayerInventoryData then
print("Debug: Inventory data is nil. Exiting script.")
return
end
-- Debug: Log the inventory data
print("Debug: Inventory data object found:", PalPlayerInventoryData)
-- Check the count of "PalSphere_Ultimate" items
local PalSphere_Refill = PalPlayerInventoryData:CountItemNum(FName("PalSphere_Ultimate"))
print("Debug: PalSphere_Ultimate count for player:", PalSphere_Refill)
-- Add items if the count is less than 1
if PalSphere_Refill < 1 then
PalPlayerInventoryData:AddItem_ServerInternal(FName("PalSphere_Ultimate"), 99, false)
print("Debug: Added 99 PalSphere_Ultimate to player's inventory.")
else
print("Debug: Player already has sufficient PalSphere_Ultimate.")
end
end)
-- Hook ClientRestart to initialize PalUtility
RegisterHook("/Script/Engine.PlayerController:ClientRestart", function(Context)
if not hooked then
hooked = true
LoadPalUtility()
end
end)
holy, this works lol thanks
so i don't know what error you have that can't open
For me it worked great in multiplayer
after doing the above procedure
It worked. For those who can't get it working, remove all ultimate spheres in your inventory then just simply press Q(Pal Sphere Aim) and it will refill the ultimate spheres. You can only refill it if you don't have any ultimate spheres in your inventory so you have to remove it first if you want a refill.