What's new

Du Vea - boss beholder?w.

Status
Not open for further replies.

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Nie jest to zwyczajny boss. Na pierwszy rzut oka zachowuje si? normalnie, ale to tylko pozory.
Polecam postawi? go w okolicy bagien, nie tyle polecam co zalecam.
Przejd?my do szczeg???w.
Najpierw idziemy do folderu monsters i tworzymy tam plik o nazwie Du Vea.xml po czym wklejamy do niego:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Du Vea" nameDescription="Du Vea" race="venom" experience="1055" speed="210" manacost="0">
  <health now="1700" max="1700"/>
  <look type="210" corpse="6037"/>
  <targetchange interval="2000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag convinceable="1"/>
    <flag canpushitems="1"/>
    <flag targetdistance="4"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
	<script>
		<event name="Du Vea"/>
	</script>
  <attacks>
    <attack name="melee" interval="2000" skill="75" attack="35" poison="-100"/>
    <attack name="energy" interval="964" chance="11" target="1" min="-87" max="-143">
      <attribute key="shootEffect" value="energy"/>
	  <attribute key="areaEffect" value="purpleenergy"/>
    </attack>
    <attack name="death" interval="986" chance="12" target="1" min="-142" max="-184">
      <attribute key="shootEffect" value="suddendeath"/>
      <attribute key="areaEffect" value="mortarea"/>
    </attack>
	<attack name="earth" interval="975" chance="11" target="1" min="-105" max="-132">
      <attribute key="shootEffect" value="earth"/>
      <attribute key="areaEffect" value="carniphila"/>
    </attack>
	<attack name="speed" interval="1003" chance="13" range="7" target="1" speedchange="-321" duration="10000">
      <attribute key="areaEffect" value="bats"/>
    </attack>
    <attack name="poison" interval="1064" chance="12" length="6" spread="2" min="-179" max="-241">
      <attribute key="areaEffect" value="greenbubble"/>
    </attack>
    <attack name="lifedrain" interval="1105" chance="13" length="4" spread="2" min="-142" max="-197">
      <attribute key="areaEffect" value="yellowbubble"/>
    </attack>
    <attack name="manadrain" interval="997" chance="13" target="1" min="-75" max="-99">
      <attribute key="areaEffect" value="teleport"/>
    </attack>
  </attacks>
  <defenses armor="15" defense="20">
    <defense name="healing" interval="897" chance="11" min="85" max="128">
      <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
  </defenses>
	<elements>
		<element holyPercent="-5"/>
		<element firePercent="-10"/>
		<element energyPercent="50"/>
		<element deathPercent="25"/>
	</elements>
  <immunities>
    <immunity paralyze="1"/>
    <immunity earth="1"/>
    <immunity invisible="1"/>
	<immunity lifedrain="1"/>
  </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="653768764!"/>
    <voice sentence="Inferior creatures, bow before my power!"/>
  </voices>
  <loot>
    <item id="2148" countmax="56" chance="33960"/> --gold
	<item id="2148" countmax="86" chance="33960"/> --gold
    <item id="2397" chance="13540"/> --longsword
	<item id="2175" chance="11560"/> --spellbook
	<item id="7884" chance="4320"/> --terra mantle
	<item id="2181" chance="9300"/> --terra rod
    <item id="5898" chance="100000"/> --beho eye
	<item id="7590" countmax="2" chance="7540"/> --GMP
	<item id="2149" countmax="4" chance="4320"/> --small emerald
	<item id="2509" chance="9890"/> --steel shield
	<item id="3972" chance="2310"/> --beho helmet
	<item id="2377" chance="6540"/> --two handed sword
	<item id="2518" chance="1040"/> --beho shield
	<item id="2394" chance="6540"/> --morning star
	<item id="2512" chance="21050"/> --wooden shield
  </loot>
</monster>
Tworzymy jeszcze jeden plik o nazwie swampy bilith.xml i wklejamy:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="swampy bilith" nameDescription="a swampy bilith" race="venom" experience="0" speed="0" manacost="0">
  <health now="100" max="100"/>
  <look type="109"/>
  <strategy attack="0" defense="100"/>
  <flags>
    <flag hostile="1"/>
    <flag convinceable="1"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <defenses armor="0" defense="0">
    <defense name="healing" interval="2000" chance="100" min="-100" max="-100">
      <attribute key="areaEffect" value="greenbubble"/>
    </defense>
  </defenses>
  <immunities>
	<immunity physical="1"/>
    <immunity energy="1"/>
    <immunity fire="1"/>
	<immunity earth="1"/>
	<immunity holy="1"/>
	<immunity death="1"/>
	<immunity ice="1"/>
    <immunity poison="1"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity outfit="1"/>
    <immunity drunk="1"/>
	<immunity drown="1"/>
    <immunity invisible="1"/>
  </immunities>
