Hello Ownedcore,
I am currently in the processes of scripting Battle for the Undercity. It's going really well but I have just encountered a problem. I want to include World States into my battle for the undercity script so it can be as blizlike as possible. Once finding out that battle for the undercity used world states I began rapidly googling to try and find a way to porperly use them.
From searching I found this guide on world packets: http://www.************/forums/showt...ow-to-use-them
And from there on I began scripting, on picking up the quest for battle of the undercity I have the follow functions occur;
local SMSG_INIT_WORLD_STATES = 0x2C2
function Beginbattle(plrs)
for _,plrs in pairs(DAL[id].VAR.KT:GetInRangePlayers()) do
Undercitybattleupdate(plrs)
end
end
function Undercitybattleupdate(plrs)
local pack = LuaPacket:CreatePacket(SMSG_INIT_WORLD_STATES, 1
pack:WriteULong(60-- Map
pack:WriteULong(0) -- Zone
pack:WriteULong(0)
pack:WriteUShort(1)
pack:WriteULong(3962) -- ID
pack:WriteULong(1) -- Value
plrs:SendPacketToPlayer(pack)
end
This message should display, The Alliance is battling through the Sewers!
I made the Undercity an instanced zone using the violethold map and I changed the map data to 608 in WorldStateUI.dbc. Does anyone have any idea about what could be causing this issue? I followed the guide and used other scripts as guides as well. However, my world packet does not about to be working. When testing it out on my server I get not errors the packets simply don't show up on my screen.
Thanks!