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

Demonguard (NPC)

Sir Richard

New Member
Joined
Jun 10, 2009
Messages
19
Reaction score
3
Location
Brazil
Hey there, guys! Could anyone help me creating a npc that sets the player on fire? But it's more like this, saying hi, or ANYTHING else, NEXT to him will trigger this event, he will always reply "Die, intruder!" and end the conversation, setting you on fire for x turns and sending an animation to the player's position and one on himself. By the way, that's the rl tibia Demonguard npc (pits of inferno quest). Thanks in advance! :p

-Richard
 
please delete this post ^^
Richard contact me via pm, I'll send you this code
 
Last edited:
Code:
function onCreatureSay(cid)

    if (getDistanceToCreature(cid) == 1) then
        selfSay("Die, intruder!")
        doAddCondition(cid, 2)
        doCreatureAddHealth(cid, -25)
        doSendMagicEffect({x=32854, y=32318, z=10}, 15)
        doSendMagicEffect(getCreaturePosition(cid), 15)
    end

end
 
Last edited:
Code:
function onCreatureSay(cid)

    if (getDistanceToCreature(cid) == 1) then
        selfSay("Die, intruder!")
        doAddCondition(cid, 2)
        doCreatureAddHealth(cid, -25)
        doSendMagicEffect({x=32854, y=32318, z=10}, 15)
        doSendMagicEffect(getCreaturePosition(cid), 15)
    end

end

I don't know why but he change the outfit to female pirate all red color's? ;/

EDIT: I've done a little differently and this it works. Thanks mulle for help.


Code:
local fire = createConditionObject(CONDITION_FIRE)
addDamageCondition(fire, 10, 2000, -10)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -10)
setCombatCondition(combat, condition)

function onCreatureSay(cid)

    if (getDistanceToCreature(cid) == 1) and isPlayer(cid) == TRUE then
        selfSay("Die, intruder!")
        doTargetCombatCondition(0, cid, fire, 4)
        doSendMagicEffect(getThingPos(getNpcCid()), CONST_ME_YELLOW_RINGS)
        doCombat(cid, combat, var)
        doSendMagicEffect({x=32854, y=32318, z=10}, 15)
end
return true
end
 
Last edited:
Back
Top