What's new

The Pits of Inferno Quest (Jak na realu z detalami)

Status
Not open for further replies.

Vermin

Active User
Joined
Dec 8, 2010
Messages
51
Reaction score
1
Wszystkie skrypty s? moje, daje je tu do publikacji, bo kumpel da? ju? na pewnym innym forum to my?l?, ?e mo?e tu itak zsempi?, a tak to przynajmniej nabije posta i b?d? mia? ?atwe pole do odpoowiedzi na ewentualne pytania.



To tak wbijamy do: actions > liquids > containers.lua

i edytujemy go wklejaj?c moje:

Code:
local DISTILLERY = {5513, 5514, 5469, 5470}
local ITEM_RUM_FLASK = 5553
local ITEM_POOL = 2016

local TYPE_EMPTY = 0
local TYPE_WATER = 1
local TYPE_BLOOD = 2
local TYPE_BEER = 3
local TYPE_SLIME = 4
local TYPE_MANA_FLUID = 7
local TYPE_LIFE_FLUID = 10
local TYPE_OIL = 11
local TYPE_WINE = 15
local TYPE_MUD = 19
local TYPE_LAVA = 26
local TYPE_RUM = 27
local TYPE_SWAMP = 28
local TYPE_MEAD = 51
local TYPE_URINE = 13

local oilLamps = {[2046] = 2044}
local casks = {[1771] = TYPE_WATER, [1772] = TYPE_BEER, [1773] = TYPE_WINE}
local alcoholDrinks = {TYPE_BEER, TYPE_WINE, TYPE_RUM, TYPE_MEAD}
local poisonDrinks = {TYPE_SLIME, TYPE_SWAMP, TYPE_URINE}

local drunk = createConditionObject(CONDITION_DRUNK)
setConditionParam(drunk, CONDITION_PARAM_TICKS, 60000)

local poison = createConditionObject(CONDITION_POISON)
setConditionParam(poison, CONDITION_PARAM_DELAYED, true) -- Condition will delay the first damage from when it's added
setConditionParam(poison, CONDITION_PARAM_MINVALUE, -50) -- Minimum damage the condition can do at total
setConditionParam(poison, CONDITION_PARAM_MAXVALUE, -120) -- Maximum damage
setConditionParam(poison, CONDITION_PARAM_STARTVALUE, -5) -- The damage the condition will do on the first hit
setConditionParam(poison, CONDITION_PARAM_TICKINTERVAL, 4000) -- Delay between damages
setConditionParam(poison, CONDITION_PARAM_FORCEUPDATE, true) -- Re-update condition when adding it(ie. min/max value)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))




------------------- By Semi:

local poiGravepos = {x=32791, y=32332, z=10} 



function onUse(cid, item, fromPosition, itemEx, toPosition)
local poiOilpos = {x=32800, y=32339, z=11} 
 local bridgepos = {x=32801, y=32336, z=11}

local bridge = getThingfromPos(bridgepos)
local dzwignia = getThingfromPos(poiOilpos)

local dzwignia_id = 1946

local questLog = 283201

