• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Creating monster, need delay after the voice interval.

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,477
Solutions
18
Reaction score
195
Location
Sweden
So this is the problem:

I want the monster to say something each time he goes invisible, the problem is that the voice just repeats the interval counting afterwards its been said.

This is it how it looks right now, maybe it would be able to interact this file with a creaturescripts file, but not sure how it would look, at least not right now.
Code:
        <defense name="invisible" interval="10000" chance="50000" duration="2000">
            <attribute key="areaEffect" value="fire"/>
        </defense>

Code:
    <voices interval="10000" chance="10000">
        <voice sentence="Dont let your eyes blind you."/>
    </voices>

That makes it say 2 seconds earlier next time, and 4 seconds after that etc..

If you would been able to have a delay on 2 seconds afterwards each time it would be just perfect but as far as i know there is no delay system on this part.

Regards,
Mjmackan.
 
You need to make a custom invisible spell, and right there put the monster to say what you want

make a file called "custominvisible.lua"

and add this
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 200000)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
 doCreatureSay(cid, TALKTYPE_ORANGE_2, "Dont let your eyes blind you.")
 return doCombat(cid, combat, var)
end

Where you can see the "dont let your eyes blind you", is what the monster will say, then, open spells.xml and add this

Code:
<instant group="support" spellid="161" name="InvisibilityCUSTOM" words="ehbqwgvr gewrf" lvl="35" mana="440" aggressive="0" selftarget="1" exhaustion="2000" groupcooldown="2000" needlearn="0" script="support/custominvisible.lua">
 <vocation name="Sorcerer"/>
 <vocation name="Druid"/>
 <vocation name="Master Sorcerer"/>
 <vocation name="Elder Druid"/>
 </instant>

remember that you don't want players using this, so the words are crazy, also i'm giving you this code supposing that you are using the newest TFS because you didn't say anything about your distro, after add this, change the line in the monsters file

find this
Code:
<defense name="invisible" interval="10000" chance="50000" duration="2000">
<attribute key="areaEffect" value="fire"/>
</defense>

and put this:
Code:
<defense name="InvisibilityCUSTOM" interval="10000" chance="50000" duration="2000">
<attribute key="areaEffect" value="fire"/>
</defense>

I didn't test it, maybe it have errors, try please
 
Back
Top