What's new

Unhurried Acarid - nietypowy boss defiler?w.

Status
Not open for further replies.

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Potw?r ten posiada takie umiej?tno?ci:
* Usuwanie magic walli, wild growth, fire/energy/poison field (w przypadku poison fielda ma 25% szans na stworzenie slime),
* Teleportacja do gracza,
* Gdy ma poni?ej 1000 HP i zaczyna ucieka? ma 25% szans na sparali?owanie gracza/u?ycie niewidzialno?ci/u?ycia strong haste,
* Gdy wok?? niego pojawiaj? si? pn?cza to znak, ?e za chwil? wystrzeli wok?? siebie du?e pn?cza, kt?re zabijaj? na miejscu, a HP, kt?re gracz wtedy posiada? przechodzi na bossa (leczy si?),
* Gdy pod graczem pojawiaj? si? zielone "X" to znak, ?e za chwil? w tym miejscu wystrzel? pn?cza, kt?re r?wnie? zabijaj? na miejscu i uleczaj? bossa.

Lecimy do folderu monsters i tworzymy tam plik o nazwie Unhurried Acarid.xml i wklejamy:
PHP:
<?xml version="1.0" encoding="ISO-8859-1"?>
<monster name="Unhurried Acarid" nameDescription="unhurried acarid" race="venom" experience="22500" speed="100" manacost="0">
	<health now="55000" max="55000"/>
	<look type="238" corpse="6532"/>
	<targetchange interval="1166" chance="10"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag convinceable="1"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag staticattack="90"/>
		<flag targetdistance="1"/>
		<flag runonhealth="1000"/>
	</flags>
	<script>
		<event name="Unhurried Acarid"/>
	</script>
	<attacks>
		<attack name="melee" interval="2000" skill="150" attack="100" poison="-320"/>
		<attack name="poison" interval="986" chance="10" range="1" min="-265" max="-313">
			<attribute key="areaEffect" value="plantattack"/>
		</attack>
		<attack name="manadrain" interval="1053" chance="12" radius="4" target="0" min="-453" max="-855">
			<attribute key="areaEffect" value="poison"/>
		</attack>
		<attack name="earth" interval="1002" chance="11" length="3" spread="0" min="-764" max="-1142">
			<attribute key="areaEffect" value="carniphila"/>
		</attack>
		<attack name="poison" interval="1110" chance="12" radius="3" target="1" min="-324" max="-412">
			<attribute key="areaEffect" value="poison"/>
			<attribute key="shootEffect" value="poison"/>
		</attack>
		<attack name="poisoncondition" interval="1193" chance="12" radius="3" target="0" min="-560" max="-600">
			<attribute key="areaEffect" value="greenbubble"/>
		</attack>
		<attack name="earth" interval="901" chance="13" target="1" min="-188" max="-222">
			<attribute key="areaEffect" value="carniphila"/>
			<attribute key="shootEffect" value="earth"/>
		</attack>
	</attacks>
	<defenses armor="35" defense="40">
		<defense name="speed" interval="953" chance="13" speedchange="315" duration="4000">
			<attribute key="areaEffect" value="poff"/>
		</defense>
		<defense name="healing" interval="1010" chance="13" min="164" max="202">
			<attribute key="areaEffect" value="greenspark"/>
		</defense>
		<defense name="healing" interval="987" chance="11" min="76" max="99">
			<attribute key="areaEffect" value="greenspark"/>
		</defense>
	</defenses>
  <elements>
	<element energyPercent="10"/>
	<element icePercent="20"/>
	<element deathPercent="25"/>
	<element holyPercent="40"/>
	<element firePercent="-10"/>
  </elements>
  <immunities>
    <immunity earth="1"/>
	<immunity drunk="1"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="Blubb"/>
  </voices>
	<summons maxSummons="2">
		<summon name="slime" interval="1953" chance="25" max="2"/>
		<summon name="defiler" interval="1953" chance="11" max="1"/>
	</summons>
  <loot>
	<item id="2148" countmax="46" chance="43140"/> --copper coin
	<item id="2148" countmax="33" chance="43140"/> --copper coin
	<item id="2152" chance="12730"/> --silver coin
	<item id="2155" chance="3140"/> --green gem
	<item id="2475" chance="5840"/> --warrior helmet
	<item id="2490;2409" chance="8250"/> --dark helmet,serpent sword
	<item id="7885" chance="2010"/> --terra legs
	<item id="2466" chance="1050"/> --golden armor
	<item id="8880" chance="780"/> --swamplair armor
	<item id="7886" chance="6530"/> --terra boots
	<item id="7590" countmax="3" chance="12580"/> --GMP
	<item id="2509" chance="23210"/> --steel shield
	<item id="2515" chance="14530"/> --guardian shield
	<item id="7405" chance="730"/> --havoc blade
	<item id="2381" chance="10210"/> --halberd
	<item id="2440" chance="6530"/> --daramanian waraxe
	<item id="8849;8857" chance="3540"/> --modified crossbow,silkweaver bow
  </loot>
