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

Target question

izaak

New Member
Joined
Feb 1, 2009
Messages
161
Reaction score
3
im making a script at the moment but i dont know how to define myself
by that i mean

(getCreatureTarget(cid)

what i want to know is how do i define myself?
like

if (getCreatureTarget(cid) == me) then

but not me as is if (getCreatureTarget(cid) == Player)
but me as in a creature so that i can use it not only to do something when its a player but also a npc or a monster
 
Last edited:
iam testing something because i want this to work

Code:
function onCastSpell()
local Creature = Target
local Target ={
[1] = isNpc,
[2] = isPlayer,
[3] = isMonster
}
if (Target.getCreatureTarget(cid) == false) then
target = false
else
if (Target.getCreatureTarget(cid) == target) then
target = true
end	
return true
end
end
 
Last edited:
Lua:
function onCastSpell(cid, var)
local creaturet = getCreatureTarget(cid)
local target = {
[1] = isNpc(creaturet),
[2] = isPlayer(creaturet),
[3] = isMonster(creaturet)
}
for i = 1,3 do
if target[i] then
----
else
---
end
end
return true
end
 
Back
Top