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

Requesting Pet helper

Wipflash

Old School
Joined
Jul 27, 2010
Messages
1,101
Reaction score
87
Location
Sweden
Hello . i'am requesting a script/spell that summon/dissmess a pet that only paladins can use .

It assist u in fights . And if someone have time to make one more script thats tame monsters i write in the scripts :> I hope u get it . "/
 
not like that. i wan't it to attack when u attack a target, and if u give it food then the pet will regain health if it heart. and dissmess/summonpet
 
You think it's cool to post on internet that you are stoned? and you called me a kid a while ago haha

No, I don't think it is cool, I'm just telling him why I'm up to make this script.
You might think it is cool, but that's your problem not mine :).
Oh and don't go off topic, think that's cool mofo?
 
no, but the pet should damage about the same as owner does.¨
Or just 150-200 all the time

You must set that in the monster file.

LUA:
local name = 'elf' -- name of summon
local exhausttime = 60 -- how many seconds exhaustion.

local function check(cid) 
 local checked = 0 
 local place = {x=0,y=0,z=0} 
 local h = getThingPos(cid) 
 local frompos = {x=h.x-2,y=h.y-2,z=h.z} 
 local topos = {x=h.x+2,y=h.y+2,z=h.z} 
	for g = frompos.x,topos.x do 
		for d = frompos.y,topos.y do 
		 local poss = {x=g,y=d,z=h.z} 
		 local tid = getTopCreature(poss).uid 
			if isMonster(tid) or isPlayer(tid) or getTilePzInfo(poss) == TRUE or doTileQueryAdd(cid, poss) ~= 1 then 
				checked = checked + 1 
			else 
				place.x = poss.x 
				place.y = poss.y 
				place.z = poss.z 
			break 
			end 
	$	end 
	end 
	if checked >= 25 then 
		return checked 
	elseif checked < 25 then 
		return place 
	end 
	return true 
end 

function onSay(cid,words,param)
local v = getThingPos(cid)
local s = {exhaust=5023,summon=5024}
	if isPaladin(cid) then
		if isInArray({'!summon','/summon'},words:lower()) then
			if exhaustion.check(cid,s.exhaust) then
				doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You can summon again in '..exhaustion.get(cid,s.exhaust)..' seconds!')
				doSendMagicEffect(v,CONST_ME_POFF)
				return true
			end
			
			if getPlayerStorageValue(cid,s.summon) ~= -1 then
			local search = false
				if(#getCreatureSummons(cid) >= 1) then 
					for _,pid in ipairs(getCreatureSummons(cid)) do 
						if getCreatureName(pid):lower() == name:lower() then 
							search = true  
							break 
						end 
					end 
				end
				if search == true then
					doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You already have a summon!')
					doSendMagicEffect(v,CONST_ME_POFF)
					return true
				else
					setPlayerStorageValue(cid,s.summon,-1)
				end
			end
			
			if not(tonumber(check(cid)))then 
				doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You summoned your '..name..'!')
				local pet = doSummonCreature(name:lower(), check(cid))
				setPlayerStorageValue(cid,s.summon,pet)
				doSendMagicEffect(v,CONST_ME_MAGIC_GREEN)
				exhaustion.set(cid,s.exhaust,exhausttime)
			else 
				doPlayerSendCancel(cid,'You can\'t summon here.') 
				doSendMagicEffect(getThingPos(cid),CONST_ME_POFF)
			end
		elseif isInArray({'!dismiss','/dismiss'},words:lower()) then
			if(#getCreatureSummons(cid) >= 1) then 
				for _,pid in ipairs(getCreatureSummons(cid)) do 
					if getCreatureName(pid):lower() == name:lower() then 
						doRemoveCreature(pid)
						break
					end 
				end
				doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You dismissed your pet!')
				doSendMagicEffect(v,CONST_ME_MAGIC_RED)
			end
			return true
		end
	else
		doPlayerSendCancel(cid,'Only paladins can use this.')
		doSendMagicEffect(v,CONST_ME_POFF)
	end
	return true
end
 
I added this in talkaction
Code:
 <talkaction words="!dismiss;/dismiss" event="script" value="pet.lua"/>
	 <talkaction words="!summon;/summon" event="script" value="pet.lua"/>

and your script but when i say !summon no pet arrives "/
 
ye . this :
gvvgwlkrmm.png
 
Back
Top