local tilepos = {x=32801, y=32336, z=11, stackpos=0}
   local tile = getThingfromPos(tilepos)


    local function removalA(poiOilpos)
	doSetItemActionId(getTileItemById(poiOilpos, itemEx.itemid).uid, 52281)
	doSetItemActionId(getTileItemById(poiOilpos, dzwignia_id).uid, 52281)
	doCreateItem(493,1,tilepos)
    return TRUE
    end

	if(itemEx.uid == cid) then
		if(item.type == TYPE_EMPTY) then
			doPlayerSendCancel(cid, "It is empty.")
			return true
		end

		if(item.type == TYPE_MANA_FLUID) then
			if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
				return true
			end

			if(not doPlayerAddMana(cid, math.random(80, 160))) then
				return false
			end

			doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
			doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
			doAddCondition(cid, exhaust)
		elseif(item.type == TYPE_LIFE_FLUID) then
			if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
				return true
			end

			if(not doCreatureAddHealth(cid, math.random(40, 75))) then
				return false
			end

			doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
			doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
			doAddCondition(cid, exhaust)
		elseif(isInArray(alcoholDrinks, item.type)) then
			if(not doTargetCombatCondition(0, cid, drunk, CONST_ME_NONE)) then
				return false
			end

			doCreatureSay(cid, "Aaah...", TALKTYPE_ORANGE_1)
		elseif(isInArray(poisonDrinks, item.type)) then
			if(not doTargetCombatCondition(0, cid, poison, CONST_ME_NONE)) then
				return false
			end

			doCreatureSay(cid, "Urgh!", TALKTYPE_ORANGE_1)
		else
			doCreatureSay(cid, "Gulp.", TALKTYPE_ORANGE_1)
		end

		doChangeTypeItem(item.uid, TYPE_EMPTY)
		return true
	end

	if(not isCreature(itemEx.uid)) then
		if(item.type == TYPE_EMPTY) then
			if(item.itemid == ITEM_RUM_FLASK and isInArray(DISTILLERY, itemEx.itemid)) then
				if(itemEx.actionid == 100) then
					doItemEraseAttribute(itemEx.uid, "description")
					doItemEraseAttribute(itemEx.uid, "aid")
					doChangeTypeItem(item.uid, TYPE_RUM)
				else
					doPlayerSendCancel(cid, "You have to process the bunch into the distillery to get rum.")
				end
				return true
			end

			if(isItemFluidContainer(itemEx.itemid) and itemEx.type ~= TYPE_EMPTY) then
				doChangeTypeItem(item.uid, itemEx.type)
				doChangeTypeItem(itemEx.uid, TYPE_EMPTY)
				return true
			end

			if(casks[itemEx.itemid] ~= nil) then
				doChangeTypeItem(item.uid, casks[itemEx.itemid])
				return true
			end

			local fluidEx = getFluidSourceType(itemEx.itemid)
			if(fluidEx ~= false) then
				doChangeTypeItem(item.uid, fluidEx)
				return true
			end

			doPlayerSendCancel(cid, "It is empty.")
			return true
		end

		if(item.type == TYPE_OIL and oilLamps[itemEx.itemid] ~= nil) then
			doTransformItem(itemEx.uid, oilLamps[itemEx.itemid])
			doChangeTypeItem(item.uid, TYPE_EMPTY)
			return true
		end

		if(hasProperty(itemEx.uid, CONST_PROP_BLOCKSOLID)) then
			return false
		end
	end

	doDecayItem(doCreateItem(ITEM_POOL, item.type, toPosition))
	doChangeTypeItem(item.uid, TYPE_EMPTY)
	
	if (item.type == TYPE_BLOOD and itemEx.itemid == 1409 and itemEx.actionid == 32264) then
	            doTeleportThing(cid, poiGravepos, TRUE)
                doSendMagicEffect(poiGravepos, CONST_ME_TELEPORT)
                doSendMagicEffect(frompos, CONST_ME_POFF)
				doCreatureSay(cid, "Muahahahaha...", TALKTYPE_ORANGE_1)
				setPlayerStorageValue(cid, questLog, 1)
				
		return true
	end
	if (item.type == TYPE_OIL and itemEx.actionid == 52281)then
	            doSetItemActionId(itemEx.uid, 52282)
				addEvent(removalA, 240 * 1000, poiOilpos)
				
	end
	
	return true
end


Okej co zrobili?my? A wi?c dodali?my skrypt na u?ycie viald with blood (flaszeczke z krwi?) na nagrobku, kt?ry mia? actionid = 32264.
14wgigl.jpg



Co jeszcze zrobili?my? A mianowicie dodali?my skrypt na flaszk? z olejem (vial with oil), kt?ra po u?yciu na item z actionem actionid = 52281 przemieni na czas 240 sekund actionid na 52282, dodatkowo je?li k?adka b?dzie na wodzie, to w momencie "stracenia mocy" skrypt wykasuje k?adk?.
hw03rn.jpg



