• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Ungreez TFS 0.3.5

Zibi

New Member
Joined
Jun 18, 2009
Messages
10
Reaction score
0
Proboje napisac skrypt - jesli monster padnie to..
Jednak caly czas nie dziala ;/

Skrypt podany w temacie Kill Monster & Create Teleport przerabialem na wszelaki sposob i nic.. najwyzej jakis blad sie wyswietlil ;p


Gdy wpisuje onDeath to:
[19/08/2009 08:07:01] [Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/ungreez.lua)
staralem sie zmienic Death na Kill ale nie wiem czy robie to prawidlowo.

Uzywam TFS 0.3.5

z gory dziekuje za odp
 
PHP:
local config = {
	message = "Go into the teleporter in 3 minutes, else it will disappear.",
	timeToRemove = 180, -- seconds
	teleportId = 1387,
	bosses = { -- Monster Name, Teleport To Position, Teleport Position
		["koshei the deathless"] = {{x=1605,y=1264,z=12}, {x=1615,y=1228,z=12, stackpos = 1}},
			}
}

local function removal(position)
	if getThingfromPos(position).itemid == config.teleportId then
		doRemoveItem(getThingfromPos(position).uid)
	end
	return TRUE
end

function onDeath(cid, corpse, killer)
	local position = getCreaturePosition(cid)
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(cid) then
			teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, pos[2])
		end
	end
	return TRUE
end
Ja używam takiego i działa .
Code:
	<event type="death" name="[COLOR="Red"]koshei[/COLOR]" script="koshei.lua"/>
W data/monster/../koshei the deathless.xml
<script>
<event name="koshei"/>
</script>
 
na 0.3.5?
[19/08/2009 08:07:01] [Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/ungreez.lua)
bez zmian bo ja niestedy mam ten problem z death, testowalem na kill i tez nic

czym sie rozni death od kill ? [death - ten o ktorego nam chodzi zostal zabity / kill - ten o ktorego nam chodzi zabil cos] tak ?

pozatym przy przywolaniu ungreeza pojawia mi sie cos takiego:
[19/08/2009 10:07:37] Warning: [Monster::Monster]. Unknown event name - PlayerKill

a taki event nie jest tam podany :blink: , jesli wpisze

<script>
<event name="PlayerKill"/>
</script>
zamiast
<script>
<event name="ungreez"/>
</script>
to tez nic nie dziala ale ten blad sie nie wyswietla
 
Albo możesz użyć takiego że zamiast twożyć teleport daje komuś teleport :
function onKill(cid, target)
if (getCreatureName(target) == "Ungreez") then
setGlobalStorageValue(5544, -1)
doTeleportThing(cid, {x=xxxx,y=yyyy,z=zz})
end
return TRUE
end
 
Back
Top