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

Koshei The Deathless

d4rkbl0od

Member
Joined
Mar 21, 2008
Messages
160
Reaction score
7
Hi!
Well, I need some help to do a script that when koshei the deathless dies, the player has 10 seconds to use the amulet on him else he will respawn from the dead body!
Is it possible? creaturescript?

I cant even imagine of how to do this ;O hahaha

Please a help!

Thanks!
 
Lua:
function onKill(cid, target, lastHit)
if isPlayer(cid) then
   if isMonster(target) then
      if getCreatureName(target) == 'Koshei the deathless' then
         doCreatureSay(target, "Whatever this idiot says", TALKTYPE_ORANGE_1)
         addEvent(doSummonCreature, 1000*10, 'Koshei the deathless', getCreaturePosition(target))
         addEvent(doRemoveItem, 1000*10, getThingfromPos(getCreaturePosition(target).uid))
      end
   end
end
return true
end
 
Lua:
function check(p)
	local corpse = getTileItemById(p, 8272).uid
	if corpse ~= 0 then
		doRemoveItem(corpse)
		doCreateMonster('Koshei the Deathless', p)
		doSendMagicEffect(p, CONST_ME_TELEPORT)
	end
end

function onKill(cid, target, lastHit)
	if lastHit and isMonster(target) and getCreatureName(target):lower() == 'koshei the deathless' then
		addEvent(check, 10500, getThingPos(target))
	end
	return true
end
8269 = corpse ID after you use the amulet on it
8271 = normal corpse ID (for Koshei the Deathless.xml)
8272 = moveable corpse ID that it gets if you don't use an amulet on it

items.xml
Code:
	<item id="8269" article="a" name="slain lich">
		<attribute key="containerSize" value="7"/>
		<attribute key="decayTo" value="8273"/>
		<attribute key="duration" value="10"/>
		<attribute key="corpseType" value="undead"/>
	</item>
	<item id="8271" article="a" name="slain lich">
		<attribute key="containerSize" value="7"/>
		<attribute key="decayTo" value="8272"/>
		<attribute key="duration" value="10"/>
		<attribute key="corpseType" value="undead"/>
	</item>
	<item id="8272" article="a" name="slain lich">
		<attribute key="decayTo" value="8273"/>
		<attribute key="duration" value="300"/>
		<attribute key="corpseType" value="undead"/>
	</item>
	<item id="8273" article="a" name="slain lich">
		<attribute key="decayTo" value="8274"/>
		<attribute key="duration" value="300"/>
		<attribute key="corpseType" value="undead"/>
	</item>
	<item id="8274" article="a" name="slain lich">
		<attribute key="decayTo" value="60"/>
		<attribute key="corpseType" value="undead"/>
	</item>
 
Last edited:
cyko,
<event type="kill" name="koshei the deathlessdeath" event="script" value="Koshei The Deathless.lua"/>
on .xml


on login
registerCreatureEvent(cid, "koshei the deathlessdeath")

the servers keeps crashing :S
 
Back
Top