What's new

Skrypty & Kody b?ad z questami - wi?cej z opisie.

Status
Not open for further replies.

Fardos

Senior User
Joined
Mar 21, 2009
Messages
868
Reaction score
34
Witajcie, po probie przerzucenia si? z zwyk?ego silnika na lekko przerobiony trafi?em na pewien problem mianowicie z questami. Mog? je odebra? po ka?dym resecie i mimo ?e moim (S?abym bo s?abym) okiem skryptera wydaje si? to by? okej napisane niestety jest b??d

[LUA]function onUse(cid, item, frompos, item2, topos)

if (getPlayerAccess(cid) > 1) then
return
end
-- mage addon
if item.actionid == 5107 then
if getPlayerStorageValue(cid, 6004) == 3 then
setPlayerStorageValue(cid, 6004, 4)
doPlayerAddItemEx(cid, 4897, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5192) ..'')
pos = {x=314, y=397, z=12}
doSummonCreature("Orshabaal", pos)
pos = {x=316, y=394, z=12}
doSummonCreature("Orshabaal", pos)
pos = {x=313, y=397, z=12}
doSummonCreature("Orshabaal", pos)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5193) ..'')
end
-- hunter addon

elseif item.actionid == 5104 then
if getPlayerStorageValue(cid, 6000) == 2 then
setPlayerStorageValue(cid, 6000, 3)
doPlayerAddItemEx(cid, 4898, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5194) ..'')
pos = {x=567, y=412, z=11}
doSummonCreature("Orc Warlord", pos)
pos = {x=570, y=412, z=11}
doSummonCreature("Orc Warlord", pos)
pos = {x=567, y=412, z=11}
doSummonCreature("Orc Leader", pos)
pos = {x=570, y=412, z=11}
doSummonCreature("Orc Leader", pos)
pos = {x=567, y=412, z=11}
doSummonCreature("Orc Leader", pos)
pos = {x=570, y=412, z=11}
doSummonCreature("Orc Berserker", pos)
pos = {x=567, y=412, z=11}
doSummonCreature("Orc Berserker", pos)
pos = {x=570, y=412, z=11}
doSummonCreature("Orc Berserker", pos)

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5193) ..'')
end

-- shaman addon

-- NIE MA NA MAPIE TEGO!

elseif item.actionid == 5105 then
if getPlayerStorageValue(cid, 6008) == 1 then
setPlayerStorageValue(cid, 6008, 2)
doPlayerAddItemEx(cid, 4453, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5195) ..'')
pos = {x=538, y=226, z=3}
doSummonCreature("Demon", pos)
pos = {x=360, y=226, z=3}
doSummonCreature("Demon", pos)
pos = {x=362, y=226, z=3}
doSummonCreature("Warlock", pos)
pos = {x=358, y=223, z=3}
doSummonCreature("Warlock", pos)

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5193) ..'')
end

-- Raibinow Shield
elseif item.actionid == 5106 then
queststatus = getPlayerStorageValue(cid,6013)
if queststatus == 12 then
if getPlayerLevel(cid) >= 450 then
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5196) ..'')
doPlayerAddItemEx(cid, 5084, 1)
setPlayerStorageValue(cid,6013,14)
addExperience(cid, 1200000)
log(cid, 'Get exp for rainbow shield quest x done after x')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5197) ..'')
end
elseif queststatus == 13 then
addExperience(cid, 1200000)
setPlayerStorageValue(cid,6013,14)
log(cid, 'Get exp for rainbow shield quest x done before x')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
-- bright sword quest
elseif item.actionid == 5001 then
queststatus = getPlayerStorageValue(cid,5001)
if queststatus == -1 then
if getPlayerLevel(cid) >= 20 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5199) ..'')
doPlayerAddItemEx(cid,3233,1)
setPlayerStorageValue(cid,5001,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5200) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- orc fortress quest
elseif item.actionid == 5002 then
queststatus = getPlayerStorageValue(cid,5002)
if queststatus == -1 then
if getPlayerLevel(cid) >= 50 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5201) ..'')
doPlayerAddItemEx(cid,3298,1)
doPlayerAddItemEx(cid,2981,25)
setPlayerStorageValue(cid,5002,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5202) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end


elseif item.actionid == 5108 then
queststatus = getPlayerStorageValue(cid,6014)
queststatus1 = getPlayerStorageValue(cid,6018)
if queststatus == 1 and queststatus1 == -1 then
if getPlayerLevel(cid) >= 15 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5203) ..'')
doPlayerAddItemEx(cid,2981,15)
setPlayerStorageValue(cid,6018,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5204) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- pharaon quest (BOH, GS, MAGIC STAFF)
elseif item.actionid == 5003 then
queststatus = getPlayerStorageValue(cid,5003)
if queststatus == -1 then
if getPlayerLevel(cid) >= 60 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5205) ..'')
doPlayerAddItemEx(cid,3259,1)
setPlayerStorageValue(cid,5003,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5206) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5004 then
queststatus = getPlayerStorageValue(cid,5004)
if queststatus == -1 then
if getPlayerLevel(cid) >= 60 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5207) ..'')
doPlayerAddItemEx(cid,3017,1)
setPlayerStorageValue(cid,5004,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5206) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- 3 nowe questy na rocku ( zima 2008 )


elseif item.actionid == 7056 then
queststatus = getPlayerStorageValue(cid,7056)
if queststatus == -1 then
if getPlayerLevel(cid) >= 30 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5208) ..'')
doPlayerAddItemEx(cid,3342,1)
setPlayerStorageValue(cid,7056,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5209) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 7057 then
queststatus = getPlayerStorageValue(cid,7057)
if queststatus == -1 then
if getPlayerLevel(cid) >= 8 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5210) ..'')
doPlayerAddItemEx(cid,2973,100)
setPlayerStorageValue(cid,7057,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5211) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 7058 then
queststatus = getPlayerStorageValue(cid,7058)
if queststatus == -1 then
if getPlayerLevel(cid) >= 8 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5212) ..'')
doPlayerAddItemEx(cid,3510,1)
setPlayerStorageValue(cid,7058,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5211) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- koniec 3 questow xd

