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

[Request] Create or delete a wall when a monster die.

DX~

New Member
Joined
Mar 29, 2008
Messages
148
Reaction score
0
Hello!

I tried to make this script by myself but it doesnt work :(, I tried too use the scripts of svargrond arena by gesior but doesnt work either

So if some knows how to make this script, please help me.

Thanks in advance.
 
Ok this script I made for my server is a quest where you got to kill 3 angels and then you got the prize.

angelDeath.lua :
Code:
local pedestalPos =
{
	{x = 304, y = 272, z = 3, stackpos = 1}, -- Warrior Statue
	{x = 306, y = 272, z = 3, stackpos = 1}, -- Archer Statue
	{x = 308, y = 272, z = 3, stackpos = 1} -- Wizard Statue
}
local triggerName = {"Angel warrior", "Angel archer", "Angel wizard"} -- Put the right monster name down there: Mine works with angels I made.
local statueID = {8836, 3739, 8834}
function onKill(cid, target)
local monster = getCreatureName(target)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, monster)
	if isInArray(monster, triggerName) then
		for i = 1, 3 do
			if monster == triggerName[i] then
				doTransformItem(getThingfromPos(pedestalPos[i]).uid, statueID[i])
				doSendMagicEffect(pedestalPos[i], CONST_ME_HOLYAREA)
			end
		end
	end
end

When you kill one of them, a statue of him is placed back on its pedestal.

Now you got add the script to creaturescript. (Add)
creaturescript.xml :
Code:
<event type="kill" name="Angeldeath" script="angelDeath.lua"/>

And finally register the creature event. (Add)
login.lua :
After "onLogin(cid)"

Code:
registerCreatureEvent(cid, "Angeldeath")

Well here you are, just customize the script to go with wall (probally not decaying Magic wall "1497") and change doTransformItem() with doRemoveItem().

Have fun and just PM me if you got trouble!
 
Back
Top