</monster>
Do monsters.xml dodajemy:
PHP:
<monster name="Unhurried Acarid" file="unhurried acarid.xml"/>
 

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Odp: Unhurried Acarid - nietypowy boss defiler?w.

Idziemy teraz do foleru creaturescripts/scripts i tworzymy tam plik o nazwie Unhurried Acarid.lua i wklejamy:
PHP:
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2500)
setConditionFormula(condition, -0.75, 0, -0.80, 0)

local haste = createConditionObject(CONDITION_HASTE)
setConditionParam(haste, CONDITION_PARAM_TICKS, math.random(1000,5000))
setConditionFormula(haste, 2.00, 50, 4.00, 100)

local invisible = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(invisible, CONDITION_PARAM_TICKS, math.random(1000,5000))

local pos = getCreaturePosition

local fields = {
				[1] = {item_id = {1497,1499}, effect = CONST_ME_TELEPORT},
				[2] = {item_id = {1492,1493,1494}, effect = CONST_ME_MAGIC_RED},
				[3] = {item_id = {1495}, effect = CONST_ME_MAGIC_BLUE},
				[4] = {item_id = {1496}, effect = CONST_ME_MAGIC_GREEN},
				[5] = {item_id = {967}, effect = CONST_ME_MAGIC_RED},
				[6] = {item_id = {11779}, effect = CONST_ME_ASSASSIN}
				}

	local function zabijansko2(p)
		local cid = p.cid
		local loc = p.loc
			doSendMagicEffect(loc, CONST_ME_SMALLPLANTS) 
			local creatureFound = getThingFromPos(loc) 
			if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid and getCreatureName(creatureFound.uid) ~= "slime" then
				local hp = getCreatureHealth(creatureFound.uid)
				doCreatureAddHealth(cid, hp)
				doSendAnimatedText(pos(cid), hp, COLOR_LIGHTGREEN)
				doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -hp, -hp, CONST_ME_CANIPHILA)
			end
	end

	local function efekty(p) 
	local cid = p.cid
	local loc = p.loc
		if isCreature(cid) then
			doSendMagicEffect(loc, CONST_ME_HITBYPOISON)
			doSendMagicEffect(loc, CONST_ME_GREEN_RINGS)
				if p.s < 6 then
					addEvent(efekty, 250, p)
					p.s = p.s + 1
				else
					addEvent(zabijansko2, 1000, {cid = cid, loc = loc} ) 
				end
		end
	end				

	local function zabijansko(p)
		local cid = p.cid
		if isCreature(cid) then
			for nx = (pos(cid).x - 1), (pos(cid).x + 1) do
				for ny = (pos(cid).y - 1), (pos(cid).y + 1) do
					doSendMagicEffect({x=nx,y=ny,z=pos(cid).z}, CONST_ME_BIGPLANTS)
					doSendMagicEffect({x=nx,y=ny,z=pos(cid).z}, CONST_ME_SMALLPLANTS)
					local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }) 
						if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid and isInArray({"slime", "defiler"}, getCreatureName(creatureFound.uid)) == false then
							local hp = getCreatureHealth(creatureFound.uid)
							doCreatureAddHealth(cid, hp)
							doSendAnimatedText(pos(cid), hp, COLOR_LIGHTGREEN)
							doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -hp, -hp, CONST_ME_SMALLPLANTS)
						end
				end
			end
		end
	end

	local function efekt(p) 
        local cid = p.cid
        if isCreature(cid) then
            for nx = (pos(cid).x - 1), (pos(cid).x + 1) do 
                for ny = (pos(cid).y - 1), (pos(cid).y + 1) do 
					doSendMagicEffect( { x = nx, y = ny, z = pos(cid).z }, CONST_ME_SMALLPLANTS)
                    if p.n < 5 then
						p.n = p.n + 1
						addEvent(efekt, 500, p)
					end
                end
            end
        end
    end