elseif item.actionid == 5017 then
queststatus = getPlayerStorageValue(cid,5017)
if queststatus == -1 then
if getPlayerLevel(cid) >= 60 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5213) ..'')
doPlayerAddItemEx(cid,3219,1)
setPlayerStorageValue(cid,5017,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5206) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- demon quest
elseif item.actionid == 5005 then
queststatus = getPlayerStorageValue(cid,5005)
if queststatus == -1 then
if getPlayerLevel(cid) >= 100 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5214) ..'')
doPlayerAddItemEx(cid,3492,1)
setPlayerStorageValue(cid,5005,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5215) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- crusader helmet
elseif item.actionid == 5026 then
queststatus = getPlayerStorageValue(cid,5026)
if queststatus == -1 then
if getPlayerLevel(cid) >= 30 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5216) ..'')
doPlayerAddItemEx(cid,3329,1)
setPlayerStorageValue(cid,5026,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5209) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- annihilator
elseif item.actionid == 5006 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5217) ..'')
doPlayerAddItemEx(cid,3326,1)
setPlayerStorageValue(cid,5010,1)
addExperience(cid, 80000)
log(cid, 'Get exp for annihilator quest.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5007 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5218) ..'')
doPlayerAddItemEx(cid,3226,1)
setPlayerStorageValue(cid,5010,1)
addExperience(cid, 80000)
log(cid, 'Get exp for annihilator quest.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5008 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5219) ..'')
doPlayerAddItemEx(cid,3257,1)
setPlayerStorageValue(cid,5010,1)
addExperience(cid, 80000)
log(cid, 'Get exp for annihilator quest.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5009 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5220) ..'')
doPlayerAddItemEx(cid,3247,1)
setPlayerStorageValue(cid,5010,1)
addExperience(cid, 80000)
log(cid, 'Get exp for annihilator quest.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- elf camp quest
elseif item.actionid == 5013 then
queststatus = getPlayerStorageValue(cid,5013)
if queststatus == -1 then
if getPlayerLevel(cid) >= 20 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5221) ..'')
doPlayerAddItemEx(cid,3260,1)
setPlayerStorageValue(cid,5013,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5200) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- banshee quest
elseif item.actionid == 5014 then
queststatus = getPlayerStorageValue(cid,5014)
if queststatus == -1 then
if getPlayerLevel(cid) >= 30 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5222) ..'')
doPlayerAddItemEx(cid,3217,1)
setPlayerStorageValue(cid,5014,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5209) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- slime quest
elseif item.actionid == 5015 then
queststatus = getPlayerStorageValue(cid,5015)
if queststatus == -1 then
if getPlayerLevel(cid) >= 12 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5223) ..'')
doPlayerAddItemEx(cid,3310,1)
doPlayerAddItemEx(cid,3359,1)
setPlayerStorageValue(cid,5015,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5224) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- necro quest
elseif item.actionid == 5016 then
queststatus = getPlayerStorageValue(cid,5016)
if queststatus == -1 then
if getPlayerLevel(cid) >= 20 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5225) ..'')
doPlayerAddItemEx(cid,3505,1)
doPlayerAddItemEx(cid,3271,1)
doPlayerAddItemEx(cid,3374,1)
doPlayerAddItemEx(cid,3512,1)
setPlayerStorageValue(cid,5016,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5200) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- ship quest
elseif item.actionid == 5018 then
queststatus = getPlayerStorageValue(cid,5018)
if queststatus == -1 then
if getPlayerLevel(cid) >= 25 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5226) ..'')
doPlayerAddItemEx(cid,5229,1)
setPlayerStorageValue(cid,5018,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5227) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- steering patent
-- storage value 5019

