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

TalkAction Create/Remove Monster (GM's chase monsters no more!)

gigastar

Member
Joined
Jan 25, 2009
Messages
252
Reaction score
15
Unforuinatly I cannot test but this script is for TFS 3.4 (8.54).

In talkaction.xml

Code:
<talkaction log="yes" words="!create;!remove" access="4" event="script" value="monscreate.lua"

in talkaction scripts make monstercreate.lua file. put this.

Code:
local monsters = {
	 "demon",
	 "orshabaal",    -- monsters that can be created --
	 "morgaroth"
}

local posTeleport = getPlayerPosition(cid)
local specMonsStorage = 1000 -- storage value of the special monster --

local checkMap = getArea(pos, mapX, mapY)
local mapX = {x = 1000, y = 1000, z = 7, stackpos = 1}  -- top left of map --
local mapY = {x = 1000, y = 1000, z = 7, stackpos = 1}  -- bottom right of map --

local useMagicEffect = false -- use a magic effect when creating monster? --
local magicEffect = 10 -- use this magic effect --



local onSay(cid, word, param)
if (param == remove) then
if t[1] == true then
	if checkMap and getCreatureName(monsters.name) then
		if getCreatureStorageValue(monsters.name) == specMonsStorage then
			doRemoveCreature(monsters.name)
		else
			doPlayerSendCancel(cid, "There are no special monsters on the map.")
		return false
	end
		else
			doPlayerSencCancel(cid, "This is not a special monster!")
		return false
	end
		else
			doPlayerSendCancel(cid, "You need to type the monsters name.")
elseif	(param == create) then
	if t[1] == true then
		doCreateMonster(t[1], posTeleport)
	if (useMagicEffect) == true then
		doSendMagicEffect(posTeleport, magicEffect)
	else
		doPlayerSendCancel(cid, "You must type a monster!")
	return false
	
end
end
 
Kinda useless you can convince the creature instead and tp to temple then it will be gone too.
 
make the creature non convincable? it spawns a monstert hat you make form your monsters.xml
 
There is a flag for gms that they can convince everything, which would make sense if they can create all monsters.
 
Please stop filling "Resources" with incomplete scripts...
 
Back
Top