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

Having trouble with summon talkaction

Omen

New Member
Joined
Sep 11, 2008
Messages
70
Reaction score
0
I wrote this and after alot of fixes my monsters are "do not eist" or something like that, can someone help?

<monster name="Mage Pet 200" file="Bosses/MagePet200.xml"/>
<monster name="Mage Pet 200" nameDescription="a pet" race="blood" experience="0" speed="210" manacost="10000000000">

Code:
function onSay(cid, words, param, channel)
	local effect = CONST_ME_MAGIC_RED
	local cost = getCreatureMaxMana(cid)
	if(param == '200') then
		if isKnight(cid) then
			doConvinceCreature(cid, doCreateMonster("Mage Pet 200", pos))
			doCreatureAddMana(cid, -cost)
			doSendMagicEffect(getCreaturePosition(cid), effect)
		else
			doConvinceCreature(cid, doCreateMonster("Tank Pet 200", pos))
			doCreatureAddMana(cid, -cost)
			doSendMagicEffect(getCreaturePosition(cid), effect)
		return true
		end
	end	
end
 
Code:
function onSay(cid, words, param, channel)
	if(param == '200') then
		doSummonMonster(cid, (isKnight(cid) and "Mage" or "Tank") .. " Pet 200")
		doCreatureAddMana(cid, -getCreatureMaxMana(cid), false)
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	end
	return true
end
 
Last edited:
Thanks for shoring it up, but this just doesnt work the way I need it to. and its still saying that my monster doesnt exist
 
Then explain how you want it? I just shortened the script you posted :/

Also, edited post :/ should work now
 
Last edited:
Like this, but for some reason the damn monster doesnt exist

Code:
function onSay(cid, words, param, channel) 
    if(param == '') then
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please enter a level or password.")
     return true
	elseif(param == '200') then
		if getPlayerLevel(cid) > 199 then
			if getPlayerVocation == 4 or getPlayerVocation == 8 or getPlayerVocation == 12 then
				doConvinceCreature(cid, doSummonCreature ("Mage Pet 200", pos))
				doCreatureAddMana(cid, -getCreatureMaxMana(cid), false)
				doPlayerAddSpentMana(cid, getCreatureMaxMana(cid))
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
			else	
				doConvinceCreature(cid, doSummonCreature ("Tank Pet 200", pos))
				doCreatureAddMana(cid, -getCreatureMaxMana(cid), false)
				doPlayerAddSpentMana(cid, getCreatureMaxMana(cid))
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
			end
			return true
		end
	end	
end
 
Code:
function onSay(cid, words, param, channel)
	v = doSummonCreature((isKnight(cid) and "Mage" or "Tank") .. " Pet 200", getThingPos(cid))
	return param == "200" and doConvinceCreature(cid, v) and doCreatureAddMana(cid, -getCreatureMaxMana(cid), false) and doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) or param == "" and doPlayerSendTextMessage(cid, 27, "Please enter a level or password.")
end
 
Back
Top