Boss dragon?w w po??czeniu z nekromant?.

Status
Zamknięty.

Vergil93

Advanced User
Zarejestrowany
Dołączył
Czerwiec 19, 2010
Posty
263
Liczba reakcji
6
Skrypt z serii bossy inne ni? zwykle.
Opis:
OPIS

Boss ten posiada takie umiej?tno?ci:
* Usuwa magic walle, wild growth, fire/energy/poison field,
* Gdy ma wi?cej ani?eli 20% hp to wskrzesza smoki, kt?re atakuj? ka?dego kogo popadnie,
* Za? gdy ma mniej ni? 20% hp to wysysa wszystkim znajduj?cym si? wok?? ?ycie dzi?ki czemu si? ulecza,
* Maj?c mniej ni? 20% hp przyzywa losow? ilo?? potwor?w, kt?re pojawiaj? si? wok?? gracza.

Najpierw lecimy do folderu monsters i tworzymy tam plik o nazwie Threatening Deamos.xml i wklejamy:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Threatening Deamos" nameDescription="Threatening Deamos" race="fire" experience="6450" speed="234" manacost="0">
  <health now="9900" max="9900"/>
  <look type="204" corpse="5984"/>
  <targetchange interval="5000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag convinceable="1"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <script>
		<event name="Kills"/>
	</script>
  <attacks>
    <attack name="melee" interval="2000" skill="150" attack="55"/>
    <attack name="fire" interval="953" chance="14" radius="4" target="1" min="-431" max="-561">
      <attribute key="shootEffect" value="fire"/>
      <attribute key="areaEffect" value="firearea"/>
    </attack>
    <attack name="firefield" interval="1211" chance="11" range="7" radius="4" target="1">
      <attribute key="shootEffect" value="fire"/>
    </attack>
    <attack name="fire" interval="1091" chance="13" length="7" spread="3" min="-475" max="-642">
      <attribute key="areaEffect" value="firearea"/>
    </attack>
  </attacks>
  <defenses armor="45" defense="45">
    <defense name="healing" interval="1025" chance="15" min="132" max="276">
      <attribute key="areaEffect" value="fire"/>
    </defense>
  </defenses>
  <immunities>
    <immunity fire="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <summons maxSummons="2">
    <summon name="dragon" interval="1121" chance="16" max="2"/>
  </summons>
  <voices interval="5000" chance="10">
    <voice sentence="I WILL SET THE WORLD IN FIRE!" yell="1"/>
    <voice sentence="I WILL PROTECT MY BROOD!" yell="1"/>
  </voices>
  <loot>
    <item id="2148" countmax="100" chance="70000"/> --gold
	<item id="2148" countmax="90" chance="60000"/> --gold
	<item id="2152" countmax="10" chance="20000"/> --platinum coin
    <item id="2672" countmax="10" chance1="20000"/> --dragon ham
    <item id="2033" chance="2000"/> --golden mug
	<item id="7590" chance="6000"/> --GMP
    <item id="1976" chance="3500"/> --gemmed book
    <item id="2413" chance="5000"/> --broad sword
    <item id="2498" chance="900"/> --royal helmet
	<item id="2509" chance="11000"/> --steel shield
    <item id="2492" chance="700"/> --DSM
	<item id="2398" chance="7000"/> --mace
	<item id="2406" chance="9000"/> --short sword
	<item id="2409" chance="3800"/> --serpent sword
	<item id="2434" chance="4000"/> --dragon hammer
	<item id="2457" chance="9500"/> --steel helmet
	<item id="2191" chance="1500"/> --wand of dragonbreath
    <item id="2547" countmax="5" chance="4500"/> --power bolt
	<item id="7365" countmax="6" chance="10000"/> --onyx arrow
    <item id="2546" countmax="10" chance="8500"/> --burst arrow
    <item id="2796" countmax="4" chance="6000"/> --green mushroom
    <item id="3976" countmax="10" chance1="50000" chancemax="0"/>
	<item id="2148" countmax="100" chance="60000"/> --gold
	<item id="2392" chance="3500"/> --fire sword
	<item id="2167" chance="2000"/> --energy ring
	<item id="2479" chance="1500"/> --strange helmet
	<item id="2387" chance="1000"/> --double axe
	<item id="2397" chance="10000"/> --longsword
	<item id="2647" chance="15000"/> --plate legs
	<item id="5791" chance="1500"/> --stuffed dragon
	<item id="2455" chance="12000"/> --crossbow
	<item id="7591" chance="9000"/> --GHP
	<item id="2516" chance="2000"/> --dragon shield
	<item id="2187" chance="3200"/> --woi
	<item id="2146" chance="4500"/> --small sapphire
	<item id="2145" chance="3000"/> --small diamond
	<item id="2528" chance="2000"/> --tower shield
	<item id="2177" chance="1500"/> --life crystal
	<item id="5948" chance="5000"/> --red dragon leather
	<item id="5882" chance="5000"/> --red dragon scale
	<item id="10020" chance="100000"/> --dragon claw
  </loot>