-- omegilator
elseif item.actionid == 5020 then
queststatus = getPlayerStorageValue(cid,5020)
if queststatus == -1 then
if getPlayerLevel(cid) >= 100 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5228) ..'')
doPlayerAddItemEx(cid,3168,1)
setPlayerStorageValue(cid,5020,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5215) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- hydra quest
elseif item.actionid == 5022 then
queststatus = getPlayerStorageValue(cid,5022)
if queststatus == -1 then
if getPlayerLevel(cid) >= 40 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5229) ..'')
doPlayerAddItemEx(cid,3355,1)
doPlayerAddItemEx(cid,3017,1)
setPlayerStorageValue(cid,5022,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5230) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- yeti quest
elseif item.actionid == 5023 then
queststatus = getPlayerStorageValue(cid,5023)
if queststatus == -1 then
if getPlayerLevel(cid) >= 20 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5231) ..'')
doPlayerAddItemEx(cid,3331,1)
setPlayerStorageValue(cid,5023,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5200) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- demon helmet
elseif item.actionid == 5024 then
queststatus = getPlayerStorageValue(cid,5024)
if queststatus == -1 then
if getPlayerLevel(cid) >= 100 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5232) ..'')
doPlayerAddItemEx(cid,3325,1)
setPlayerStorageValue(cid,5024,2)
addExperience(cid, 200000)
log(cid, 'Get exp for demon helet quest x done after x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5215) ..'')
end

elseif queststatus == 1 then
addExperience(cid, 20000)
setPlayerStorageValue(cid,5024,2)
log(cid, 'Get exp for demon helet quest x done before x.')

else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- demon shield
elseif item.actionid == 5025 then
queststatus = getPlayerStorageValue(cid,5025)
if queststatus == -1 then
if getPlayerLevel(cid) >= 100 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5233) ..'')
doPlayerAddItemEx(cid,3358,1)
setPlayerStorageValue(cid,5025,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5215) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5027 then
queststatus = getPlayerStorageValue(cid,5027)
if queststatus == -1 then
if getPlayerLevel(cid) >= 70 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5234) ..'')
doPlayerAddItemEx(cid,3240,1)
setPlayerStorageValue(cid,5027,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5235) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5028 then
queststatus = getPlayerStorageValue(cid,5028)
if queststatus == -1 then
if getPlayerLevel(cid) >= 70 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5236) ..'')
doPlayerAddItemEx(cid,3372,1)
setPlayerStorageValue(cid,5028,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5235) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5029 then
queststatus = getPlayerStorageValue(cid,5029)
if queststatus == -1 then
if getPlayerLevel(cid) >= 60 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5237) ..'')
doPlayerAddItemEx(cid,3258,1)
setPlayerStorageValue(cid,5029,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5206) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5030 then
queststatus = getPlayerStorageValue(cid,5030)
if queststatus == -1 then
if getPlayerLevel(cid) >= 50 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5238) ..'')
doPlayerAddItemEx(cid,3319,1)
setPlayerStorageValue(cid,5030,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5202) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5032 then
queststatus = getPlayerStorageValue(cid,5032)
if queststatus == -1 then
if getPlayerLevel(cid) >= 120 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5239) ..'')
doPlayerAddItemEx(cid,3377,1)
setPlayerStorageValue(cid,5032,2)
addExperience(cid, 1600)
log(cid, 'Get exp for phoenix shield quest x done after x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5240) ..'')
end

elseif queststatus == 1 then
setPlayerStorageValue(cid,5032,2)
addExperience(cid, 0)
log(cid, 'Get exp for phoenix shield quest x done before x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5033 then
queststatus = getPlayerStorageValue(cid,5033)
if queststatus == -1 then
if getPlayerLevel(cid) >= 120 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5241) ..'')
doPlayerAddItemEx(cid,2981,1)
setPlayerStorageValue(cid,5033,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5240) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end


elseif item.actionid == 5034 then
queststatus = getPlayerStorageValue(cid,5034)
if queststatus == -1 then
if getPlayerLevel(cid) >= 100 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5242) ..'')
doPlayerAddItemEx(cid,3380,1)
pos = {x=331, y=792, z=10}
doSummonCreature("Demodras",pos)
pos = {x=339, y=792, z=10}
doSummonCreature("Demodras",pos)
setPlayerStorageValue(cid,5034,2)
log(cid, 'Get exp for shield of blueness quest x done after x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5215) ..'')
end
elseif queststatus == 1 then
setPlayerStorageValue(cid,5034,2)
log(cid, 'Get exp for shield of blueness quest x done before x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
--- BEHE QUEST
elseif item.actionid == 5037 then
queststatus = getPlayerStorageValue(cid,5041)
queststatus2 = getPlayerStorageValue(cid,5037)
if queststatus == 1 and queststatus2 == -1 then
if getPlayerLevel(cid) >= 80 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5243) ..'')
doPlayerAddItemEx(cid,3253,1)
setPlayerStorageValue(cid,5037,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5244) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5038 then
queststatus = getPlayerStorageValue(cid,5041)
queststatus2 = getPlayerStorageValue(cid,5038)
if queststatus == 1 and queststatus2 == -1 then
if getPlayerLevel(cid) >= 80 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5201) ..'')
doPlayerAddItemEx(cid,3298,1)
setPlayerStorageValue(cid,5038,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5244) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5039 then
queststatus = getPlayerStorageValue(cid,5041)
queststatus2 = getPlayerStorageValue(cid,5039)
if queststatus == 1 and queststatus2 == -1 then
if getPlayerLevel(cid) >= 80 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5233) ..'')
doPlayerAddItemEx(cid,3358,1)
setPlayerStorageValue(cid,5039,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5244) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5040 then
queststatus = getPlayerStorageValue(cid,5041)
queststatus2 = getPlayerStorageValue(cid,5040)
if queststatus == 1 and queststatus2 == -1 then
if getPlayerLevel(cid) >= 80 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5245) ..'')
doPlayerAddItemEx(cid,2993,1)
setPlayerStorageValue(cid,5040,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5244) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5041 then
queststatus = getPlayerStorageValue(cid,5051)
if queststatus == -1 then
if getPlayerLevel(cid) >= 40 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5246) ..'')
setPlayerStorageValue(cid,5051,2)
pos = {x=210, y=472, z=5}
doSummonCreature("Marid",pos)
pos = {x=216, y=475, z=5}
doSummonCreature("Marid",pos)
pos = {x=217, y=475, z=5}
doSummonCreature("Efreet",pos)
pos = {x=221, y=472, z=5}
doSummonCreature("Efreet",pos)
addExperience(cid, 450000)
log(cid, 'Get exp for djinn quest x done after x.')

else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5247) ..'')
end

elseif queststatus == 1 then
addExperience(cid, 4500)
setPlayerStorageValue(cid,5051,2)
log(cid, 'Get exp for djinn quest x done before x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5248) ..'')
end

elseif item.actionid == 5042 then
queststatus = getPlayerStorageValue(cid,5056)

if queststatus == -1 then
if getPlayerLevel(cid) >= 65 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5249) ..'')
doPlayerAddItemEx(cid,3279,1)
setPlayerStorageValue(cid,5056,2)
addExperience(cid, 12000)
log(cid, 'Get exp for sprite wand x done after x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5250) ..'')
end
elseif queststatus == 1 then
setPlayerStorageValue(cid,5056,2)
addExperience(cid, 12000)
log(cid, 'Get exp for sprite wand x done before x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5248) ..'')
end

elseif item.actionid == 5043 then
queststatus = getPlayerStorageValue(cid,5057)

if queststatus == -1 then
if getPlayerLevel(cid) >= 65 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5251) ..'')
doPlayerAddItemEx(cid,3170,1)
setPlayerStorageValue(cid,5057,1)

