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

Summon follows on talkaction.

Chaos ruler

New Member
Joined
Dec 1, 2008
Messages
73
Reaction score
0
Location
The Netherlands
I wanted to make a talkaction that teleports my summon.

For example /command "Bat <-- and i should teleport in me.. But on some reason it doesn't work. But it should only teleport my summon, not the summon of my enemy.

Code:
function onSay(cid, words, param)
	if param == "" then
			doPlayerSendTextMessage(cid, 22, "Please specify one of your summons.")
	else
		if getCreatureSummons(cid) == getCreatureByName(param) then
			if getCreatureName(getCreatureByName(param)) == TRUE and getCreatureMaster(getCreatureByName(param)) == cid then 
				doTeleportThing(getCreatureByName(param), getCreaturePosition(cid), TRUE)
			else
				doPlayerSendTextMessage(cid, 22, "You do not have that monster summoned.") 
			end
		end
	end	
 return true    
end

Also Credits to Kyoushirou who made it. He said it wasn't tested yet, but what could be wrong?

Thanks in advance!

Develutions 8.10 btw.
 
Lua:
function onSay(cid, words, param)
	if param == '' then
		doPlayerSendCancel(cid, 'Please specify one of your summons.')
	else
		param = param:lower()
		for _, sid in ipairs(getCreatureSummons(cid)) do
			if param == getCreatureName(sid):lower() then
				return doTeleportThing(sid, getCreaturePosition(cid))
			end
		end
		doPlayerSendCancel(cid, 'You don\'t have that monster summoned.')
	end	
	return true    
end
 
When i try it, it says: Attempt to call global 'getCreatureSummons' <a nil value>

Edit: It doesn't work. If i do /command " <--- it shows that i have to specify my summons.
But if i do /command "Bat <--- Nothing happends.
 
Back
Top