</monster>
Tworzymy teraz plik o nazwie Noivudd.xml i wklejamy:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Noivudd" nameDescription="Noivuddr" race="blood" experience="8200" speed="188" manacost="0">
  <health now="10750" max="10750"/>
  <look type="9" corpse="6080"/>
  <targetchange interval="5000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag convinceable="1"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="4"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
	<script>
		<event name="Noivudd"/>
	</script>
  <attacks>
    <attack name="melee" interval="2000" skill="120" attack="80" poison="-620"/>
    <attack name="death" interval="1042" chance="12" target="1" min="-375" max="-513">
      <attribute key="areaEffect" value="mortarea"/>
	  <attribute key="shootEffect" value="suddendeath"/>
    </attack>
	<attack name="death" interval="1004" chance="11" target="0" radius="5" min="-353" max="-495">
      <attribute key="areaEffect" value="poff"/>
    </attack>
	<attack name="death" interval="1110" chance="13" target="0" radius="3" min="-454" max="-595">
      <attribute key="areaEffect" value="greenbubble"/>
    </attack>
    <attack name="poison" interval="994" chance="17" target="1" min="-195" max="-225">
      <attribute key="shootEffect" value="poison"/>
	  <attribute key="areaEffect" value="smallplants"/>
    </attack>
	<attack name="speed" interval="994" chance="13" target="1" speedchange="-365" duration="5000">
      <attribute key="shootEffect" value="poison"/>
	  <attribute key="areaEffect" value="smallplants"/>
    </attack>
	<attack name="poison" interval="1050" chance="17" target="1" radius="4" min="-206" max="-267">
      <attribute key="shootEffect" value="poison"/>
	  <attribute key="areaEffect" value="poison"/>
    </attack>
	<attack name="lifedrain" interval="994" chance="17" length="5" spread="0" min="-325" max="-354">
      <attribute key="areaEffect" value="mortarea"/>
    </attack>
  </attacks>
  <defenses armor="50" defense="50">
    <defense name="healing" interval="1064" chance="25" min="195" max="268">
      <attribute key="areaEffect" value="bats"/>
    </defense>
  </defenses>
      <elements>
		<element firePercent="-10"/>
		<element physicalPercent="25"/>
		<element icePercent="40"/>
		<element energyPercent="80"/>
		<element holyPercent="-5"/>
	</elements>
  <immunities>
    <immunity earth="1"/>
	<immunity death="1"/>
	<immunity lifedrain="1"/>
    <immunity invisible="1"/>
  </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="Your corpse will be mine!"/>
    <voice sentence="Taste the sweetness of death!"/>
  </voices>
<loot>
    <item id="2148" countmax="88" chance="50000"/> --gold
    <item id="2148" countmax="58" chance="40000"/> --gold
	<item id="2152" countmax="8" chance="10000"/> --platinum coin
	<item id="2490;2649" chance="11000"/> --dark helmet,leather legs
	<item id="2477" chance="7100"/> --knight legs
	<item id="8903" chance="1800"/> --SB of lost soul
	<item id="7589;7591;8473" countmax="2" chance="9900"/> --smp,ghp,uhp
	<item id="11674" chance="2500"/> --red robe
	<item id="2156;2158" chance="5800"/> --red gem,blue gem
	<item id="2466" chance="1100"/> --golden armor
	<item id="2656" chance="3900"/> --blue robe
	<item id="2144;2149" countmax="4" chance="12500"/> --black pearl,small emerald
	<item id="2195" chance="5800"/> --BoH
	<item id="2171" chance="8400"/> --platinum amulet
	<item id="2462" chance="4100"/> --devil helmet
	<item id="8910" chance="4500"/> --underworld rod
	<item id="2214" chance="18000"/> --RoH
</loot>
</monster>
Nast?pnie tworzymy plik o nazwie Deathless Dragon.xml i wklejamy:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Deathless Dragon" nameDescription="an deathless dragon" race="undead" experience="250" speed="230" manacost="0">
  <health now="2350" max="2350"/>
  <look type="231" corpse="6306"/>
  <targetchange interval="2000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag convinceable="1"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
    <attack name="melee" interval="2000" skill="120" attack="40"/>
    <attack name="death" interval="1083" chance="12" radius="4" target="0" min="-121" max="-154">
		<attribute key="areaEffect" value="mortarea"/>
	</attack>
    <attack name="poison" interval="1103" chance="15" range="7" radius="4" target="0" min="-107" max="-190">
      <attribute key="shootEffect" value="poison"/>
      <attribute key="areaEffect" value="poison"/>
    </attack>
    <attack name="death" interval="953" chance="11" target="1" min="-29" max="-108">
      <attribute key="shootEffect" value="suddendeath"/>
      <attribute key="areaEffect" value="mortarea"/>
    </attack>
    <attack name="death" interval="998" chance="10" length="4" spread="2" min="-197" max="-231">
		<attribute key="areaEffect" value="poff"/>
	</attack>
  </attacks>
  <defenses armor="35" defense="30">
  		<defense name="healing" interval="1121" chance="11" min="102" max="164">
<attribute key="areaEffect" value="redshimmer"/>
		</defense>
  </defenses>
	<elements>
		<element physicalPercent="5"/>
		<element icePercent="70"/>
		<element holyPercent="-15"/>
	</elements>
  <immunities>
    <immunity death="1"/>
    <immunity earth="1"/>
    <immunity fire="1"/>
    <immunity drown="1"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
	<loot>
		<item id="2148" chance="23140" countmax="45"/> --gold
		<item id="2148" chance="23140" countmax="43"/> --gold
		<item id="2236" chance="19480"/> --torn book
		<item id="2033" chance="1630"/> --golden mug
		<item id="2260" chance="13110"/> --blank rune
		<item id="2413" chance="6270"/> --broad sword
		<item id="5925" chance="480"/> --hardened bone
		<item id="5944" chance="3240"/> --soul orb
		<item id="11227" chance="12360"/> --unholy bone
		<item id="2476" chance="640"/> -knight armor
		<item id="7365" countmax="10" chance="11900"/> --onyx arrow
		<item id="6300" chance="840"/> --death ring
		<item id="7591" chance="6540"/> --GHP
		<item id="2177" chance="680"/> --life crystal
	</loot>
</monster>
Do monsters.xml wklejamy:
PHP:
<monster name="Deathless Dragon" file="Deathless Dragon.xml"/>
<monster name="Noivudd" file="Noivudd.xml"/>
<monster name="Threatening Deamos" file="Threatening Deamos.xml"/>
 
Odp: Boss dragon?w w po??czeniu z nekromant?.

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

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

local corpses = {2881,2882,2883,3104,3105,3106,6307,6308,6309}
local name = "Deathless Dragon"

local monsters = {"mummy", "demon skeleton", "ghost", "ghoul", "skeleton", "skeleton warrior", "crypt shambler", "zombie"}

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}
				}

function onThink(cid)
local pos = getCreaturePosition