Inaczej m?wi?c dzia?a jak na realu.




To teraz przechodzimy do movements > tworzymy sobie folder poi i tam dodajemy plik > magic wall.lua

wklejamy tam:

Code:
function onStepIn(cid, item, pos)


local c ={
A_entrance = 10201,
A_exit = 10202,
tibleId = 1970,
tile = 474,
}


local tabelka = {
	                [1] = {Aitem = 10201, pos = {x=32791, y=32327, z=10}, ZLE = {x=32791, y=32331, z=10}, holy = yes},
					[2] = {Aitem = 10202, pos = {x=32791, y=32331, z=10}, holy = no},
                }

for i=1, #tabelka do					
if item.itemid == c.tile and item.actionid == tabelka[i].Aitem then
   if tabelka[i].holy == yes and isPlayer(cid) == TRUE then
          if   getPlayerItemCount(cid, c.tibleId) >= 1 then
             doTeleportThing(cid, tabelka[i].pos, TRUE)
             doSendMagicEffect(tabelka[i].pos, 10)
		  elseif getPlayerItemCount(cid, c.tibleId) < 1 then
		    doTeleportThing(cid, tabelka[i].ZLE, TRUE)
			doSendMagicEffect(tabelka[i].ZLE, 10)
			end
   elseif tabelka[i].holy == no then
        doTeleportThing(cid, tabelka[i].pos, TRUE)
        doSendMagicEffect(tabelka[i].pos, 10)
   end
end
end
return true
end


Co zrobili?my? Dodali?my skrypt na tile obok magic walla i tepnie nas za je?li mamy holy tible.
2qn8qhd.jpg



To teraz wchodzimy w movements > quests > poi > tworzymy plik > skrot.lua

Dodajemy tam:

Code:
function onStepIn(cid, item, pos)


local c = {
A_skrot = 10203,
A_skrot_tp = 10204,
skrot = 283202,
teleportPOI = {x=32838, y=32230, z=13},
ZLE = {x=32786, y=32328, z=6},
A_skrot_dzwignie = 10205,
A_log = 10206,
s_log = 283201,
}


if item.actionid == c.A_skrot_dzwignie and getPlayerStorageValue(cid, c.skrot) < 1 then
    setPlayerStorageValue(cid, c.skrot, 1)
    doCreatureSay(cid,'Congratulations! Unlocked shortcut and now do not have to move all 15 of leverage.', TALKTYPE_ORANGE_1,(getCreaturePosition(cid)))
        doSendMagicEffect((getCreaturePosition(cid)), 27)
		doSendMagicEffect((getCreaturePosition(cid)), 28)
		
elseif item.actionid == c.A_skrot and getPlayerStorageValue(cid, c.skrot) == 1 then
          setPlayerStorageValue(cid, c.skrot, 2)
		  doCreatureSay(cid,'Congratulations! From now on you can use a shortcut through the teleporter in the house necromancer.', TALKTYPE_ORANGE_1,(getCreaturePosition(cid)))
        doSendMagicEffect((getCreaturePosition(cid)), 27)
		doSendMagicEffect((getCreaturePosition(cid)), 28)
		elseif item.actionid == c.A_skrot_tp and getPlayerStorageValue(cid, c.skrot) == 2 then
		doTeleportThing(cid,c.teleportPOI)
		doSendMagicEffect((getCreaturePosition(cid)), 10)
		elseif item.actionid == c.A_skrot_tp and getPlayerStorageValue(cid, c.skrot) < 2 then
		    doTeleportThing(cid, c.ZLE, TRUE)
			doSendMagicEffect(c.ZLE, 10)
			doCreatureSay(cid,'Sorry, you do not have access to teleport.', TALKTYPE_ORANGE_1,(getCreaturePosition(cid)))
	elseif item.actionid == c.A_log and getPlayerStorageValue(cid, c.s_log) < 1 then
	       setPlayerStorageValue(cid, c.s_log, 1)
		   doSendMagicEffect((getCreaturePosition(cid)), 27)
		doSendMagicEffect((getCreaturePosition(cid)), 28)
		doCreatureSay(cid,'Take care!', TALKTYPE_ORANGE_1,(getCreaturePosition(cid)))
   end

