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

[CREATURE EVENT] How i i can doo this(TARGETMONSTERS) ..

lenon00

New Member
Joined
Feb 5, 2010
Messages
21
Reaction score
0
Anyone know how to make a function onThink to do this :


When the player have a summon, the monsters target your summon, not others monsters and players ? Anyone Know?
 
or
Lua:
doMonsterChangeTarget(cid)
doMonsterSetTarget(cid, target)
heh
 
not tested, I did it fast and slobby too. Bay bay enjoy it xD
Lua:
local playersummons = eyeyee
function onThink(cid, interval)
	if getCreatureSummons(cid) eyeyee) => 1 then
		doMonsterChangeTarget(cid)
		doMonsterSetTarget(cid, target) eyeyee)
	if getCreatureSummons(cid) eyeyee) => 1 then getPlayerFlagValue(cid, flag) false
		end
            return true
	end
end

BILL CLINTON, U AIONT GOT NOTHING ON MEEE YEAAH!!!!!!!!!!
 
Last edited:
Ir returns >

[02/11/2010 14:50:45] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/targetm.lua:3: 'then' expected near 'eyeyee'
[02/11/2010 14:50:45] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/targetm.lua)
[02/11/2010 14:50:45] data/creaturescripts/scripts/targetm.lua:3: 'then' expected near 'eyeyee'


Anyone can help?

I'll explain further:

In this monster.xml the changetargetchance = 0

When I summon the monster, my flag change to,
not take damage, and be ignored by monsters,
the monster continues attacking me, but don`t give damage.
but I wanted when I summon the monsters,
the monster is attacking me, attack my summon,
NO OTHER PLAYER OR OTHER PLAYERS SUMMONS,
only my summon.

Sorry for bad english.

Anyone?


my version is 0.3.6pl1
 
Last edited:
it cant work like this, you're not declaring player summon..

he wants a script to stop monster attacking him, like, the monsters starts attacking him, he summon a monster, then the monster stop attacking him and go killing his summon..
its more like this script, but it also not working.

function onAttack(cid, target)
if isMonster(cid) then
if isPlayer(target) then
monster = getCreatureSummons(target)[1]
doMonsterChangeTarget(cid)
doMonsterSetTarget(cid, monster)
return false
end
end
return false
end
 
Back
Top Bottom