kacpersky
Mr. Brightside
- Joined
- Jan 25, 2009
- Messages
- 499
- Reaction score
- 3
Actions:
To containers.lua
Make oil_lever.lua and paste:
Movements:
Make magic wall.lua and paste:
Make: shortcut.lua and paste:
Xml > quests.xml
paste:
How it's working?
First you must have vial with blood, use on gravestone on poi, and you will be teleport down.
Next you must have holy tible, when you step near magic wall you will be teleport to next part of quest.
When you step in on tile with action c.A_log then you gain quest log.
Next you must go down, and use vial with oil on lever and move it.
---
---
When you move 15 levers, then destroy 2 stones, and step in tile with action c.A_skrot_dzwignie, from now you have acces to use shortcut from Vocations Levers to Blightwalkers (U can open doors near Vocations Levers)
---
---
In throne rooms, when you step in tile with action c.A_skrot then you get acces to use teleport in necromancer house, to throne rooms(teleport room).
Screen shot where are doors near Vocations Levers:
All scripts maked by Seminari with my help
Please don't copy this scripts to other forums without my or Seminari's permission.
To containers.lua
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
Make oil_lever.lua and paste:
Code:
local bridgepos = {x=32801, y=32336, z=11} -- Position of the bridge tile
local dzwigniaPos = {x=32800, y=32339, z=11}
-- SSij pale sasir ;* Jak chciales umiescic tu vial z olejem to gz Ci nabie ;* Script by Seminari
local leverAID = 52282 -- Action ID of the lever
function onUse(cid, item, frompos, item2, topos)
local bridge = getThingfromPos(bridgepos)
--local function removalA(dzwigniaPos)
--if getThingfromPos(dzwigniaPos, 1946) then
--doSetItemActionId(itemEx.uid, 52282)
--doTransformItem(bridge.uid, 493)
--doTransformItem(item.uid, 1945)
-- return TRUE
-- end
local tile5 = getThingfromPos(tilepos5)
local tilepos5 = {x=32801, y=32336, z=11, stackpos=0}
-- and bridge.itemid == 493
if item.actionid == leverAID and item.itemid == 1945 then
doCreateItem(5770,1,tilepos5)
doSendMagicEffect(dzwigniaPos, CONST_ME_MAGIC_RED)
doTransformItem(item.uid, 1946)
--addEvent(removalA, 5 * 1000, dzwigniaPos)
elseif item.actionid == leverAID and item.itemid == 1946 and bridge.itemid == 5770 then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doCreatureSay(cid, "The lever is creaking and rusty.", TALKTYPE_ORANGE_1)
end
return true
end
Movements:
Make magic wall.lua and paste:
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
Make: shortcut.lua and paste:
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
Xml > quests.xml
paste:
Code:
<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>
How it's working?
First you must have vial with blood, use on gravestone on poi, and you will be teleport down.
Next you must have holy tible, when you step near magic wall you will be teleport to next part of quest.
When you step in on tile with action c.A_log then you gain quest log.
Next you must go down, and use vial with oil on lever and move it.
---
---
When you move 15 levers, then destroy 2 stones, and step in tile with action c.A_skrot_dzwignie, from now you have acces to use shortcut from Vocations Levers to Blightwalkers (U can open doors near Vocations Levers)
---
---
In throne rooms, when you step in tile with action c.A_skrot then you get acces to use teleport in necromancer house, to throne rooms(teleport room).
Screen shot where are doors near Vocations Levers:
All scripts maked by Seminari with my help
Please don't copy this scripts to other forums without my or Seminari's permission.
Last edited: