FerN
Senior User
- Joined
- Apr 10, 2009
- Messages
- 597
- Reaction score
- 27
Mam problem z dwoma questami, chodzi tu o Anihilator (skrzynie i wej?cie do roomu) oraz Pits of Inferno quest, a dok?adnie ko?cowe skrzynie... Nie wiem czemu, ale nie dzia?aj? [...]
Oto skrypty:
Anihilator Quest (teleport do roomu):
Anihilator Quest: (skrzynie)
Oraz Pits of Inferno Quest: (skrzynie)
Prosz? o jak najszybsz? pomoc, z g?ry dzi?ki.
Oto skrypty:
Anihilator Quest (teleport do roomu):
PHP:
local config = {
storage = 6217412,
tylkoRaz = "nie",
lvl = 100
tylkoRazNaDzien = "nie",
summonowacPotwory = "tak"
startUid = 8000
items = {2494,2400,2431,2112}
players = {
{x=349, y=532, z=14, stackpos=253},
{x=350, y=532, z=14, stackpos=253},
{x=351, y=532, z=14, stackpos=253},
{x=352, y=532, z=14, stackpos=253}},
npos = {
{x=391, y=536, z=14},
{x=392, y=536, z=14},
{x=393, y=536, z=14},
{x=394, y=536, z=14}},
monsterPos = {
[1] = {"Demon",{x=391,y=534,z=14,stackpos=253}},
[2] = {"Demon",{x=393,y=534,z=14,stackpos=253}},
[3] = {"Demon",{x=392,y=538,z=14,stackpos=253}},
[4] = {"Demon",{x=394,y=538,z=14,stackpos=253}},
[5] = {"Demon",{x=395,y=536,z=14,stackpos=253}},
[6] = {"Demon",{x=396,y=536,z=14,stackpos=253}}
}
}
function onUse(cid,item,frompos,item2,topos)
local found = 0
if item.itemid == 1945 then
for i = 1, #config.players do
local player = getThingfromPos(config.players[i])
if isPlayer(player.uid) ~= TRUE then
return doPlayerSendCancel(cid,"You need four players for this quest.") + 1
end
if getPlayerLevel(player.uid) >= lvl then
return doPlayerSendCancel(cid,"Somebody in your team hasn't required level!")
end
if config.tylkoRaz == "tak" then
if getPlayerStorageValue(player.uid,config.storage) == 1 then
return doPlayerSendCancel(cid,"Somebody in your team already has a quest.") + 1
end
found = found + 1
end
end
if found == 4 then
for i = 1, 4 do
doTeleportThing(getThingfromPos(config.players[i]).uid,config.npos[i])
doSendMagicEffect(config.npos[i],12)
doSendAnimatedText(config.npos[i],"Fight!",192)
end
if config.tylkoRazDziennie == "tak" then
doTransformItem(item.uid,item.itemid+1)
end
if config.summonowacPotwory ~= "tak" then
return TRUE
end
for y = 1, 6 do
local monster = getThingfromPos(config.monsterPos[y][2])
if monster.uid > 0 then
doCreatureAddHealth(monster.uid,-9999999999)
end
doSummonCreature(config.monsterPos[y][1],config.monsterPos[y][2])
doSendMagicEffect(config.monsterPos[y][2],12)
end
end
return TRUE
end
if getPlayerStorageValue(cid,config.storage) == 1 then
doPlayerSendTextMessage(cid,22,"This's empty.")
return TRUE
end
for i = 1, #config.items do
if item.uid == config.startUid+i then
setPlayerStorageValue(cid,config.storage,1)
doPlayerAddItem(cid,config.items[i],1)
return TRUE
end
end
return TRUE
end
Anihilator Quest: (skrzynie)
PHP:
-- annihilator chests
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 5006 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Demon Armor.")
doPlayerAddItem(cid,2494,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 5007 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Sword of Valor.")
doPlayerAddItem(cid,2400,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 5008 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Stonecutter's Axe.")
doPlayerAddItem(cid,2431,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 5009 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Thunder Hammer.")
doPlayerAddItem(cid,2421,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
Oraz Pits of Inferno Quest: (skrzynie)
PHP:
if item.uid == 6000 then
queststatus = getPlayerStorageValue(cid,100)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a arcane staff.")
doPlayerAddItem(cid,2453,1)
setPlayerStorageValue(cid,100,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
if item.uid == 6001 then
queststatus = getPlayerStorageValue(cid,101)
if queststatus -= 1 then
doPlayerSendTextMessage(cid,22,"You have found a avenger.")
doPlayerAddItem(cid,6528,1)
setPlayerStorageValue(cid,100,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
if item.uid == 6002 then
queststatus = getPlayerStorageValue(cid,102)
if queststatus -= 1 then
doPlayerSendTextMessage(cid,22,"You have found a arbalest.")
doPlayerAddItem(cid,5803,1)
setPlayerStorageValue(cid,100,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
return 1
end
Prosz? o jak najszybsz? pomoc, z g?ry dzi?ki.