• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Old

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Solutions
2
Reaction score
115
New script has been released.

Regards,
JDB.
 
Last edited:
@Streamside,
Unnecessary, but thanks.

Comments? ^_^
 
Thanks alot mate! Thanks for writing it to me also. +rep

TESTED on dev 0.4.x

EDIT: owww.... bad news!

[21:10 You see a magic forcefield.] Still is there after 60 seconds. It don't dissapear but it creates, any ideas?
 
Last edited:
No more comments?...
I thought I saw last time that a lot of people wanted this. :huh:
 
No more comments?...
I thought I saw last time that a lot of people wanted this. :huh:

Oh mate, I have an update about the problem.

This is how it goes on 0.4
1. Kill boss
2. Teleport appears
3. Teleport stopworking
4. Teleport don't dissapear
5. Teleport remains there, walkable until next boss dies.

Strange?:D
 
Well that is weird, I don't know how to get 0.4 running so I'm not going to be able to test it yet.
When 0.4 is released I'll be sure to update.

Kind of sucks..I just fixed it.

Use 0.3.6pl1? :huh:
 
can anyone explain why my monsters don't die when I use this? Also one thing. how would I make it to work on a tile like carpet?

Fixed this
I'm useing TFS 0.3.2
I went to onDeath because when I was killing things they where not dieing. So when I did that they would die, but my script was not executing properly since the target was dead and messed up the line
Code:
local monster = m[getCreatureName(target)]
so i changed that line to
Code:
local monster = m["Dog"]
Then with that. My portal was appearing, But when I player died the portal appeared as well since it was a register even in login so I removed that line and everything worked fine.
Code:
registerCreatureEvent(cid, "MonsterPortal")



My working script for TFS 0.3.2 Credits to JDB
The thing I like about it this way is I can add other things more specific to the mob with code used like this, Like Magic walls or pillars appearing around the portal for each instance or different magic effects.

Code:
data/creaturescripts/creaturescripts.xml
<event type="death" name="MonsterPortal" event="script" value="monster_portal.lua"/>

data/creaturescripts/scripts/login.lua -- removed

data/monsters/monster_name.xml
Code:
<script>
	<event name="MonsterPortal"/>
</script>

data/creaturescripts/scripts/monster_portal.lua
Code:
function onDeath(cid, target, lastHit)
	local m = {
		["Dog"] = {
			time = 10, -- Seconds
			to = { x = 95, y = 117, z = 7 }, -- Where Teleport Goes
			tp = { x = 95, y = 120, z = 7 } -- Where Teleport Creates
		},
	}
	local monster = m["Dog"]
		local function deleteTeleport()
			local teleport = getTileItemById(monster.tp, 1387)
			if(teleport.uid > 0) then
				doRemoveItem(teleport.uid)
				doSendMagicEffect(monster.tp, CONST_ME_POFF)
				doSendAnimatedText(monster.tp, "Closed", TEXTCOLOR_RED)
			end
			return true
		end
	if(monster) then
		doCreateTeleport(1387, monster.to, monster.tp)
		addEvent(deleteTeleport, monster.time * 1000)
		doCreatureSay(cid, "You have " .. monster.time .. " seconds to escape!", TALKTYPE_ORANGE_1)
	end
	return true
end
 
Last edited:
@2Up,

Yea that might work but now it is not configurable for more than one monster.
I suggest you use 0.3.6pl1, it works.
 
I would goto a newer version of the server like 0.3.6pl1 but I'm running 8.4 protocol and I don't know how to compile that to work on 8.4
I don't mind that it will only work for one creature, I can all ways make another for another creature and different effects and maybe adding storage id's
 
Last edited:
One issue with the whole script that I've had though. How can i get my teleporter to open on carpet
 
It works just fine, I have tested it two times.
 
Back
Top