LucasFerraz
Systems Analyst
Hello,
this time im here to release my Achievements' Pack.
First of all you can find the LIB Files here.
Also you can download the Gesior's Achievement Page here.
Ok, now to business.
Party Animal
Potion Addict
Chorister
Fountain of Life
Here, Fishy Fishy!
Allowance Collector
Fireworks in the Sky
Jinx
Masquerader
Polisher
Annihilator
This is the lever script
Ruthless
Greenhorn
You have to register in login.lua
Scrapper
You have to register in login.lua
Warlord
You have to register in login.lua
Backpack Tourist
Interior Decorator
Rockstar
Champion of Chazorai
Master of the Nexus
High Inquisitor
Herbicide
I'm enjoying my holidays to finish ALL Achievements, if you have some Achievement that isn't posted here please, share with us
this time im here to release my Achievements' Pack.
First of all you can find the LIB Files here.
Also you can download the Gesior's Achievement Page here.
Ok, now to business.
Party Animal
Lua:
<action itemid="6578" event="script" value="achievements/partyhat.lua"/>
<action itemid="6572" event="script" value="achievements/partytrumpet.lua"/>
<action itemid="6573" event="script" value="achievements/usedpartytrumpet.lua"/>
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_HEAD).uid) then
return false
end
if getPlayerStorageValue(cid,21013) == 200 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Party Animal\".")
doPlayerAddAchievement(cid, 13)
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
setPlayerStorageValue(cid, 21013, getCreatureStorage(cid, 21013) + 1)
return true
end
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21013) == 200 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Party Animal\".")
doPlayerAddAchievement(cid, 13)
end
doCreatureSay(cid, "TOOOOOOT!", TALKTYPE_ORANGE_1)
doSendMagicEffect(fromPosition, CONST_ME_SOUND_BLUE)
doTransformItem(item.uid, 6573)
doDecayItem(item.uid)
setPlayerStorageValue(cid, 21013, getCreatureStorage(cid, 21013) + 1)
return true
end
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,20013) == 200 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Party Animal\".")
doPlayerAddAchievement(cid, 13)
end
doCreatureSay(cid, "TOOOOOOT!", TALKTYPE_ORANGE_1)
doSendMagicEffect(fromPosition, CONST_ME_SOUND_BLUE)
setPlayerStorageValue(cid, 20013, getCreatureStorage(cid, 20013) + 1)
return true
end
Potion Addict
Lua:
<action itemid="7588-7591;8472-8473;7618;7620;8704" event="script" value="liquids/potions.lua"/>
Lua:
local config = {
removeOnUse = "no",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 1.0
}
config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)
local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8, 11, 12}, vocStr = "knights and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8, 12}, vocStr = "knights"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8, 12}, vocStr = "knights"}, -- ultimate health potion
[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7, 9, 10 ,11}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6, 9, 10}, vocStr = "sorcerers and druids"}, -- great mana potion
[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7, 11}, vocStr = "paladins"} -- great spirit potion
}
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return false
end
if getPlayerStorageValue(cid,21066) == 100000 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Potion Addict\".")
doPlayerAddAchievement(cid, 66)
end
if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end
if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end
doDecayItem(doCreateItem(2016, potion.splash, toPosition))
doTransformItem(item.uid, potion.empty)
return true
end
if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end
if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return true
end
local health = potion.health
if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then
return false
end
local mana = potion.mana
if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then
return false
end
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
if(not realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 21066, getCreatureStorage(cid, 21066) + 1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end
doAddCondition(cid, exhaust)
if(not potion.empty or config.removeOnUse) then
doRemoveItem(item.uid, 1)
return true
end
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, potion.empty, 1)
pot_count = getPlayerItemCount(cid, potion.empty)
doPlayerRemoveItem(cid, potion.empty, pot_count)
doPlayerAddItem(cid, potion.empty, pot_count)
return true
end
Chorister
Lua:
<action uniqueid="60034" event="script" value="other/cultpiano.lua"/>
Lua:
function onUse(cid, item, frompos, item2, topos)
local queststatus = getPlayerStorageValue(cid,item.itemid)
local versestatus1 = getPlayerStorageValue(cid, 6087)
local versestatus2 = getPlayerStorageValue(cid, 6088)
local versestatus3 = getPlayerStorageValue(cid, 6089)
local versestatus4 = getPlayerStorageValue(cid, 6090)
local npos = {x=topos.x-3, y=topos.y, z=topos.z}
if item.uid == 60034 and getPlayerStorageValue(cid,20005) == -1 then
if versestatus1 == 1 and versestatus2 == 1 and versestatus3 == 1 and versestatus4 == 1 then
doSendMagicEffect(topos, 18)
doPlayerSendTextMessage(cid,22,"You have successfully played the song.")
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Chorister\".")
doPlayerAddAchievement(cid, 5)
doTeleportThing(cid, npos, FALSE)
else
doPlayerSendTextMessage(cid,22,"You don\'t know the complete song.")
end
elseif item.uid == 60034 and getPlayerStorageValue(cid,20005) >= 1 then
if versestatus1 == 1 and versestatus2 == 1 and versestatus3 == 1 and versestatus4 == 1 then
doSendMagicEffect(topos, 18)
doPlayerSendTextMessage(cid,22,"You have successfully played the song.")
doTeleportThing(cid, npos, FALSE)
end
end
return TRUE
end
Fountain of Life
Lua:
<action actionid="13462" event="script" value="PitsOfInferno/fountainachievement.lua"/>
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,20006) == -1 then
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid),12)
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Fountain of Life\".")
doPlayerAddAchievement(cid, 6)
else
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid),12)
end
return true
end
Here, Fishy Fishy!
Lua:
<action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>
Lua:
local config = {
waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
rateSkill = getConfigValue("rateSkill"),
allowFromPz = false,
useWorms = true
}
--water elementals config
local find_anything = 30 -- chance to find anything.
local difficulty = 40 -- 1-100 range for difficulty. The higher it is, the less likely it is that player will get a good item
local items = {
[10499] = {2238, 2226, 2148, 2376, 2509, 2168, 7588, 7589, 2152, 2146, 2149, 2169, 7632, 7633, 9811, 9808, 8764, 10220}, -- normal water and massive. I noticed that they are the same one.(based on tibiawikia) QuaS
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21007) == 1000 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Here, Fishy Fishy!\"")
doPlayerAddAchievement(cid, 7)
end
if items[itemEx.itemid] ~= nil then
if math.random(100) <= find_anything then
doTransformItem(itemEx.uid, 2016)
doDecayItem(itemEx.uid)
doSendMagicEffect(toPosition, 1)
else
local geti = items[itemEx.itemid]
local newId
for i = 1, #items[itemEx.itemid] do
local x = math.random(100)
if (x < difficulty) then
newId = geti[i]
break
elseif (i >= #items[itemEx.itemid]) then
newId = geti[#items[itemEx.itemid]]
end
end
doTransformItem(itemEx.uid, 2016)
doPlayerAddItem(cid, newId, 1)
doSendMagicEffect(toPosition, 1)
end
end
if(not isInArray(config.waterIds, itemEx.itemid)) then
return false
end
if((config.allowFromPz or not getTileInfo(getCreaturePosition(cid)).protection) and itemEx.itemid ~= 493 and
math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) < getPlayerSkill(cid, SKILL_FISHING) and
(not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1)))) then
doPlayerAddItem(cid, ITEM_FISH, 1)
setPlayerStorageValue(cid, 21007, getCreatureStorage(cid, 21007) + 1)
doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
end
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
return true
end
Allowance Collector
Lua:
<action itemid="2114" event="script" value="other/piggybank.lua"/>
Lua:
local coin = {2148}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21018) == 50 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Allowance Collector\".")
doPlayerAddAchievement(cid, 18)
end
local count = 1
if item.itemid == 2114 then
local randomChance = math.random(1)
if randomChance == 1 then
count = math.random(1,2)
elseif randomChance == 2 then
count = 3
end
doPlayerAddItem(cid, coin[randomChance], count)
end
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doTransformItem(item.uid, 2115)
setPlayerStorageValue(cid, 21018, getCreatureStorage(cid, 21018) + 1)
return TRUE
end
Fireworks in the Sky
Lua:
<action itemid="6576" event="script" value="other/fireworksrocket.lua"/>
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21024) == 250 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Fireworks in the Sky\".")
doPlayerAddAchievement(cid, 24)
end
if fromPosition.x ~= CONTAINER_POSITION then
fireworksEffect = math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)
doSendMagicEffect(fromPosition, fireworksEffect)
else
doSendMagicEffect(fromPosition, CONST_ME_HITBYFIRE)
doSendMagicEffect(fromPosition, CONST_ME_EXPLOSIONAREA)
doCreatureSay(cid, "Ouch! Rather place it on the ground next time.", TALKTYPE_ORANGE_1)
doCreatureAddHealth(cid, -10)
end
doRemoveItem(cid, item.uid, 1)
setPlayerStorageValue(cid, 21024, getCreatureStorage(cid, 21024) + 1)
return TRUE
end
Jinx
Lua:
<action itemid="5957" event="script" value="loteryticket.lua"/>
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21026) == 500 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Jinx\".")
doPlayerAddAchievement(cid, 26)
end
local rand = math.random(0, 10)
local lotteryid = 5957
if item.itemid == lotteryid then
if rand < 1 then
doCreatureSay(cid, "You have a winning lottery ticket!", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, item.itemid + 1)
setPlayerStorageValue(cid, 21026, getCreatureStorage(cid, 21026) + 1)
doSendMagicEffect(fromPosition,12)
elseif rand > 2 then
doCreatureSay(cid, "Sorry, This is not a winning lottery ticket.", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, item.itemid - 1)
setPlayerStorageValue(cid, 21026, getCreatureStorage(cid, 21026) + 1)
end
end
return TRUE
end
Masquerader
Lua:
<action itemid="7737" script="other/costumebags.lua"/>
<action itemid="7738" script="other/costumebags.lua"/>
<action itemid="7739" script="other/costumebags.lua"/>
Lua:
local common = {"orc warrior", "pirate cutthroat", "dworc voodoomaster", "dwarf guard", "minotaur mage"}
local uncommon = {"quara hydromancer", "diabolical imp", "banshee", "frost giant", "lich"}
local deluxe = {"serpent spawn", "demon", "juggernaut", "behemoth", "rahemos"}
local duration = 18000 --the time the outfit will last
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21029) == 100 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Masquerader\".")
doPlayerAddAchievement(cid, 29)
end
if item.itemid == 7737 then
doSetMonsterOutfit(cid,common[math.random(#common)],duration*1000)
elseif item.itemid == 7738 then
doSetMonsterOutfit(cid,uncommon[math.random(#uncommon)],duration*1000)
elseif item.itemid == 7739 then
doSetMonsterOutfit(cid,deluxe[math.random(#deluxe)],duration*1000)
end
doRemoveItem(item.uid,1)
setPlayerStorageValue(cid, 21029, getCreatureStorage(cid, 21029) + 1)
doSendMagicEffect(fromPosition,CONST_ME_MAGIC_BLUE)
return TRUE
end
Polisher
Lua:
<action itemid="9930" event="script" value="tools/rust_remover.lua"/>
Lua:
local t = {
[9808] = {2464, 2465, 2483, 2463, 2476}, --common rusty armor
[9809] = {2464, 2465, 2483, 2463, 2476, 8891, 2487}, --semi-rare rusty armor
[9810] = {2464, 2465, 2483, 2463, 2476, 8891, 2487, 2466, 2472}, --rare rusty armor
[9811] = {2468, 2648, 2478, 2647, 2477}, --common rusty legs
[9812] = {2468, 2648, 2478, 2647, 2477, 2488}, --semi-rare rusty legs
[9813] = {2468, 2648, 2478, 2647, 2477, 2488, 2470}, --rare rusty legs
[9814] = {2511, 2510, 2530, 2509, 2513, 2515}, --common rusty shield
[9815] = {2511, 2510, 2530, 2509, 2513, 2515, 2516, 2519}, --semi-rare rusty shield
[9816] = {2511, 2510, 2530, 2509, 2513, 2515, 2516, 2519, 2520, 2514}, --rare rusty shield
[9817] = {2643, 3982, 5462, 7457}, --common rusty boots
[9818] = {2643, 3982, 5462, 7457, 2195}, --semi-rare rusty boots
[9819] = {2643, 3982, 5462, 7457, 2195, 2645}, --rare rusty boots
[9820] = {2458, 2460, 2480, 2481, 2457, 2491}, --common rusty helmet
[9821] = {2458, 2460, 2480, 2481, 2457, 2491, 2497}, --semi rare rusty helmet
[9822] = {2458, 2460, 2480, 2481, 2457, 2491, 2497, 2475, 2498} --rare rusty helmet
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = t[itemEx.itemid]
if k then
if math.random(10) <= 6 then
doRemoveItem(itemEx.uid)
doCreatureSay(cid, "You broke it.", TALKTYPE_ORANGE_1)
else
local v = k[math.random(#k)]
doTransformItem(itemEx.uid, v)
doCreatureSay(cid, 'You removed the rust, revealing a '.. getItemInfo(v).name .. '.', TALKTYPE_ORANGE_1)
local n = math.max(0, getCreatureStorage(cid, 21065)) + 1
if n <= 1000 then
doCreatureSetStorage(cid, 21065, n)
if n == 1000 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Congratulations! You earned the achievement "Polisher".')
doPlayerAddAchievement(cid, 65)
end
end
end
return doChangeTypeItem(item.uid, item.type - 1)
end
end
Annihilator
This is the lever script
Lua:
local from={x=33222, y=31693, z=14}
local to={x=33240, y=31701, z=14}
local summon={
{x=33224, y=31695, z=14},
{x=33226, y=31695, z=14},
{x=33228, y=31697, z=14},
{x=33229, y=31697, z=14},
{x=33227, y=31699, z=14},
{x=33225, y=31699, z=14}
}
local playerA={
{x=33224, y=31671, z=13},
{x=33223, y=31671, z=13},
{x=33222, y=31671, z=13},
{x=33221, y=31671, z=13}
}
local playerB={
{x=33227, y=31697, z=14},
{x=33226, y=31697, z=14},
{x=33225, y=31697, z=14},
{x=33224, y=31697, z=14}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = {}
if item.itemid == 1945 then
for i = 1, 4 do
t[i]=getTopCreature(playerA[i]).uid
if t[i] == 0 or not isPlayer(t[i]) then
return doPlayerSendCancel(cid, 'You need 4 players for this quest.')
elseif getPlayerLevel(t[i]) < 100 then
return doPlayerSendCancel(cid, 'All players need to have level 100 or higher.')
end
end
for i = 1, 6 do
doCreateMonster('Demon', summon[i])
end
for i=1, 4 do
doTeleportThing(t[i], playerB[i])
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Annihilator\".")
doPlayerAddAchievement(cid, 72)
doSendMagicEffect(playerA[i], CONST_ME_POFF)
doSendMagicEffect(playerB[i], CONST_ME_ENERGYAREA)
end
else
for x = from.x, to.x do
for y = from.y, to.y do
local v = getTopCreature({x=x, y=y, z=from.z}).uid
if v ~= 0 then
if isPlayer(v) then
return doPlayerSendCancel(cid, 'There is already a team in the quest room.')
elseif isMonster(v) then
table.insert(t, v)
end
end
end
end
for i = 1, #t do
doRemoveCreature(t[i])
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Ruthless
Lua:
function onStepIn(cid, item, pos)
if getPlayerStorageValue(cid,21067) == 6 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Ruthless\".")
doPlayerAddAchievement(cid, 67)
end
if item.uid == 10274 then
if getPlayerStorageValue(cid,10274) == -1 then
setPlayerStorageValue(cid,10274,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Verminor\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Veminor\'s spirit.')
end
elseif item.uid == 10275 then
if getPlayerStorageValue(cid,10275) == -1 then
setPlayerStorageValue(cid,10275,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Infernatil\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Infernatil\'s spirit.')
end
elseif item.uid == 10276 then
if getPlayerStorageValue(cid,10276) == -1 then
setPlayerStorageValue(cid,10276,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Tafariel\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Tafariel\'s spirit.')
end
elseif item.uid == 10277 then
if getPlayerStorageValue(cid,10277) == -1 then
setPlayerStorageValue(cid,10277,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Apocalypse\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Apocalypse\'s spirit.')
end
elseif item.uid == 10278 then
if getPlayerStorageValue(cid,10278) == -1 then
setPlayerStorageValue(cid,10278,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Pumin\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Pumin\'s spirit.')
end
elseif item.uid == 10279 then
if getPlayerStorageValue(cid,10279) == -1 then
setPlayerStorageValue(cid,10279,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Bazir\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Bazir\'s spirit.')
end
elseif item.uid == 10280 then
if getPlayerStorageValue(cid,10280) == -1 then
setPlayerStorageValue(cid,10280,1)
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Ashfalor\'s throne and absorbed some of his spirit.')
doPlayerSetStorageValue(cid, 21067, getPlayerStorageValue(cid, 21067) + 1)
else
doTeleportThing(cid,{x=540, y=1526, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
doCreatureSay(cid, "Begone!", TALKTYPE_ORANGE_1)
end
end
return 1
end
Greenhorn
You have to register in login.lua
Lua:
function onKill(cid, target, lastHit)
if lastHit and isMonster(target) and getCreatureName(target):lower() == 'orcus the cruel' and getPlayerStorageValue(cid,76225) == -1 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Greenhorn\".")
doPlayerAddAchievement(cid, 25)
doCreatureSetStorage(cid, 76225, 1)
end
return true
end
Scrapper
You have to register in login.lua
Lua:
function onKill(cid, target, lastHit)
if lastHit and isMonster(target) and getCreatureName(target):lower() == 'spirit of fire' and getPlayerStorageValue(cid,76225) == -1 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Scrapper\".")
doPlayerAddAchievement(cid, 52)
doCreatureSetStorage(cid, 76225, 1)
end
return true
end
Warlord
You have to register in login.lua
Lua:
function onKill(cid, target, lastHit)
if lastHit and isMonster(target) and getCreatureName(target):lower() == 'the obliverator' and getPlayerStorageValue(cid,76225) == -1 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Warlord\".")
doPlayerAddAchievement(cid, 78)
doCreatureSetStorage(cid, 76225, 1)
end
return true
end
Backpack Tourist
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function OldBackpack(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid, 3960) >= 1 and getPlayerStorageValue(cid, 21002) < 0 then
npcHandler:say("Thank you very much! This brings back good old memories! Please, as a reward, travel to Kazordoon and ask my old friend {Kroox} to provide you a special dwarven armor.", cid)
npcHandler:say("I will mail him about you immediately. Just tell him, his old buddy sam is sending you.", cid)
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Backpack Tourist\".")
doPlayerAddAchievement(cid, 2)
doPlayerRemoveItem(cid, 3960, 1)
else
npcHandler:say("Thank you for your concern, but I don't think this is my backpack, since you gave it to me already", cid)
end
end
node1 = keywordHandler:addKeyword({'old backpack'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "What? Did you find my old backpack, I've lost it in Uldrak's Rock..."})
node1:addChildKeyword({'yes'}, OldBackpack, {})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ahh, for one moment I tought you have find my old backpack...', reset = true})
npcHandler:addModule(FocusModule:new())
Interior Decorator
Lua:
<action fromid="3901" toid="3938" event="script" value="other/constructionkits.lua"/>
<action fromid="5086" toid="5088" event="script" value="other/constructionkits.lua"/>
<action fromid="6114" toid="6115" event="script" value="other/constructionkits.lua"/>
<action fromid="6372" toid="6373" event="script" value="other/constructionkits.lua"/>
<action fromid="7960" toid="7962" event="script" value="other/constructionkits.lua"/>
<action fromid="8692" toid="8693" event="script" value="other/constructionkits.lua"/>
Lua:
CONSTRUCTIONS = {
[3901] = 1650, [3902] = 1658, [3903] = 1666, [3904] = 1670, [3905] = 3813, [3906] = 3817, [3907] = 2093, [3908] = 2603, [3909] = 1614, [3910] = 1615,
[3911] = 1616, [3912] = 1619, [3913] = 3805, [3914] = 3807, [3915] = 1740, [3916] = 1774, [3917] = 2084, [3918] = 2095, [3919] = 3809, [3920] = 3832,
[3921] = 1714, [3922] = 2107, [3923] = 2104, [3924] = 7670, [3925] = 1740, [3926] = 2080, [3927] = 2098, [3928] = 1676, [3929] = 2101, [3930] = 1739,
[3931] = 2105, [3932] = 1724, [3933] = 1728, [3934] = 1732, [3935] = 1775, [3936] = 3812, [3937] = 2064, [3938] = 6371, [5086] = 1738, [5087] = 1741, [5088] = 1770,
[6114] = 6109, [6115] = 6111, [6372] = 3811, [6373] = 1736, [7503] = 1750, [7700] = 5928, [7960] = 3821, [7961] = 1877, [7962] = 2582, [8692] = 8688
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,21063) == 1000 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Interior Decorator\".")
doPlayerAddAchievement(cid, 63)
end
if fromPosition.x == CONTAINER_POSITION then
doPlayerSendCancel(cid, "Put the construction kit on the floor first.")
doSendMagicEffect(fromPosition, CONST_ME_BLOCKHIT)
elseif getTileHouseInfo(fromPosition) == FALSE then
doPlayerSendCancel(cid,"You may only construct this inside a house.")
doSendMagicEffect(fromPosition, CONST_ME_BLOCKHIT)
elseif CONSTRUCTIONS[item.itemid] ~= nil then
doTransformItem(item.uid, CONSTRUCTIONS[item.itemid])
doSendMagicEffect(fromPosition, CONST_ME_POFF)
setPlayerStorageValue(cid, 21063, getCreatureStorage(cid, 21063) + 1)
else
return FALSE
end
return TRUE
end
Rockstar
Lua:
<action itemid="2079" event="script" value="other/music.lua"/>
<action itemid="2070" event="script" value="other/music.lua"/>
<action itemid="2071" event="script" value="other/music.lua"/>
<action itemid="2073" event="script" value="other/music.lua"/>
<action itemid="2075" event="script" value="other/music.lua"/>
<action itemid="2076" event="script" value="other/music.lua"/>
<action itemid="2078" event="script" value="other/music.lua"/>
<action itemid="2367" event="script" value="other/music.lua"/>
<action itemid="2374" event="script" value="other/music.lua"/>
<action itemid="2095" event="script" value="other/music.lua"/>
<action itemid="5786" event="script" value="other/music.lua"/>
<action itemid="3952" event="script" value="other/music.lua"/>
<action itemid="2369" event="script" value="other/music.lua"/>
<action itemid="2072" event="script" value="other/music.lua"/>
<action itemid="2074" event="script" value="other/music.lua"/>
<action itemid="2077" event="script" value="other/music.lua"/>
<action fromid="2080" toid="2085" event="script" value="other/music.lua"/>
<action itemid="2332" event="script" value="other/music.lua"/>
<action itemid="2364" event="script" value="other/music.lua"/>
<action itemid="2368" event="script" value="other/music.lua"/>
Lua:
local getPos = pos
local HORN = 2079
local BIRD_CAGE = 2095
local WOODEN_WHISTLE = 5786
local DIDGERIDOO = 3952
local CORNUCOPIA = 2369
local GREEN_NOTES = {2070, 2071, 2073, 2075, 2076, 2078, 2367, 2374}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,20051) == 10000 then
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Rockstar\".")
doPlayerAddAchievement(cid, 51)
end
local random = math.random(1, 5)
if(item.itemid == BIRD_CAGE) then
doSendMagicEffect(fromPosition, CONST_ME_SOUND_YELLOW)
setPlayerStorageValue(cid, 20051, getCreatureStorage(cid, 20051) + 1)
elseif(item.itemid == DIDGERIDOO) then
if(random == 1) then
doSendMagicEffect(fromPosition, CONST_ME_SOUND_BLUE)
setPlayerStorageValue(cid, 20051, getCreatureStorage(cid, 20051) + 1)
return true
end
elseif(item.itemid == CORNUCOPIA) then
for i = 1, 11 do
doPlayerAddItem(cid, 2681)
setPlayerStorageValue(cid, 20051, getCreatureStorage(cid, 20051) + 1)
end
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, CONST_ME_SOUND_YELLOW)
setPlayerStorageValue(cid, 20051, getCreatureStorage(cid, 20051) + 1)
elseif(item.itemid == WOODEN_WHISTLE) then
if(random == 2) then
doSendMagicEffect(fromPosition, CONST_ME_SOUND_RED)
setPlayerStorageValue(cid, 20051, getCreatureStorage(cid, 20051) + 1)
doRemoveItem(item.uid, 1)
return true
end
local position = getPlayerPosition(cid)
position.x = position.x + 1
doSendMagicEffect(fromPosition, CONST_ME_SOUND_PURPLE)
else
local effect = CONST_ME_SOUND_BLUE
if(item.itemid == HORN) then
effect = CONST_ME_SOUND_PURPLE
elseif(isInArray(GREEN_NOTES, item.itemid)) then
effect = CONST_ME_SOUND_GREEN
end
doSendMagicEffect(fromPosition, effect)
setPlayerStorageValue(cid, 20051, getCreatureStorage(cid, 20051) + 1)
end
return true
end
Champion of Chazorai
Lua:
local t =
{
newPos = {x=33062, y=31029, z=7},
msg = "You have won! As new champion take the ancient armor as reward before you leave.",
area =
{
from = {x = 33053, y = 31024, z = 3},
to = {x = 33073, y = 31044, z = 3}
}
}
function getCreaturesInRange(type, fromPos, toPos, get, countSummon)
local types =
{
[1] = isPlayer,
[2] = isMonster,
[3] = isNpc,
[4] = isCreature
}
local tmp = {}
local t = types[type]
if not t then
return print("[Warning - Function::getCreaturesInRange] Unknow type " .. (type or "(nil value)"))
end
local thing
local pos
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
for z = fromPos.z, toPos.z do
pos = {x = x, y = y, z = z}
thing = getTopCreature(pos)
if t(thing.uid) then
table.insert(tmp, thing.uid)
if not countSummon and isSummon(thing.uid) then
for i = 1, #tmp do
if tmp[i] == thing.uid then
table.remove(tmp, i)
break
end
end
end
end
end
end
end
if(get == 1) then
return table.maxn(tmp)
elseif(get == 2) then
return tmp
else
print("[Warning - Function::getCreaturesInRange] Unknow type to get " .. (get or "(nil value)"))
end
end
function onKill(cid, target, damage, flags)
local name = getCreatureName(target):lower()
if name == 'tirecz' then
local players = getCreaturesInRange(1, t.area.from, t.area.to, 2)
for i = 1, #players do
doTeleportThing(players[i], t.newPos)
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Champion of Chazorai\".")
doPlayerAddAchievement(cid, 55)
doCreatureSay(players[i], t.msg, TALKTYPE_MONSTER, false, players[i], getThingPos(players[i]))
end
end
return true
end
Master of the Nexus
Lua:
function onUse(cid, item, frompos, item2, topos)
if isPlayer(cid) then
if getPlayerStorageValue(cid, 51692) == -1 then
doCreatureSay(cid, "".. getPlayerName(cid) .." destroyed the shadow nexus! In 20 seconds it will return to its original state.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 51692, 1)
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Master of the Nexus\".")
doPlayerAddAchievement(cid, 79)
else
end
end
end
High Inquisitor
Lua:
function onStepIn(cid, item, pos)
if isPlayer(cid) then
if getPlayerStorageValue(cid, 15691) == -1 then
doCreatureSay(cid, "You can choose exactly one of these chests. Choose wisely!", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 15691, 1)
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"High Inquisitor\".")
doPlayerAddAchievement(cid, 75)
else
end
end
end
Herbicide
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=32786, y=32412, z=8}
if getPlayerStorageValue(cid, 35700) >= 1 and getPlayerStorageValue(cid, 12900) == -1 then
doTeleportThing(cid, position)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Herbicide\".")
doPlayerAddAchievement(cid, 83)
else
return false
end
return true
end
Last edited: