148 lines
4.7 KiB
Lua
148 lines
4.7 KiB
Lua
|
|
|
|
-- Declare buffs that will be unlocked with each of the minions death;
|
|
-- ####################################################################################### --
|
|
local buff_1_id = 41103058 -- Atk. Spd., Cast Spd. and Mov. Spd. increased (+40);
|
|
local buff_1_unlocked = false
|
|
|
|
local buff_2_id = 41103059 -- Acc., M.Acc. (+34) and Crit. Pow. (+20) increased;
|
|
local buff_2_unlocked = false
|
|
|
|
local buff_3_id = 41103060 -- P. Atk., M. Atk. (+1k) Crit. Rate (+14) increased;
|
|
local buff_3_unlocked = false
|
|
|
|
local buff_4_id = 41103061 -- Small amounts of common stats (P. Atk, M. Atk etc) increased;
|
|
local buff_4_unlocked = false
|
|
|
|
local buff_5_id = 41103062 -- Str., Vit., Agi., Dex., Int. and Wis. (+60) increased;
|
|
local buff_5_unlocked = false
|
|
-- ####################################################################################### --
|
|
|
|
function arlokkDead()
|
|
|
|
if get_global_variable("arlokkDead") == "1" then
|
|
return true
|
|
elseif get_global_variable("arlokkDead") == "0" then
|
|
return false
|
|
end
|
|
|
|
end
|
|
|
|
function ArlokkMinionDead()
|
|
|
|
-- Shout out the killers name;
|
|
local kn = gv("name")
|
|
|
|
-- Generate a random message;
|
|
local rm = math.random(1,10)
|
|
if rm == 1 then
|
|
announce("<b>Murderous minion:</b> I swear.. "..kn..", this is the last time you defeat me!")
|
|
elseif rm == 2 then
|
|
announce("<b>Murderous minion:</b> "..kn.." is this all you got? HA! I will be back!")
|
|
elseif rm == 3 then
|
|
announce("<b>Murderous minion:</b> You.. You devil! I have disappointed my master because of you "..kn.."!")
|
|
elseif rm == 4 then
|
|
announce("<b>Murderous minion:</b> "..kn.." you are stronger than I anticipated - you win.")
|
|
elseif rm == 5 then
|
|
announce("<b>Murderous minion:</b> You killed my physical body, "..kn..", but I will haunt you forever!")
|
|
elseif rm == 6 then
|
|
announce("<b>Murderous minion:</b> Master.. Master I apologize! "..kn.." has defeated me.")
|
|
elseif rm == 7 then
|
|
announce("<b>Murderous minion:</b> "..kn.." this is not the last of me!")
|
|
elseif rm == 8 then
|
|
announce("<b>Murderous minion:</b> You think you are strong, "..kn.."? My master will show you no mercy!")
|
|
elseif rm == 9 then
|
|
announce("<b>Murderous minion:</b> My master will avenge for me, "..kn.."!")
|
|
elseif rm == 10 then
|
|
announce(kn.." has defeated one of the Murderous minions!")
|
|
end
|
|
|
|
if arlokkDead == true then
|
|
cprint("You have killed a minion, but no more buffs could be unlocked because <b>Murderous Arlokk</b> has been killed.")
|
|
buff_1_unlocked = false
|
|
buff_2_unlocked = false
|
|
buff_3_unlocked = false
|
|
buff_4_unlocked = false
|
|
buff_5_unlocked = false
|
|
else
|
|
-- Pick a random buff to unlock;
|
|
local rb = math.random(1,5)
|
|
|
|
if rb == 1 and buff_1_unlocked == false then
|
|
buff_1_unlocked = true
|
|
cprint("You have unlocked the following buff: <b>Arlokks grand haste</b>!")
|
|
elseif rb == 2 and buff_2_unlocked == false then
|
|
buff_2_unlocked = true
|
|
cprint("You have unlocked the following buff: <b>Eagle eye Arlokk</b>!")
|
|
elseif rb == 3 and buff_3_unlocked == false then
|
|
buff_3_unlocked = true
|
|
cprint("You have unlocked the following buff: <b>Might of the Arlokk</b>!")
|
|
elseif rb == 4 and buff_4_unlocked == false then
|
|
buff_4_unlocked = true
|
|
cprint("You have unlocked the following buff: <b>Minion Madness</b>!")
|
|
elseif rb == 5 and buff_5_unlocked == false then
|
|
buff_5_unlocked = true
|
|
cprint("You have unlocked the following buff: <b>Bride of the Arlokk</b>!")
|
|
end
|
|
|
|
-- Give CM;
|
|
local cmPerMinion = math.random(5,20)
|
|
insert_item(2021300, cmPerMinion, 0, 1, 2)
|
|
cprint("You have received x"..tostring(cmPerMinion).." [Challenge Marks] for killing a <b>Murderous minion</b>.")
|
|
end
|
|
|
|
end
|
|
|
|
function ArlokkBossDead()
|
|
|
|
-- Fallback;
|
|
if arlokkDead == true then
|
|
return
|
|
else
|
|
-- Modify the global variable;
|
|
set_global_variable("arlokkDead", "1")
|
|
end
|
|
|
|
-- Enable the buffs;
|
|
if buff_1_unlocked == true then
|
|
cast_world_state(buff_1_id, 1, 2880000)
|
|
end
|
|
if buff_2_unlocked == true then
|
|
cast_world_state(buff_2_id, 1, 2880000)
|
|
end
|
|
if buff_3_unlocked == true then
|
|
cast_world_state(buff_3_id, 1, 2880000)
|
|
end
|
|
if buff_4_unlocked == true then
|
|
cast_world_state(buff_4_id, 1, 2880000)
|
|
end
|
|
if buff_5_unlocked == true then
|
|
cast_world_state(buff_5_id, 1, 2880000)
|
|
end
|
|
|
|
-- Relock buffs;
|
|
buff_1_unlocked = false
|
|
buff_2_unlocked = false
|
|
buff_3_unlocked = false
|
|
buff_4_unlocked = false
|
|
buff_5_unlocked = false
|
|
|
|
-- Give CM n stuff;
|
|
local cmPerArlokk = math.random(25,50)
|
|
insert_item(2021300, cmPerArlokk, 0, 1, 2)
|
|
|
|
-- Shout out the killers name;
|
|
local kn = gv("name")
|
|
notice("<b>"..kn.."</b> has finished off Murderous Arlokk and earned "..tostring(cmPerArlokk).." Challenge Marks!")
|
|
dlg_general("You have killed Murderous Arlokk and earned "..tostring(cmPerArlokk).." Challenge Marks!")
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|