function onThink(cid)
if isMonster(cid) then
	if math.random(1, 100) <= 2 then
		for nx = (pos(cid).x - 1), (pos(cid).x + 1) do 
			for ny = (pos(cid).y - 1), (pos(cid).y + 1) do 
				doSendMagicEffect( { x = nx, y = ny, z = pos(cid).z }, CONST_ME_SMALLPLANTS) 
			end
		end
		addEvent(zabijansko, 3000, {cid = cid}) 
		addEvent(efekt, 500, {cid = cid, n = 1}) 
        atakuje = true
    end

	if math.random(1, 100) <= 10 then 
            for nx = (pos(cid).x - 1), (pos(cid).x + 1) do 
                for ny = (pos(cid).y - 1), (pos(cid).y + 1) do 
                    for i=1, 254 do
                        stackpos = i
                        local fieldFound = getThingFromPos({x = nx, y = ny, z = pos(cid).z, stackpos = stackpos}) 
						for k=1, #fields do
						if fieldFound.uid ~= 0 and isInArray(fields[k].item_id, fieldFound.itemid) then
							if fieldFound.itemid == 1496 then
								if math.random(1,100) <= 25 then
									doCreateMonster("slime", getThingPos(fieldFound.uid), false)
									doSendMagicEffect(getThingPos(fieldFound.uid), CONST_ME_GREEN_RINGS)
								else
									doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
								end
							else
								doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
							end
							doRemoveItem(fieldFound.uid)
                        end
						end
                    end
                end
            end
	end
     
	if math.random(1, 100) <= 8 then 
		if getCreatureHealth(cid) >= 1000 then
			for nx = (pos(cid).x - 5), (pos(cid).x + 5) do 
				for ny = (pos(cid).y - 5), (pos(cid).y + 5) do 
					local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
					if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then 
						if math.random(1,5) <= 1 then
							doTeleportThing(cid, getThingPos(creatureFound.uid)) 
							doSendMagicEffect(getThingPos(creatureFound.uid), CONST_ME_TELEPORT) 
						end
					end
				end
			end
		end
	end

	if math.random(1, 100) <= 12 then 
		if getCreatureHealth(cid) <= 1000 then
			if math.random(1,100) <= 25 then
				doAddCondition(cid, haste)
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
			end
			if math.random(1,100) <= 25 then
				doAddCondition(cid, invisible)
			end
			if math.random(1,100) <= 25 then
				for nx = (pos(cid).x - 7), (pos(cid).x + 7) do 
				for ny = (pos(cid).y - 7), (pos(cid).y + 7) do 
					local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }) 
					if isPlayer(creatureFound.uid) and creatureFound.uid ~= cid and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
						doAddCondition(creatureFound.uid, condition)
						doSendMagicEffect(getThingPos(creatureFound.uid), CONST_ME_POISONAREA)
						doSendDistanceShoot(getThingPos(cid), getThingPos(creatureFound.uid), CONST_ANI_POISON)
					end
				end
				end
			end
		end
	end

	if math.random(1, 100) <= 8 then 
		for nx = (pos(cid).x - 5), (pos(cid).x + 5) do 
			for ny = (pos(cid).y - 5), (pos(cid).y + 5) do 
				local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }) 
				if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid then
					if math.random(1, 3) == 1 then 
						local poss = getThingPos(creatureFound.uid)
						if not(getTilePzInfo(poss) == true or getTileHouseInfo(poss) == true) then
							if isCreature(creatureFound.uid) and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
								doSendDistanceShoot(pos(cid), pos(creatureFound.uid), CONST_ANI_EARTH) 
								doSendMagicEffect(poss, CONST_ME_HITBYPOISON)
								doSendMagicEffect(poss, CONST_ME_GREEN_RINGS)
								doAddCondition(creatureFound.uid, condition)
								addEvent(efekty, 250, {cid = cid, loc = pos(creatureFound.uid), s = 0})
							end
						end
					end
				end
			end
		end
	end