else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5250) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5248) ..'')
end

-- OF under Edron Quest
elseif item.actionid == 5053 or item.actionid == 5054 or item.actionid == 5055 then

if getPlayerLevel(cid) >= 45 then
if item.actionid == 5053 then
qstatus = getPlayerStorageValue(cid, 5053)
if qstatus == -1 then
setPlayerStorageValue(cid, 5053, 1)
doPlayerAddItemEx(cid, 3308, 1)
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5252) ..'')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5253) ..'')
end
elseif item.actionid == 5054 then
qstatus = getPlayerStorageValue(cid, 5054)
if qstatus == -1 then
setPlayerStorageValue(cid, 5054, 1)
doPlayerAddItemEx(cid, 3309, 1)
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5254) ..'')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5253) ..'')
end
elseif item.actionid == 5055 then
qstatus = getPlayerStorageValue(cid, 5055)
if qstatus == -1 then
setPlayerStorageValue(cid, 5055, 1)
doPlayerAddItemEx(cid, 3256, 1)
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5255) ..'')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5253) ..'')
end
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5256) ..'')
end
-- -- Demon Fury Quest

elseif item.actionid == 5096 then
if getPlayerLevel(cid) >= 400 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5058) <= 0 then
doPlayerAddItemEx(cid, 3270, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5257) ..'')
setPlayerStorageValue(cid, 5058, 10)
addExperience(cid, 700000)
log(cid, 'Get exp for hammer of wrath x done after x.')
elseif getPlayerStorageValue(cid, 5058) == 3 then
addExperience(cid, 700000)
log(cid, 'Get exp for hammer of wrath x done before x.')
setPlayerStorageValue(cid, 5058, 10)

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5258) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5259) ..'')
end

elseif item.actionid == 5097 then
if getPlayerLevel(cid) >= 400 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5058) <= 0 then
doPlayerAddItemEx(cid, 3272, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5260) ..'')
setPlayerStorageValue(cid, 5058, 10)
addExperience(cid, 700000)
log(cid, 'Get exp for great sword x done after x.')
elseif getPlayerStorageValue(cid, 5058) == 2 then
addExperience(cid, 700000)
setPlayerStorageValue(cid, 5058, 10)
log(cid, 'Get exp for great sword x done before x.')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5258) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5259) ..'')
end

elseif item.actionid == 5098 then
if getPlayerLevel(cid) >= 400 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5058) <= 0 then
doPlayerAddItemEx(cid, 3241, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5261) ..'')
setPlayerStorageValue(cid, 5058, 10)
addExperience(cid, 700000)
log(cid, 'Get exp for great axe x done after x.')
elseif getPlayerStorageValue(cid, 5058) == 1 then
addExperience(cid, 700000)
setPlayerStorageValue(cid, 5058, 10)
log(cid, 'Get exp for great axe x done before x.')

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5258) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5259) ..'')
end
elseif item.actionid == 5099 then
if getPlayerLevel(cid) >= 400 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5058) <= 0 then
doPlayerAddItemEx(cid, 3273, 1, 4)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5262) ..'')
setPlayerStorageValue(cid, 5058, 10)
addExperience(cid, 700000)
log(cid, 'Get exp for wyborowy blade staff x done after x.')
elseif getPlayerStorageValue(cid, 5058) == 4 then
addExperience(cid, 700000)
setPlayerStorageValue(cid, 5058, 10)
log(cid, 'Get exp for wyborowy blade staff x done before x.')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5258) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5259) ..'')
end
elseif item.actionid == 5100 then
if getPlayerLevel(cid) >= 400 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5058) <= 0 then
doPlayerAddItemEx(cid, 3287, 1, 4)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5263) ..'')
setPlayerStorageValue(cid, 5058, 10)
log(cid, 'Get exp for crossbow dfq quest x done after x')
addExperience(cid, 700000)
elseif getPlayerStorageValue(cid, 5058) == 5 then
addExperience(cid, 700000)
log(cid, 'Get exp for crossbow dfq quest x done before x')
setPlayerStorageValue(cid, 5058, 10)

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5258) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5259) ..'')
end
elseif item.actionid == 5101 then
if getPlayerLevel(cid) >= 400 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5058) <= 0 then
doPlayerAddItemEx(cid, 3301, 1, 2)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5264) ..'')
setPlayerStorageValue(cid, 5058, 10)
addExperience(cid, 700000)
log(cid, 'Get exp for dragon scale legs dfq quest x done after x')
elseif getPlayerStorageValue(cid, 5058) == 6 then
addExperience(cid, 700000)
log(cid, 'Get exp for dragon scale legs dfq quest x done before x')
setPlayerStorageValue(cid, 5058, 10)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5258) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5259) ..'')
end

-- -- Orshabaal Quest
-- Horned helmet
elseif item.actionid == 5059 then
if getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5059) == -1 then
setPlayerStorageValue(cid, 5059, 2)
doPlayerAddItemEx(cid, 3328, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5265) ..'')
addExperience(cid, 150000)
log(cid, 'Get exp for horned helmet x done after x.')