</monster>
Do monsters.xml doklejamy:
PHP:
<monster name="Du Vea" file="Du Vea.xml"/>
<monster name="Swampy Bilith" file="swampy bilith.xml"/>
 

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Odp: Du Vea - boss beholder?w.

Przenosimy si? teraz do folderu creaturescripts/scripts i tworzymy tam plik o nazwie Du Vea.lua i wklejamy:
PHP:
local bagno_zwykle = {4691,4692,4693,4694,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4749,4750,4751,4752,4753,4754,4755}
local bagno_walkable = 6353
local pos = getCreaturePosition

	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(kill, 1000, {cid = cid, loc = loc})
				end
		end
	end	

	local function kill(params) 
	local cid = params.cid
	local loc = params.loc
		if isCreature(cid) then 
			doSendMagicEffect(loc, CONST_ME_SMALLPLANTS) 
			local creatureFound = getThingFromPos(loc) 
			if isCreature(creatureFound.uid) and creatureFound.uid ~= cid then
				doTargetCombatHealth(0, creatureFound.uid, COMBAT_EARTHDAMAGE, -getCreatureHealth(creatureFound.uid)*0.25, -getCreatureHealth(creatureFound.uid)*0.75, CONST_ME_SMALLPLANTS)
			end
		end
	end