end
	return true
end
Do login.lua wklejamy:
PHP:
registerCreatureEvent(cid, "Unhurried Acarid")
Do creaturescripts.xml dodajemy:
PHP:
<event type="think" name="Unhurried Acarid" event="script" value="Unhurried Acarid.lua"/>

Have fun.
 
Last edited:

Bubin

Senior User
Joined
May 13, 2009
Messages
1,113
Reaction score
169
Age
26
Odp: Unhurried Acarid - nietypowy boss defiler?w.

Kolejny boss w twoim wykonaniu i jak zawsz? ?wietny. Ma kilka na prawd? dobrych atak?w. Pomys? r?wnie? dobry ;) lecz nick taki nietypowy xD
10/10
 

zakius

Senior User
Joined
May 25, 2008
Messages
869
Reaction score
52
Odp: Unhurried Acarid - nietypowy boss defiler?w.

prawie jak powolniak, jest zmodyfikowany i ma fajne rzeczy ale nie wiem czy 10 by?oby ok, wiem, ?e chcesz co? pisa? a pomys??w pewnie brakuje na nowe ataki itp
je?li tak to zr?b tego nekro z mojego pomys?u

o kurcze, nawet nazwy funkcji takie same, <3

i nie u?ywaj
Code:
for n = 1, 6 do
                                    addEvent(function()
                                        doSendMagicEffect(poss, CONST_ME_HITBYPOISON)
                                        doSendMagicEffect(poss, CONST_ME_GREEN_RINGS)
                                    end, n*250)
                                end
, to sprawia, ?e w pami?ci s? zb?dne eventy(najistotniejsze jest to w czarach, je?li kilka os?b jednocze?nie u?yje 10 etapowego czaru to w pami?ci pojawia si? 50 event?w lub wi?cej)
tw?rz nowy event bezpo?rednio przed u?yciem, je?li cokolwiek wyst?pi przed nim to mo?esz go doda? p??niej(gdy to co? trwa)
 
Last edited:

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Odp: Unhurried Acarid - nietypowy boss defiler?w.

#up
Nekro Twojego pomys?u? Gdzie znajd? ten pomys?? Z ch?ci? go zrealizuj?.
 

zakius

Senior User
Joined
May 25, 2008
Messages
869
Reaction score
52
Odp: Unhurried Acarid - nietypowy boss defiler?w.

w tym temacie gdzie o pomys?y pyta?e?, edytowa?em posta
 

Sassin

Forum friend
Joined
Jun 13, 2009
Messages
1,281
Reaction score
107
Odp: Unhurried Acarid - nietypowy boss defiler?w.

Skrypt jest dobry i nie ma czego kwestionowa?, ale jak wi?kszo?? potwor?w w wykonaniu oskar'a.
 

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Odp: Unhurried Acarid - nietypowy boss defiler?w.

Skrypt zosta? troch? poprawiony i powinien bra? mniej pami?ci.
Kto chce niech zaktualizuje.
 

Seylock

Active User
Joined
Oct 21, 2010
Messages
147
Reaction score
5
Odp: Unhurried Acarid - nietypowy boss defiler?w.

Perfekt! I znowu "Pod jak? Tibi??" ;) Wida? ?e jeste? pro skrypterem, ale chyba pierwszym takim, kt?ry zaj?? si? monsterami :D
 

maxxenq

User
Joined
Dec 7, 2008
Messages
39
Reaction score
0
Odp: Unhurried Acarid - nietypowy boss defiler?w.

?wietny skrypt na monstera. Podoba mi si? a tak przy okazji zrobi?by? mi kilka skrypt?w odpowied? prze?lij na priv.
 
Status
Not open for further replies.
Top