• 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 Summoned Creatures - unattackable

DrComet

New Member
Joined
Nov 25, 2014
Messages
63
Reaction score
3
Hello there! Today I've got a question about summoned creatures. Is this possible to set them unattackable by their summoner? It's a bit stupid that I can attack my own summons with aoe spells for example. Is there any way to make them friendly to me so they won't die by my attacks?

I use TFS 0.3.6

Cheers!
 
Creature script, onStatsChange.

Create a script for onStatsChange.
Code:
function onStatsChange(cid, attacker, type, combat, value)
    -- code goes in here :)
    return true
end

This would go in creaturescripts.xml
Code:
<event type="statschange" name=" name of event " event="script" value="path to script"/>

This would go in login.lua
Code:
registerCreatureEvent(cid, " name of event ")
 
Last edited:
Can someone help with understanding this script? Summons shouldnt be killable by a summoner and party members:
Code:
--[[
if getCreatureSummons(cid) then
    doCreatureSay(cid, "getCreatureSummons cid", TALKTYPE_ORANGE_1)
end

if getCreatureSummons(target) then
    doCreatureSay(cid, "getCreatureSummons target", TALKTYPE_ORANGE_1)
end

if getCreatureMaster(cid) then
    doCreatureSay(cid, "getCreatureMaster cid", TALKTYPE_ORANGE_1)
end

if getCreatureMaster(target) then
    doCreatureSay(cid, " getCreatureMaster target", TALKTYPE_ORANGE_1)
end
]]

function onCombat(cid, target)
   

    return true
end
 
Back
Top