View Full Version : Weather Change
12-04-2013, 09:37 PM
how i can change the weather in a zone with a lua command ?
12-04-2013, 09:39 PM
There is a gm command. I don't know it off the top of my head.
12-04-2013, 09:43 PM
Weather class and methods aren't implemented in Eluna.
12-05-2013, 05:20 PM
You can send the packet with packet methods to players.
can't make an example now..
12-06-2013, 07:10 AM
Weather has now been added: http://emudevs.com/showthread.php/1961-Eluna-Added-Weather-functions-and-methods?p=12780#post12780
12-06-2013, 06:28 PM
Incase someone is interested in how to send packets:
-- by Hypersniper
local function Snow()
local players = GetPlayersInWorld() -- Get all players
if (not players) then
return -- stop if getting players failed
local packet = CreatePacket(0x2F4, 100) -- make packet (0x2F4 = 756 = SMSG_WEATHER)
packet:WriteULong(8) -- weather type first: datatype uint32, value: 8 (snow)
packet:WriteFloat(2.0) -- density next: datatype float, value: 2.0 (max density)
packet:WriteULong(8538) -- sound next: datatype uint32, sound id 8538 (it's a snowy sound)
packet:WriteUByte(0) -- our forced "0" we must tack on the end with SMSG_WEATHER.
for k,player in ipairs(players) do -- using for loop to the players table
player:SendPacket(packet) -- send the packet to player
CreateLuaEvent(Snow, 60*60*1000, 0) -- Run Snow() every hour
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.