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

globalevents

Dominik ms

Member
Joined
Jan 20, 2010
Messages
424
Reaction score
6
How to use this funcion for all monster, not only rat??

PHP:
function onThink(cid, interval, lastExecution)
   local tbl = getCreatureByName("Rat")
       doCreatureSay(tbl, "jaja")
   return true
end

this work, but for players, how to chcech worldMonsters??
PHP:
function onThink(cid, interval, lastExecution)

for i, v in ipairs(getPlayersOnline()) do
doPlayerSendTextMessage(v, MESSAGE_INFO_DESCR, "Tresc wiadomosci.")
return true
end
end
 
Last edited:
Code:
getWorldCreatures(type)
function onThink(cid, interval, lastExecution)
   local tbl = getCreatureByName(getWorldCreatures(1))
       doCreatureSay(tbl, "jaja")
   return true
end
I think
 
Slaktaren I think it should be without getCreatureByName...
No one works :/ I tried it a lot of combinations, but nothing :/
 
Last edited:
Slaktaren
Creature not found ;/

i need something like this

PHP:
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
		if getCreatureSummons(target) ~= 0 then
			doMonsterChangeTarget(getCreatureSummons(target), cid)
return true
end
		if getCreatureSummons(target) == 0 then
return true
end
end

for wild monster
if player have summon, then wild monster attack player summons
 
Back
Top