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

How to release invisible monster to receive SD or HMM?

bpm91

Intermediate OT User
Joined
May 23, 2019
Messages
931
Solutions
7
Reaction score
128
Location
Brazil
YouTube
caruniawikibr
I've been searching for many days and the maximum I found was a rune function, but it is in version 1.2 tfs


but i use tfs 0.4


function onCastSpell(cid, var, isHotkey)
if Tile(var:getPosition()):getTopCreature() then
return doCombat(cid, combat, var)
end
end



how to solve?
 
Maybe:
Code:
function onCastSpell(cid, var, isHotkey)
    local position = var.pos
    position.stackpos = 253
    if getThingFromPos(position, false).itemid == 1 then
        return doCombat(cid, combat, var)
    end
    return false
end
 
Maybe:
Code:
function onCastSpell(cid, var, isHotkey)
    local position = var.pos
    position.stackpos = 253
    if getThingFromPos(position, false).itemid == 1 then
        return doCombat(cid, combat, var)
    end
    return false
end



does not work


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

function onGetFormulaValues(cid, level, maglevel)
min = (level * 1.5 + maglevel * 2.0) * 2
max = (level * 1.8 + maglevel * 2.0) * 2

if min < 250 then
min = 250
end

return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")


function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end





I thought she might turn into an area to hit, but that would make her hit the floor when the monster missed
 
If you removed this
XML:
needtarget="1"
then you'll be able to shoot it on invisible monsters but it will work on empty grounds too like, explosions/avalanche etc..
That can be temporary solution I think so, use it if it suit your needs.
 
If you removed this
XML:
needtarget="1"
then you'll be able to shoot it on invisible monsters but it will work on empty grounds too like, explosions/avalanche etc..
That can be temporary solution I think so, use it if it suit your needs.
that doesn't solve it, I can hit sd on the floor
 
That is what I said, it will allow you to hit invisible monsters but it will also allow you to use SD on floors.
I think you'll need source edit to make it working I have seen a code on OTX but I can't copy or make same on TFS.
 
That is what I said, it will allow you to hit invisible monsters but it will also allow you to use SD on floors.
I think you'll need source edit to make it working I have seen a code on OTX but I can't copy or make same on TFS.

Hey mustafa

I have a problem with that flaming bow condition script. why all the bows are coming out of the flaming bow effect.

See Screenshot_1.jpg
Screenshot_2.jpg
Screenshot_3.jpg

do you know how i make pro effect only come out in 1 specific bow?


local bowid = 13480
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 6, 2000, -30)

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)


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




while sd i don't know what to do. but in the link above the boy made a work for tfs 1.2
 
Why you merge both threads in 1? trying using this one, Edit to your bow ids and edit your distanceeffect.
Lua:
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)

local bow_c = {
     [8855] = createConditionObject(CONDITION_FREEZING),
     [8856] = createConditionObject(CONDITION_POISON)
}
setConditionParam(bow_c[8855], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[8855], 15, 2000, -8)

setConditionParam(bow_c[8856], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[8856], 15, 2000, -6)
     
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
 
ok i will test.

Lua:
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)

local bow_c = {
     
     [13480] = createConditionObject(CONDITION_FIRE)
   
}
setConditionParam(bow_c[13480], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[13480], 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



now there is no fire, and no flaming effect arrow
 
Last edited by a moderator:
Try this one

Lua:
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, -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
 
Post how did you add it in weapons.xml and I suggest you posting it in your other thread related to bow effect because you merged both threads and destroyed this one.
 
release invisible monsters to receive runes like sd or hmm
going to post it here in case anyone else use search and read this post
 
Back
Top