if isMonster(cid) then
	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
							doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
							doRemoveItem(fieldFound.uid)
                        end
					end
				end
			end
		end
	end

	if getCreatureHealth(cid) >= getCreatureMaxHealth(cid)*0.2 then
		if math.random(1, 100) <= 10 then 
            for nx = (pos(cid).x - 4), (pos(cid).x + 4) do 
                for ny = (pos(cid).y - 4), (pos(cid).y + 4) do 
                    for i = 1, 254 do
                        stackpos = i
                        local corpseFound = getThingFromPos({x = nx, y = ny, z = pos(cid).z, stackpos = stackpos}) 
						if corpseFound.uid ~= 0 and isInArray(corpses, corpseFound.itemid) and isCorpse(corpseFound.uid) then
							local ds = doCreateMonster(name, getThingPos(corpseFound.uid), false)
							setCreatureMaxHealth(ds, getCreatureMaxHealth(ds) + (math.random(150,850)))
							doSendMagicEffect(getThingPos(corpseFound.uid), CONST_ME_MORTAREA)
							doRemoveItem(corpseFound.uid)
                        end
					end
				end
			end
		end
	else
		if math.random(1, 100) <= 13 then
			for nx = (pos(cid).x - 6), (pos(cid).x + 6) do
                for ny = (pos(cid).y - 6), (pos(cid).y + 6) 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 and isInArray(monsters, getCreatureName(creatureFound.uid)) == false then
						for l = 1, math.random(2,3) do
							doCreateMonster(monsters[math.random(1, #monsters)], pos(creatureFound.uid), false)
						end
					end
				end
			end
		end
		
		if math.random(1, 100) <= 12 then 
			if math.random(1,100) <= 25 then
				doAddCondition(cid, invisible)
			end
			if math.random(1,100) <= 25 then
				for nx = (pos(cid).x - 6), (pos(cid).x + 6) do 
				for ny = (pos(cid).y - 6), (pos(cid).y + 6) 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) 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
		
		if math.random(1, 100) <= 15 then
			for nx = (pos(cid).x - 6), (pos(cid).x + 6) do
                for ny = (pos(cid).y - 6), (pos(cid).y + 6) 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
						doSendDistanceShoot(pos(cid), pos(creatureFound.uid), CONST_ANI_DEATH)
						local min = getCreatureHealth(creatureFound.uid)*0.1
						local max = getCreatureHealth(creatureFound.uid)*0.25
						local min_max = math.random(min,max)
						doTargetCombatHealth(cid, creatureFound.uid, COMBAT_LIFEDRAIN, -min, -max, CONST_ME_MORTAREA)
						doSendDistanceShoot(pos(creatureFound.uid), pos(cid), CONST_ANI_SUDDENDEATH)
						doTargetCombatHealth(0, cid, COMBAT_LIFEDRAIN, min, max, CONST_ME_MORTAREA)
						doSendAnimatedText(pos(cid), min_max, COLOR_DARKRED)
					end
				end
			end
		end
	end
end
	return true
end
Tworzymy teraz plik o nazwie killed.lua i wklejamy:
PHP:
function onKill(cid, target, lastHit)
local mob = {
            ["threatening deamos"] = {monster = "Noivudd"}
			}
local mobs = mob[string.lower(getCreatureName(target))]
if mobs then
	local pos = getCreaturePosition(target)
	doCreateMonster(mobs.monster, pos)
end
return true
end
Do login.lua dodajemy:
PHP:
registerCreatureEvent(cid, "Noivudd")
registerCreatureEvent(cid, "Kills")
Za? do creaturescripts.xml:
PHP:
<event type="think" name="Noivudd" event="script" value="Noivudd.lua"/>
<event type="kill" name="Kills" event="script" value="killed.lua"/>
 
Ostatnia edycja:
Odp: Boss dragon?w w po??czeniu z nekromant?.

Jak zwykle potworki w Twoim wykonaniu najlepsze. My?l?, ?e nie jeden powinien uczy? si? takiej kreatywno?ci w?a?nie od Ciebie.

Skrypt oczywi?cie akceptuj?.
 
Odp: Boss dragon?w w po??czeniu z nekromant?.

Potw?r jest po prostu swietny i do tego twoja kreatywno??.Szkoda ?e nie ma SS'?w.
 
Odp: Boss dragon?w w po??czeniu z nekromant?.

Nom monster jest zaje... ale przyda? by si? SS tak jak kolega wy?ej napisa?
 
Odp: Boss dragon?w w po??czeniu z nekromant?.

Po co wam zdj?cie? Nie widzieli?cie nigdy grafiki DLa/dragona/Necro/Undead Dragona? Bo czego? tutaj nie rozumiem.
Je?li chcecie zobaczy? co on robi to wklejcie skrypty do silnika, gdybym chcia? na zdj?ciach pokaza? jego umiej?tno?ci to musia?bym zrobi? oko?o 20 zdj??, czego najzwyczajniej w ?wiecie mi si? nie chce.

Tak,
Vergil to ja.
 
Status
Zamknięty.
Back
Do góry