elseif getPlayerStorageValue(cid, 5060) > 5 and getPlayerStorageValue(cid, 5059) == 1 then
addExperience(cid, 150000)
setPlayerStorageValue(cid, 5059, 2)
log(cid, 'Get exp for horned helmet x done before x.')

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- Broken amulet
-- Four hidden elements
elseif item.actionid == 5061 then
if getPlayerStorageValue(cid, 5060) == 2 and getPlayerStorageValue(cid, 5061) ~= 1 then
setPlayerStorageValue(cid, 5061, 1)
doPlayerAddItemEx(cid, 3415, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5266) ..'')

if math.random(0,4) == 0 then
pos = {x=702, y=523, z=10}
doSummonCreature("Dracula", pos)
else
pos = {x=706, y=523, z=10}
doSummonCreature("Vampire", pos)
pos = {x=705, y=524, z=10}
doSummonCreature("Vampire", pos)
pos = {x=704, y=525, z=10}
doSummonCreature("Vampire", pos)
pos = {x=700, y=525, z=10}
doSummonCreature("Vampire", pos)
pos = {x=699, y=524, z=10}
doSummonCreature("Vampire", pos)
pos = {x=698, y=523, z=10}
doSummonCreature("Vampire", pos)
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5062 then
if getPlayerStorageValue(cid, 5060) == 3 and getPlayerStorageValue(cid, 5062) ~= 1 then
setPlayerStorageValue(cid, 5062, 1)
doPlayerAddItemEx(cid, 3416, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5266) ..'')

if math.random(0,4) == 0 then
pos = {x=46, y=132, z=12}
doSummonCreature("Wenewra", pos)
else
pos = {x=43, y=130, z=12}
doSummonCreature("Banshee", pos)
pos = {x=43, y=128, z=12}
doSummonCreature("Banshee", pos)
pos = {x=45, y=128, z=12}
doSummonCreature("Banshee", pos)
pos = {x=47, y=128, z=12}
doSummonCreature("Banshee", pos)
pos = {x=49, y=128, z=12}
doSummonCreature("Banshee", pos)
pos = {x=49, y=130, z=12}
doSummonCreature("Banshee", pos)
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5063 then
if getPlayerStorageValue(cid, 5060) == 4 and getPlayerStorageValue(cid, 5063) ~= 1 then
setPlayerStorageValue(cid, 5063, 1)
doPlayerAddItemEx(cid, 3417, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5266) ..'')

if math.random(0,4) == 0 then
pos = {x=49, y=302, z=9}
doSummonCreature("Lloth", pos)
else
pos = {x=216, y=91, z=8}
doSummonCreature("Giant Spider", pos)
pos = {x=218, y=91, z=9}
doSummonCreature("Giant Spider", pos)
pos = {x=214, y=89, z=9}
doSummonCreature("Giant Spider", pos)
pos = {x=216, y=89, z=9}
doSummonCreature("Giant Spider", pos)
pos = {x=218, y=89, z=9}
doSummonCreature("Giant Spider", pos)
pos = {x=214, y=87, z=9}
doSummonCreature("Giant Spider", pos)
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5064 then
if getPlayerStorageValue(cid, 5060) == 5 and getPlayerStorageValue(cid, 5064) ~= 1 then
setPlayerStorageValue(cid, 5064, 1)
doPlayerAddItemEx(cid, 3418, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5266) ..'')

if math.random(0,5) == 0 then
pos = {x=153, y=330, z=11}
doSummonCreature("Ascalogan", pos)
else
pos = {x=149, y=331, z=11}
doSummonCreature("Dragon Lord", pos)
pos = {x=151, y=329, z=11}
doSummonCreature("Dragon Lord", pos)
pos = {x=154, y=329, z=11}
doSummonCreature("Dragon Lord", pos)
pos = {x=157, y=331, z=11}
doSummonCreature("Dragon Lord", pos)
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- War Hammer
elseif item.actionid == 5065 then
if getPlayerStorageValue(cid, 5065) ~= 1 and getPlayerLevel(cid) >= 30 then
setPlayerStorageValue(cid, 5065, 1)
doPlayerAddItemEx(cid, 3217, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5222) ..'')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- Royal Helmet
elseif item.actionid == 5066 then
if getPlayerStorageValue(cid, 5066) == -1 and getPlayerLevel(cid) >= 90 then
setPlayerStorageValue(cid, 5066, 2)
doPlayerAddItemEx(cid, 3330, 1)
addExperience(cid, 12000)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5267) ..'')
log(cid, 'Get exp for royal helmet x done after x.')
elseif getPlayerStorageValue(cid, 5066) == 1 and getPlayerLevel(cid) >= 90 then
setPlayerStorageValue(cid, 5066, 2)
addExperience(cid, 12000)
log(cid, 'Get exp for royal helmet x done before x.')

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- Crown legs
elseif item.actionid == 5073 then
if getPlayerStorageValue(cid, 5072) ~= 1 and getPlayerLevel(cid) >= 30 then
setPlayerStorageValue(cid, 5072, 1)
doPlayerAddItemEx(cid, 3320, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5268) ..'')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5074 then
if getPlayerStorageValue(cid, 5073) ~= 1 then
if getPlayerLevel(cid) >= 20 then
setPlayerStorageValue(cid, 5073, 1)
doPlayerAddItemEx(cid, 3295, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5269) ..'')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5270) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end


--- BOH
elseif item.actionid == 5077 then
queststatus = getPlayerStorageValue(cid,5077)
if queststatus == -1 then
if getPlayerLevel(cid) >= 40 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5207) ..'')
doPlayerAddItemEx(cid,3017,1)
setPlayerStorageValue(cid,5077,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5230) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5078 then
queststatus = getPlayerStorageValue(cid,5078)
if queststatus == -1 then
if getPlayerLevel(cid) >= 20 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5271) ..'')
doPlayerAddItemEx(cid,3359,1)
setPlayerStorageValue(cid,5078,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5200) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
--Elvish Tower

