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

{Creaturescript + Movement, hard}

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
When monster die a teleport in position x¹ is removed. A new teleport appears in X¹ place with actionID. After 30 seconds the new teleport desapears and old apears with cordinates X, Y, Z.

Is it possible? Script plz :D
 
try this:

0.3.6pl1

Lua:
local a = 2481 -- actionid
local ip,p,pt = 1370,{x=1,y=1,z=7},{x=1,y=1,z=7} -- teleport itemid, teleport pos, position to teleport to.
local m = 'GanjaMon' -- monster name
function onKill(cid,target)
	if getCreatureName(target):lower() == m:lower() then
		if getTileItemById(p,ip).uid > 0 then -- change 1370 to your teleport's itemid.
			doRemoveItem(getTileItemById(p,1370).uid)
			doSetItemSpecialDescription(doCreateTeleport(ip,pt,p),'aid',a)
			addEvent(doRemoveTp,30*1000)
		end
	end
	return true
end

local ptt = {x=1,y=1,z=7} -- where to tp to with old teleport.
function doRemoveTp()
	doRemoveItem(getTileItemById(p,1370).uid)
	doCreateTeleport(doCreateTeleport(ip,ptt,p)
end
 
try this:

0.3.6pl1

Lua:
local a = 2481 -- actionid
local ip,p,pt = 1370,{x=1,y=1,z=7},{x=1,y=1,z=7} -- teleport itemid, teleport pos, position to teleport to.
local m = 'GanjaMon' -- monster name
function onKill(cid,target)
	if getCreatureName(target):lower() == m:lower() then
		if getTileItemById(p,ip).uid > 0 then -- change 1370 to your teleport's itemid.
			doRemoveItem(getTileItemById(p,1370).uid)
			doSetItemSpecialDescription(doCreateTeleport(ip,pt,p),'aid',a)
			addEvent(doRemoveTp,30*1000)
		end
	end
	return true
end

local ptt = {x=1,y=1,z=7} -- where to tp to with old teleport.
function doRemoveTp()
	doRemoveItem(getTileItemById(p,1370).uid)
	doCreateTeleport(doCreateTeleport(ip,ptt,p)
end

I loled hard at the monster name :D
 
Back
Top