function onThink(cid)
local tbl_x, tbl_y, tbl_z = {}, {}, {}
if isMonster(cid) then
	if math.random(1, 100) <= 60 then
		for nx = (pos(cid).x - 5), (pos(cid).x + 5) do
			for ny = (pos(cid).y - 5), (pos(cid).y + 5) do
				local itemFound = getTileThingByPos({x=nx, y=ny, z=pos(cid).z})
				if itemFound.uid > 0 and isInArray(bagno_zwykle, itemFound.itemid) then
					local item_pos = getThingPos(itemFound.uid)
					table.insert(tbl_x, item_pos.x)
					table.insert(tbl_y, item_pos.y)
					table.insert(tbl_z, item_pos.z)
				end
			end
		end
		if unpack(tbl_x) ~= nil and unpack(tbl_y) ~= nil and unpack(tbl_z) ~= nil then
			local x_pos, y_pos, z_pos = tbl_x[math.random(1, #tbl_x)], tbl_y[math.random(1, #tbl_y)], tbl_z[math.random(1, #tbl_z)]
			local poss = {x=x_pos, y=y_pos, z=z_pos, stackpos=0}
			local underItemFound_1, bagno = getThingFromPos({x=poss.x, y=poss.y, z=poss.z, stackpos=1}), getTileThingByPos(poss).uid
			local itemFound = getThingFromPos(poss)
				if itemFound.uid > 0 and isInArray(bagno_zwykle, itemFound.itemid) then
					local id = getThingFromPos(poss).itemid
					if math.random(1,10) <= 7 then
						for sx = (pos(cid).x - 5), (pos(cid).x + 5) do
						for sy = (pos(cid).y - 5), (pos(cid).y + 5) do
						local creatureFound = getThingFromPos({x = sx, y = sy, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
						if creatureFound.uid ~= cid and isCreature(creatureFound.uid) and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) and isSightClear(poss, pos(creatureFound.uid), true) then
							local posit = getThingPos(creatureFound.uid)
							if underItemFound_1.uid == 0 then
								doTransformItem(bagno, bagno_walkable)
								doCreateMonster("Swampy Bilith", poss, false)
							else
								return true
							end
								doSendMagicEffect(poss, CONST_ME_GREEN_RINGS)
								doTransformItem(bagno, id)
								doSendDistanceShoot(poss, posit, CONST_ANI_EARTH)
								doSendMagicEffect(posit, CONST_ME_HITBYPOISON)
								doSendMagicEffect(posit, CONST_ME_GREEN_RINGS)
								addEvent(efekty, 250, {cid = cid, loc = pos(creatureFound.uid), s = 0})
						end
						end
						end
					else
						if isSightClear(poss, pos(cid), true) then
							if underItemFound_1.uid == 0 then
								doTransformItem(bagno, bagno_walkable)
								doCreateMonster("Swampy Bilith", poss, false)
							else
								return true
							end
								doSendMagicEffect(poss, CONST_ME_GREEN_RINGS)
								doTransformItem(bagno, id)
								local hape = math.random(getCreatureMaxHealth(cid)*0.1,getCreatureMaxHealth(cid)*0.2)
								doSendDistanceShoot(poss, pos(cid), CONST_ANI_EARTH)
								doSendMagicEffect(pos(cid), CONST_ME_SMALLPLANTS)
								doCreatureAddHealth(cid, hape)
								doSendAnimatedText(pos(cid), hape, COLOR_LIGHTGREEN)
						end
					end
				end
		end
	end
end
	return true
end
Do creaturescripts.xml wklejamy:
PHP:
<event type="think" name="Du Vea" event="script" value="Du Vea.lua"/>
Do login.lua przed return true doklejamy:
PHP:
registerCreatureEvent(cid, "Du Vea")

Bawcie si? dobrze.
Skrypt wykonany przez Oskar, wszelkie prawa zastrze?one.
Dzi?kuj? Grim90 za obja?nienie funkcji onThink, bez Ciebie nie da?bym rady.

Notka moderatorska:
Skrypt bardzo dobry, zdecydowanie nale?y go przenie??, co niniejszym czyni?.


Nie jest dobry, poniewa? skrypt nie chce tworzy? potwork?w na bagnie, kt?ry na stackpos od 1 w g?r? ma jaki? item. Pr?bowa?em za pomoc? p?tli, ale wysz?o jeszcze gorzej, zostawi?em wi?c tworzenie ich po prostu na czystym bagnie, bez ?adnych dodatk?w. I tak w?a?nie polecam robi? te bagienne otoczenie, tak by by?y wolne miejsca na nich.


Mam nadziej?, ?e ludzie zaczn? w ko?cu pisa? oryginalne skrypty, zamiast ci?gle i?? utartym szlakiem RL/evo map. Chcia?bym by?cie spostrzegli, ?e z odrobin? wysi?ku mo?na osi?gn?? naprawd? niesamowite rezultaty, kt?re ciesz? nie tylko gracza, lecz tak?e i samego tw?rc? widz?c jak ?mia?ek my?li i si? m?czy jak pokona? tego czy tamtego potwora. Apeluj? o wysilenie swojej wyobra?ni i stworzenie czego? co naprawd? ucieszy nie tylko potencjalnych graczy, lecz tak?e i nas samych.
 
Last edited:

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Odp: Du Vea - boss beholder?w.

Brak komentarzy?
 

Seylock

Active User
Joined
Oct 21, 2010
Messages
147
Reaction score
5
Odp: Du Vea - boss beholder?w.

No... Ciekawe i orginalne :) A jakie? szczeg?lne zalety? Bo napisa?e? ?e tylko na poz?r nic nie robi, wi?c? :p I pod jak? Tibi?? :eek:ps:
 

zakius

Senior User
Joined
May 25, 2008
Messages
869
Reaction score
52
Odp: Du Vea - boss beholder?w.

jak mnie rozwalaj? ju? pytania "pod jak? tibi?", kurde no, jak silnik cofniesz do 7.6 to i na 7.6 podzia?a...

Vergil: faktycznie, m?g?by? podawa? na jakim silniku testujesz

jakbym chcia? spamowa? to nie robi?bym tego odpowiadaj?c POPRAWNIE na posty w temacie, kt?ry mnie obchodzi nie?

@down: na 8.54 to ju? jest tyle r??nych, ?e to NIC nie daje
ale jak m?wisz, ?e na ka?dym sql 8.1+ to powinien by? otserv czysty chyba?
 
Last edited:

Vergil93

Advanced User
Joined
Jun 19, 2010
Messages
263
Reaction score
6
Odp: Du Vea - boss beholder?w.

Ja dzia?am na silniku pod wersj? 8.54, wi?c dzia?a? b?dzie na ka?dym silniku sql od 8.1 i wy?ej.
Chcecie wiedzie? jakie posiada umiej?tno?ci? Wystarczy postawi? go w okolicy bagien, im wi?cej bagiennych teren?w tym trudniej go pokona?. Sprawd?cie sami.
 
Status
Not open for further replies.
Top