elseif item.actionid == 5079 then
queststatus = getPlayerStorageValue(cid,5079)
if queststatus == -1 then
if getPlayerLevel(cid) >= 15 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5272) ..'')
doPlayerAddItemEx(cid,2973,50)
setPlayerStorageValue(cid,5079,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5273) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end



elseif item.actionid == 5080 then
queststatus = getPlayerStorageValue(cid,5080)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5274) ..'')
doPlayerAddItemEx(cid,3218,1)
setPlayerStorageValue(cid,5080,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5081 then
queststatus = getPlayerStorageValue(cid,5080)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5275) ..'')
doPlayerAddItemEx(cid,3258,1)
setPlayerStorageValue(cid,5080,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5082 then
queststatus = getPlayerStorageValue(cid,5080)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5276) ..'')
doPlayerAddItemEx(cid,3262,1)
setPlayerStorageValue(cid,5080,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5083 then
queststatus = getPlayerStorageValue(cid,5083)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5277) ..'')
doPlayerAddItemEx(cid,3209,1)
setPlayerStorageValue(cid,5083,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5084 then
queststatus = getPlayerStorageValue(cid,5083)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5278) ..'')
doPlayerAddItemEx(cid,3255,1)
setPlayerStorageValue(cid,5083,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5085 then
queststatus = getPlayerStorageValue(cid,5083)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5279) ..'')
doPlayerAddItemEx(cid,3146,1)
setPlayerStorageValue(cid,5083,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5086 then
queststatus = getPlayerStorageValue(cid,5086)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5280) ..'')
doPlayerAddItemEx(cid,3240,1)
setPlayerStorageValue(cid,5086,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5087 then
queststatus = getPlayerStorageValue(cid,5086)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5281) ..'')
doPlayerAddItemEx(cid,3219,1)
setPlayerStorageValue(cid,5086,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5088 then
queststatus = getPlayerStorageValue(cid,5086)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5282) ..'')
doPlayerAddItemEx(cid,3217,1)
setPlayerStorageValue(cid,5086,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5089 then
queststatus = getPlayerStorageValue(cid,5086)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5283) ..'')
doPlayerAddItemEx(cid,3319,1)
setPlayerStorageValue(cid,5086,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5090 then
queststatus = getPlayerStorageValue(cid,5090)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5284) ..'')
doPlayerAddItemEx(cid,7394,1)
doPlayerAddItemEx(cid,7394,1)
setPlayerStorageValue(cid,5090,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5091 then
queststatus = getPlayerStorageValue(cid,5093)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5285) ..'')
doPlayerAddItemEx(cid,4445,1)
setPlayerStorageValue(cid,5093,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5092 then
queststatus = getPlayerStorageValue(cid,5093)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5286) ..'')
doPlayerAddItemEx(cid,4444,1)
setPlayerStorageValue(cid,5093,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5093 then
queststatus = getPlayerStorageValue(cid,5093)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5287) ..'')
doPlayerAddItemEx(cid,4427,1)
setPlayerStorageValue(cid,5093,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5094 then
queststatus = getPlayerStorageValue(cid,5093)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5288) ..'')
doPlayerAddItemEx(cid,4423,1)
setPlayerStorageValue(cid,5093,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

elseif item.actionid == 5095 then
queststatus = getPlayerStorageValue(cid,5093)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5289) ..'')
doPlayerAddItemEx(cid, 4328, 1, 1)
setPlayerStorageValue(cid,5093,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5102 then
queststatus = getPlayerStorageValue(cid,5093)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5290) ..'')
doPlayerAddItemEx(cid, 4344, 1, 2)
setPlayerStorageValue(cid,5093,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 5103 then
queststatus = getPlayerStorageValue(cid,5092)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5291) ..'')
doPlayerAddItemEx(cid, 3184, 1)
setPlayerStorageValue(cid,5092,2)
addExperience(cid, 350000)
log(cid, 'Get exp for poi quest x done after x.')
elseif queststatus == 1 then
addExperience(cid, 350000)
setPlayerStorageValue(cid,5092,2)
log(cid, 'Get exp for poi quest x done before x.')
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- Mats quest saw
elseif item.actionid == 5121 then
queststatus = getPlayerStorageValue(cid,6022)
queststatus1 = getPlayerStorageValue(cid,6023)
if queststatus == 9 then
if queststatus1 == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5292) ..'')
doPlayerAddItemEx(cid, 3399, 1)
setPlayerStorageValue(cid,6023,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5293) ..'')
end

elseif queststatus < 9 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5294) ..'')
elseif queststatus > 9 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5293) ..'')
end

-- Mats quest wooden hammer
elseif item.actionid == 5122 then
queststatus = getPlayerStorageValue(cid,6022)
queststatus1 = getPlayerStorageValue(cid,6024)
if queststatus == 9 then
if queststatus1 == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5295) ..'')
doPlayerAddItemEx(cid, 3397, 1)
setPlayerStorageValue(cid,6024,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5293) ..'')
end

elseif queststatus < 9 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5294) ..'')
elseif queststatus > 9 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5293) ..'')
end

-- Mats quest rope
elseif item.actionid == 5123 then
queststatus = getPlayerStorageValue(cid,6022)
queststatus1 = getPlayerStorageValue(cid,6025)
if queststatus == 9 then
if queststatus1 == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5296) ..'')
doPlayerAddItemEx(cid, 5776, 1)
setPlayerStorageValue(cid,6025,1)
forpos = {x=421, y=1171, z=7}
doTeleportThing(cid, forpos)
doSendMagicEffect(forpos, 10)

else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5293) ..'')
forpos = {x=421, y=1171, z=7}
doTeleportThing(cid, forpos)
doSendMagicEffect(forpos, 10)
end

