• 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!

Condition

bpm91

Intermediate OT User
Joined
May 23, 2019
Messages
928
Solutions
7
Reaction score
127
Location
Brazil
YouTube
caruniawikibr
Could someone teach me how to make a condition on the "bow" item that when equipped with a common arrow it gives a fire effect on the same burned arrow + of a fire field?
 
Solution
Try this its same one you want exactly.
You mean when equip a bow and an arrow it does fire effect on your character continuously? like every 5 seconds?
If that what you meant post your TFS version and I will make it for you.
 
im sorry mustafa, I had forgotten, my tfs is 0.4
i want condition of flaming bow - medivia
when added the arrow arrow (common) it will give a flaming arrow + burn effect on the same characters as a fire field.


 
Try this its same one you want exactly.
 
Solution
Try this its same one you want exactly.

How do I create these files?

Screenshot_4.jpgScreenshot_5.jpg





I don't know what I did wrong
 
<distance id="2544 action="removecount" script="magmabow.lua"/>

and script


local bowid = 13480
local condition = createConditionObject(CONDITION_FREEZING)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 15, 2000, -8)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 0)

function onUseWeapon(cid, var)
local slotleft = getPlayerSlotItem(cid,CONST_SLOT_LEFT)
local slotright = getPlayerSlotItem(cid,CONST_SLOT_RIGHT)
if slotleft.itemid == bowid or slotright.itemid == bowid and getCreatureTarget(cid) then
doTargetCombatCondition(cid, getCreatureTarget(cid), condition, CONST_ME_FIRE)
end
return doCombat(cid, combat, var)
end
 
You need to change this line
Lua:
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)
to the other distance effect you need
Lua:
CONST_ANI_SPEAR = 0
CONST_ANI_BOLT = 1
CONST_ANI_ARROW = 2
CONST_ANI_FIRE = 3
CONST_ANI_ENERGY = 4
CONST_ANI_POISONARROW = 5
CONST_ANI_BURSTARROW = 6
CONST_ANI_THROWINGSTAR = 7
CONST_ANI_THROWINGKNIFE = 8
CONST_ANI_SMALLSTONE = 9
CONST_ANI_DEATH = 10
CONST_ANI_LARGEROCK = 11
CONST_ANI_SNOWBALL = 12
CONST_ANI_POWERBOLT = 13
CONST_ANI_POISON = 14
CONST_ANI_INFERNALBOLT = 15
CONST_ANI_HUNTINGSPEAR = 16
CONST_ANI_ENCHANTEDSPEAR = 17
CONST_ANI_REDSTAR = 18
CONST_ANI_GREENSTAR = 19
CONST_ANI_ROYALSPEAR = 20
CONST_ANI_SNIPERARROW = 21
CONST_ANI_ONYXARROW = 22
CONST_ANI_PIERCINGBOLT = 23
CONST_ANI_WHIRLWINDSWORD = 24
CONST_ANI_WHIRLWINDAXE = 25
CONST_ANI_WHIRLWINDCLUB = 26
CONST_ANI_ETHEREALSPEAR = 27
CONST_ANI_ICE = 28
CONST_ANI_EARTH = 29
CONST_ANI_HOLY = 30
CONST_ANI_SUDDENDEATH = 31
CONST_ANI_FLASHARROW = 32
CONST_ANI_FLAMMINGARROW = 33
CONST_ANI_SHIVERARROW = 34
CONST_ANI_ENERGYBALL = 35
CONST_ANI_SMALLICE = 36
CONST_ANI_SMALLHOLY = 37
CONST_ANI_SMALLEARTH = 38
CONST_ANI_EARTHARROW = 39
CONST_ANI_EXPLOSION = 40
CONST_ANI_CAKE = 41
CONST_ANI_WEAPONTYPE = 254
CONST_ANI_NONE = 255
CONST_ANI_LAST = CONST_ANI_CAKE
 
@Mustafa1337


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 0)

local bow_c = {
[13480] = createConditionObject(CONDITION_FIRE)
}
setConditionParam(bow_c[13480], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[13480], 15, 2000, -30)

function onUseWeapon(cid, var)
local wid = getPlayerWeapon(cid, true).itemid -- If getPlayerWeapon doesn't work on your server, locate ID of the weapon via another means, e.g. getPlayerSlotItem and store it in this var
if getCreatureTarget(cid) ~= 0 then
if bow_c[wid] then
doTargetCombatCondition(cid, getCreatureTarget(cid), bow_c[wid], CONST_ME_FIRE)
end
end
return doCombat(cid, combat, var)
end




<!-- magma bow -->
<distance id="2544" event="script" value="magmabow.lua"/>
 
You have this bow 13480 in your items.xml? because I searched for this in TFS 0.4 datapack and couldn't find it.
 
yes i create new bow, and id is 13480. i create in 7874 now.
still wrong


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 0)

local bow_c = {
[7874] = createConditionObject(CONDITION_FIRE)

}
setConditionParam(bow_c[7874], CONDITION_PARAM_DELAYED, 33)
addDamageCondition(bow_c[7874], 15, 2000, -8)

function onUseWeapon(cid, var)
local wid = getPlayerWeapon(cid, true).itemid -- If getPlayerWeapon doesn't work on your server, locate ID of the weapon via another means, e.g. getPlayerSlotItem and store it in this var
if getCreatureTarget(cid) ~= 0 then
if bow_c[wid] then
doTargetCombatCondition(cid, getCreatureTarget(cid), bow_c[wid], CONST_ME_FIRE)
end
end
return doCombat(cid, combat, var)
end


dont give condition fire now and
when I put flaming arrow, all bows do the effect.


this script below is the one that worked the most for me, but it doesn't work, and when it comes out, it's done in all the bows



local bowid = 7874
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 33)
addDamageCondition(condition, 15, 2000, -30)


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 0)

function onUseWeapon(cid, var)
local slotleft = getPlayerSlotItem(cid,CONST_SLOT_LEFT)
local slotright = getPlayerSlotItem(cid,CONST_SLOT_RIGHT)
if slotleft.itemid == bowid or slotright.itemid == bowid and getCreatureTarget(cid) then
doTargetCombatCondition(cid, getCreatureTarget(cid), condition, CONST_ME_FIRE)
end
return doCombat(cid, combat, var)
end
 
Last edited:
Back
Top