• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Help create tfs 0.4 script

mulino

New Member
Joined
Oct 27, 2022
Messages
2
Reaction score
0
GitHub
mulino
Good evening, I'm new here on the forum.

I come to ask you for a script.

I don't know how to do it the way I want, so I come to ask for help..



I want an item... Ex: essence fire that when equipped it damages mine... Ex: I have a bow that attacks 100 damage.

If I equip essence it will continue attacking the 100 normally from the bow but it will deal additional damage to the fire bow. Ex 100 Arc damage plus 60 Fire element. But only deal fire damage if you have a weapon equipped.



Like adding the element to the weapon for having the essence equipped in the sloot ammo... where the arrow is
 
Tenho esse script mas ele da dano sem ter uma arma equipada.
E tem alguma função que o dano que está dano atravessa parede . Como corrigir ele? podem me ajudar?


local burnBuff = {
storageID = 25000,
interval = 1, -- intervalo entre turnos
damage = 95000, -- dano de cada turno
ticks = 5, -- quantidade de turnos
effect = CONST_ME_GIANTICE, -- efeito
}
-- FIRE EFFECT
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 37)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_)
local condition = createConditionObject(CONDITION_FREEZING)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, burnBuff.ticks, burnBuff.interval, -burnBuff.damage)
setCombatCondition(combat, condition)
function onAttack(cid, target)
storageStatus = getPlayerStorageValue (cid, burnBuff.storageID)
playerPos = getCreaturePosition (cid)
targetPos = getCreaturePosition (target)
if storageStatus == 0 then return true end -- Se tiver como trocar essa fucnçao eu agradeço pois ela fica aparecendo o numero 0 na distrito
if getDistanceBetween (playerPos, targetPos) > 8 then return true end -- FIM - jogador longe
if storageStatus == 1 then -- Efeito Energy Se tiver como trocar essa fucnçao eu agradeço pois ela fica aparecendo o numero 2 na distrito
doCombatAreaCondition(cid, targetPos, nil, condition, burnBuff.effect)
end
return true
end
 
Back
Top