elseif queststatus < 9 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5294) ..'')
forpos = {x=421, y=1171, z=7}
doTeleportThing(cid, forpos)
doSendMagicEffect(forpos, 10)
elseif queststatus > 9 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5293) ..'')
forpos = {x=421, y=1171, z=7}
doTeleportThing(cid, forpos)
doSendMagicEffect(forpos, 10)
end
-- kolo zembate mat quest winda

elseif item.actionid == 5124 then
queststatus = getPlayerStorageValue(cid,6022)
queststatus1 = getPlayerStorageValue(cid,6026)
if queststatus == 11 then
if getPlayerLevel(cid) >= 300 then
if queststatus1 == -1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5297) ..'')
doPlayerAddItemEx(cid, 5755, 1)
setPlayerStorageValue(cid,6026,1)
setPlayerStorageValue(cid,6022,12)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5298) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5299) ..'')
end

elseif queststatus < 11 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5300) ..'')
elseif queststatus > 11 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5298) ..'')
end



-- magic steel boots
elseif item.actionid == 5138 then
if getPlayerStorageValue(cid, 6029) == -1 then
if getPlayerLevel(cid) >= 600 then
setPlayerStorageValue(cid, 6029, 2)
doPlayerAddItemEx(cid, 7754, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5301) ..'')
addExperience(cid, 1200000)
log(cid, 'Get exp for slayer quest x done after x')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5302) ..'')
end

elseif getPlayerStorageValue(cid, 6029) == 1 then
addExperience(cid, 1200000)
setPlayerStorageValue(cid,6029,2)
log(cid, 'Get exp for slayer quest x done before x')

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- sacred armor
elseif item.actionid == 5139 then
if getPlayerStorageValue(cid, 6030) == -1 then
if getPlayerLevel(cid) >= 550 then
if (getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 6016, 50)
end
setPlayerStorageValue(cid, 6030, 2)
doPlayerAddItemEx(cid, 5750, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5303) ..'')
addExperience(cid, 2000000)
log(cid, 'Get exp for sacred armor x done after x')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5304) ..'')
end

elseif getPlayerStorageValue(cid, 6030) == 1 then
addExperience(cid, 2000000)
setPlayerStorageValue(cid,6030,2)
log(cid, 'Get exp for sacred armor x done before x')

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- sacred skirt
elseif item.actionid == 5140 then
if getPlayerStorageValue(cid, 6030) == -1 then
if getPlayerLevel(cid) >= 550 then
if (getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 6016, 50)
end
setPlayerStorageValue(cid, 6030, 2)
doPlayerAddItemEx(cid, 5751, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5305) ..'')
addExperience(cid, 2000000)
log(cid, 'Get exp for sacred skirt x done after x')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5304) ..'')
end
elseif getPlayerStorageValue(cid, 6030) == 1 then
addExperience(cid, 2000000)
setPlayerStorageValue(cid,6030,2)
log(cid, 'Get exp for sacred skirt x done before x')
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
-- sacred shield
elseif item.actionid == 5141 then
if getPlayerStorageValue(cid, 6030) == -1 then
if getPlayerLevel(cid) >= 550 then
if (getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 6016, 50)
end
setPlayerStorageValue(cid, 6030, 2)
doPlayerAddItemEx(cid, 5762, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5306) ..'')
log(cid, 'Get exp for sacred shield x done after x')
addExperience(cid, 2000000)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5304) ..'')
end
elseif getPlayerStorageValue(cid, 6030) == 1 then
addExperience(cid, 2000000)
setPlayerStorageValue(cid,6030,2)
log(cid, 'Get exp for sacred shield x done before x')

else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end

-- Vergoth nagrody
elseif item.actionid == 8151 then
if getPlayerStorageValue(cid,6070) == -1 then
if getPlayerLevel(cid) >= 700 then
setPlayerStorageValue(cid, 6070, 1)
doPlayerAddItemEx(cid, 10116, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5307) ..'')
log(cid, 'Get exp for Vergoth Quest')
addExperience(cid,5000000)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5308) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 8152 then
if getPlayerStorageValue(cid,6070) == -1 then
if getPlayerLevel(cid) >= 700 then
setPlayerStorageValue(cid, 6070, 1)
doPlayerAddItemEx(cid, 10115, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5309) ..'')
log(cid, 'Get exp for Vergoth Quest')
addExperience(cid,5000000)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5308) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 8153 then
if getPlayerStorageValue(cid,6070) == -1 then
if getPlayerLevel(cid) >= 700 then
setPlayerStorageValue(cid, 6070, 1)
doPlayerAddItemEx(cid, 10117, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5310) ..'')
log(cid, 'Get exp for Vergoth Quest')
addExperience(cid,5000000)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5308) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end
elseif item.actionid == 8154 then
if getPlayerStorageValue(cid,6070) == -1 then
if getPlayerLevel(cid) >= 700 then
setPlayerStorageValue(cid, 6070, 1)
doPlayerAddItemEx(cid, 10118, 1)
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5309) ..'')
log(cid, 'Get exp for Vergoth Quest')
addExperience(cid,5000000)
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5308) ..'')
end
else
doPlayerSendTextMessage(cid, 22, '' .. getMessage(cid,5198) ..'')
end








-- MOJE
--STARTOWE EQ

