Achei legal, mas poderia explicar melhor onde instalar.. a tag do modo de uso coloca onde?
e como será o sistema que fará encima desse?
- Fórum
- OTServ
- Recursos
- Scripting
- Mods, funções e outros
- [TFS 1.x] Weather System
info
Grupo: Campones
Registrado: 24/07/12
Posts: 6
Reputação: +1

onde coloc isso player:sendWeatherEffect(weatherConfig.groundEffect, weatherConfig.fallEffect, weatherConfig.thunderEffect)
info
Grupo: Marquês
Registrado: 25/09/10
Posts: 1.3k
Reputação: +446
Gênero: Masculino

Achei legal, mas poderia explicar melhor onde instalar.. a tag do modo de uso coloca onde?
e como será o sistema que fará encima desse?
onde coloc isso player:sendWeatherEffect(weatherConfig.groundEffect, weatherConfig.fallEffect, weatherConfig.thunderEffect)
Vocês colocam o primeiro código na pasta lib.
Já o segundo está chamando a função, então vocês podem colocar onde quiser, globalevents, actions, movements
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Parece legal! ![]()
Porém, para usuários de OTCLIENT, podem aproveitar os Game_effect (shaders)



info
Grupo: Conde
Registrado: 07/04/15
Posts: 962
Reputação: +258
Gênero: Masculino
Basicamente é um sistema onde permite chuva e solte raios em determinado local do mapa, use sua criatividade ao usar o sistema.
Features :
Em global.lua adicione :
weatherConfig = { groundEffect = CONST_ME_LOSEENERGY, fallEffect = CONST_ANI_ICE, thunderEffect = true, minDMG = 5, maxDMG = 10 } function Player.sendWeatherEffect(self, groundEffect, fallEffect, thunderEffect) local position, random = self:getPosition(), math.random position.x = position.x + random(-4, 4) position.y = position.y + random(-4, 4) local fromPosition = Position(position.x + 1, position.y, position.z) fromPosition.x = position.x - 7 fromPosition.y = position.y - 5 local tile, getGround for Z = 1, 7 do fromPosition.z = Z position.z = Z tile = Tile(position) if tile then -- If there is a tile, stop checking floors fromPosition:sendDistanceEffect(position, fallEffect) position:sendMagicEffect(groundEffect, self) getGround = tile:getGround() if getGround and ItemType(getGround:getId()):getFluidSource() == 1 then position:sendMagicEffect(CONST_ME_WATERSPLASH, self) end break end end if thunderEffect and tile then if random(2) == 1 then local topCreature = tile:getTopCreature() if topCreature and topCreature:isPlayer() then position:sendMagicEffect(CONST_ME_BIGCLOUDS, self) doTargetCombatHealth(0, self, COMBAT_ENERGYDAMAGE, -weatherConfig.minDMG, -weatherConfig.maxDMG, CONST_ME_NONE) self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You were hit by lightning and lost some health.") end end end endmodo de uso :
Em breve vou fazer uns scripts bacana em cima desse sistema, aceito sugestões.
Créditos : Printer.