return true
end

Co zrobili?my?
Dali?my wszystkie mo?liwe skr?ty na PoI oraz quest log ;p

Tutaj dostajemy Quest Loga:
246pfna.jpg


Tutaj po przesunieciu 15 d?wigni i wej?ciu na te 3 kratki mo?emy u?ywa? skr?tu przez drzwi.
o856pu.jpg

2iqh1f9.jpg



Natomiast skr?t z domku nekromanty mo?emy u?ywa? gdy mamy odblokowany ostatni shortcut.
11tu536.jpg

qoj5mf.jpg



Quest Log:
XML > quests.xml i wklejamy

Code:
<quests>
<quest name="The Pits of Inferno" startstorageid="283201" startstoragevalue="0">
		<mission name="Acces to shortcuts" storageid="283202" startvalue="1" endvalue="2">
			<missionstate id="1" description="Unlocked shortcut and now do not have to move all 15 of leverage."/>
			<missionstate id="2" description="Unlocked shortcut and now do not have to move all the 15 lever and you can use the teleport in the necromancer's house."/>
		</mission>
		<mission name="Thrones: Verminor" storageid="10001" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Veminor's spirit."/>
		</mission>
		<mission name="Thrones: Infernatil" storageid="10002" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Infernatil's spirit."/>
		</mission>
		<mission name="Thrones: Tafariel" storageid="10003" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Tafariel's spirit."/>
		</mission>
		<mission name="Thrones: Apocalypse" storageid="10004" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Apocalypse's spirit."/>
		</mission>
		<mission name="Thrones: Pumin" storageid="10005" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Pumin's spirit."/>
		</mission>
		<mission name="Thrones: Ashfalor" storageid="10006" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Ashfalor's spirit."/>
		</mission>
		<mission name="Thrones: Bazir" storageid="10007" startvalue="1" endvalue="2">
			<missionstate id="1" description="You have already absorbed some of Bazir's spirit."/>
		</mission>
	</quest>
</quests>
 

misiu30

User
Joined
Jan 19, 2009
Messages
38
Reaction score
0
Odp: The Pits of Inferno Quest (Jak na realu z detalami)

Przyda?o by si? ?eby? wrzuci? jeszcze link do mapy.
 

Vermin

Active User
Joined
Dec 8, 2010
Messages
51
Reaction score
1
Odp: The Pits of Inferno Quest (Jak na realu z detalami)

Przyda?o by si? ?eby? wrzuci? jeszcze link do mapy.


1. Mapa to jest jak na rl, pozycje jak na realu, ?ci?gnij sobie Iriane czy co?, napewno nie b?d? si? bawi? w wycinanie mapy, bo 1. Mam sw?j system unique action?w itp, tutaj troch? jest inaczej ni? u mnie i nie chc? mi si? tego zmienia?.

2. Nie sko?czy?em jeszcze udost?pnia?, jeszcze wi?cej dam skrypt?w, ale napewno nie dam systemu d?wigni w kolejno?ci z zapalaniem coal basin?w...
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: The Pits of Inferno Quest (Jak na realu z detalami)

Wi?c dlaczego dajesz nam tylko cz??? skrypt?w? Jak ju? dodajesz jaki? quest to w pe?nym jego wymiarze. D?wignie przecie? s? banalnie ?atwe. P?omienie oraz usuwanie p?on?cych ?cian r?wnie?. Labirynt tak?e wymaga podstawowej wiedzy w skryptach.
Jak sko?cz? pisa? to wrzuc? na forum wszystkie skrypty do PoI.
 
Status
Not open for further replies.
Top