-- PLATE ARMOR
elseif item.actionid == 50060 then
getPlayerStorageValue(cid,50060)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200001) ..'')
doPlayerAddItemEx(cid,3295,1)
setPlayerStorageValue(cid,50060,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end


-- PLATE LEGS
elseif item.actionid == 50061 then
queststatus = getPlayerStorageValue(cid,50061)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200002) ..'')
doPlayerAddItemEx(cid,3495,1)
setPlayerStorageValue(cid,50061,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
-- DWARVEN SHIELD
elseif item.actionid == 50062 then
queststatus = getPlayerStorageValue(cid,50062)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200003) ..'')
doPlayerAddItemEx(cid,3363,1)
setPlayerStorageValue(cid,50062,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- steel helmet
elseif item.actionid == 50063 then
queststatus = getPlayerStorageValue(cid,50063)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200004) ..'')
doPlayerAddItemEx(cid,3289,1)
setPlayerStorageValue(cid,50063,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- laska
elseif item.actionid == 50064 then
queststatus = getPlayerStorageValue(cid,50064)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200005) ..'')
doPlayerAddItemEx(cid,3281,1)
setPlayerStorageValue(cid,50064,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- sword
elseif item.actionid == 50065 then
queststatus = getPlayerStorageValue(cid,50065)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200006) ..'')
doPlayerAddItemEx(cid,3235,1)
setPlayerStorageValue(cid,50065,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
-- club
elseif item.actionid == 50066 then
queststatus = getPlayerStorageValue(cid,50066)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200007) ..'')
doPlayerAddItemEx(cid,3220,1)
setPlayerStorageValue(cid,50066,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end
-- Axe
elseif item.actionid == 50067 then
queststatus = getPlayerStorageValue(cid,50067)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200008) ..'')
doPlayerAddItemEx(cid,3255,1)
setPlayerStorageValue(cid,50067,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end




-- Spear
elseif item.actionid == 50068 then
queststatus = getPlayerStorageValue(cid,50068)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200009) ..'')
doPlayerAddItemEx(cid,3215,5)
setPlayerStorageValue(cid,50068,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end




-- bolty
elseif item.actionid == 50068 then
queststatus = getPlayerStorageValue(cid,50068)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200010) ..'')
doPlayerAddItemEx(cid,3384,100)
setPlayerStorageValue(cid,50068,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end



-- bolty
elseif item.actionid == 50069 then
queststatus = getPlayerStorageValue(cid,50069)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200010) ..'')
doPlayerAddItemEx(cid,3384,100)
setPlayerStorageValue(cid,50069,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end

-- arrowsy
elseif item.actionid == 50070 then
queststatus = getPlayerStorageValue(cid,50070)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200011) ..'')
doPlayerAddItemEx(cid,3385,100)
setPlayerStorageValue(cid,50070,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end



-- bow
elseif item.actionid == 50071 then
queststatus = getPlayerStorageValue(cid,50071)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200012) ..'')
doPlayerAddItemEx(cid,3288,1)
setPlayerStorageValue(cid,50071,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end



-- bolty
elseif item.actionid == 50072 then
queststatus = getPlayerStorageValue(cid,50072)
if queststatus == -1 then
if getPlayerLevel(cid) >= 1 then
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200013) ..'')
doPlayerAddItemEx(cid,3287,1)
setPlayerStorageValue(cid,50072,1)
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,200000) ..'')
end
else
doPlayerSendTextMessage(cid,22,'' .. getMessage(cid,5198) ..'')
end





end
return 1
end[/LUA]


w .xml

[XML] <action itemid="5710" script="chest.lua" />
<action itemid="5108" script="chest.lua" />
<action itemid="6802" script="chest.lua" />
<action itemid="8131" script="chest.lua" />
<action itemid="6232" script="chest.lua" />
<action itemid="8130" script="chest.lua" />
<action itemid="2441" script="chest.lua" />
<action itemid="2447" script="chest.lua" />
<action itemid="2448" script="chest.lua" />
<action itemid="2449" script="chest.lua" />
<action itemid="2450" script="chest.lua" />
<action itemid="2487" script="chest.lua" />[/XML]

Widzicie tu jaki? b??d? Je?li tak to jaki. (Pierwsze 2 skrypty s? orginalnymi z silnika i dzia?aj? tak samo jak pozosta?e - mog? je bra? co restart albo raczej nie mam wyboru gdy chce odwiedzi? np. djina... )

Je?li nie to je?li kto? ma jaki? skrypcik dzia?aj?cy na podobnej zasadzie jak mo?e to prosz? o podes?anie - odp?ac? si? reputem...
 

misztrz440

Banned
Joined
Dec 15, 2012
Messages
1,032
Reaction score
39
Odp: b?ad z questami - wi?cej z opisie.

Czyli jak na tym starym dzia?a?o i przezuciles p??niej na ten przerobiony i w skrypcie nic nie robiles to jak my?lisz czyja wina??? W wkrypcie zmienia storage wiec wyjasnienie jest proste po prostu nie zapisuje Ci silnik storqge dla danej postaci powiem od razu ze w bazie danych obczai albo po prostu silnik w co bardziej wierze
 

Fardos

Senior User
Joined
Mar 21, 2009
Messages
868
Reaction score
34
Odp: b?ad z questami - wi?cej z opisie.

Co do niezapisywania jest to mo?liwe ale w?tpi? w to, silnik na kt?rym przerabiam jest po prostu edycj? "domow?" w?a?nie do testowania skrypt?w itp... Napisz? bezpo?rednio do supportu z pro?b? o informacj? na ten temat. Je?li to prawda (przesz?o mi to przez my?l po 10 pr?bie z innym rodzajem skrzynki) to si? uciesz?, jak nie to dowiem si? ju? od nich co jest nie tak w tym co wyskroba?em... temat w sumie do zamkni?cia. (ewentualnie zostawcie go je?li si? dowiem czego? ciekawego to zeedytuje post i b?dzie dla potomnych.

ma?a edycja - co? nieco? pozmienia?em bo na tym "nowym" s? pozmieniane min. ID
 
Last edited:
Status
Not open for further replies.
Top