|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Completed This is where Completed quests are. |
|
|
|
09-14-2014, 09:45 AM
|
Sarnak
|
|
Join Date: Jun 2013
Posts: 81
|
|
Aura of Crimson Mists (Demi-Plane of Blood)
So I was determined to get this to work and thought I'd share the code with you. Disclaimer: the script checks for possession of the actual 4 blocker items, not a global variable changed as a result of turning in those 4 items. The script could easily be altered to do so. Also, I know originally there was an accompanying Mire of Crimson Mists runspeed debuff but you can simply add that spell to the list cast (after a spellcompleted command) or make another npc/script for that debuff. All the item and spell numbers are correct.
In the second code block you'll find my original use of this code for tiered instances of citymist on my server. I adapted the script for use in dreadspire for your use (those attempting to recreate Live with fidelity).
Use and modify as you wish for functionality on your server.
crimson_mists.pl
Code:
#############
#crimson_mists.pl
#Crimson Mists debuff controller for Dreadspire
#Author: Salvanna (Asylum)
#Items Involved: #52522 Congealed Blood of Redfang #52523 Rune-Etched Stone #52524 Shrunken Head #52525 Sister's Handkerchief
#NPC Involved: crimson_mists race 240, type set to 11 (untargetable) after placement anywhere in zone
#Location: dreadspire (Demi-Plane of Blood)
#Currently checks for ownership of the 4 blocker items, but could be adjusted to check status of a qglobal after item turnins
#############
sub EVENT_SPAWN {
$npc->TempName("");
quest::settimer("debuff", 300);
}
sub EVENT_TIMER {
if ($timer eq "debuff") {
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist) {
#has all 4 blockers
if (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52523) && plugin::check_hasitem($ent, 52524) && plugin::check_hasitem($ent, 52525)) {
$ent->Message(315, "You are fully acclimated to the Demi-Plane of Blood. The environment no longer causes you any ill effects.");
}
#has any 3 of 4 blockers
elsif (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52523) && plugin::check_hasitem($ent, 52524)) {
my $eid = $ent->GetID(); $ent->CastSpell(7026,$eid);
}
elsif (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52523) && plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7026,$eid);
}
elsif (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52524) && plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7026,$eid);
}
elsif (plugin::check_hasitem($ent, 52523) && plugin::check_hasitem($ent, 52524) && plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7026,$eid);
}
#has any 2 of 4 blockers
elsif (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52523)) {
my $eid = $ent->GetID(); $ent->CastSpell(7025,$eid);
}
elsif (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52524)) {
my $eid = $ent->GetID(); $ent->CastSpell(7025,$eid);
}
elsif (plugin::check_hasitem($ent, 52522) && plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7025,$eid);
}
elsif (plugin::check_hasitem($ent, 52523) && plugin::check_hasitem($ent, 52524)) {
my $eid = $ent->GetID(); $ent->CastSpell(7025,$eid);
}
elsif (plugin::check_hasitem($ent, 52523) && plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7025,$eid);
}
elsif (plugin::check_hasitem($ent, 52524) && plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7025,$eid);
}
#has any 1 of 4 blockers
elsif (plugin::check_hasitem($ent, 52522)) {
my $eid = $ent->GetID(); $ent->CastSpell(7024,$eid);
}
elsif (plugin::check_hasitem($ent, 52523)) {
my $eid = $ent->GetID(); $ent->CastSpell(7024,$eid);
}
elsif (plugin::check_hasitem($ent, 52524)) {
my $eid = $ent->GetID(); $ent->CastSpell(7024,$eid);
}
elsif (plugin::check_hasitem($ent, 52525)) {
my $eid = $ent->GetID(); $ent->CastSpell(7024,$eid);
}
#has 0 of 4 blockers
else {
my $eid = $ent->GetID(); $ent->CastSpell(7023,$eid);
}
}
}
}
mists.pl
Code:
sub EVENT_SPAWN {
$npc->TempName("");
quest::settimer("debuff", 120);
}
sub EVENT_TIMER {
if ($timer eq "debuff") {
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist) {
if (plugin::check_hasitem($ent, 6486)) { #check ownership of item Ring_of_the_Mist (not equipment, just a token)
$ent->Message(315, "Your item protects you from the effects of the mist.");
}
else {
my $eid = $ent->GetID(); #Get this client's Entity_ID
$ent->CastSpell(7026,$eid); #casts Aura of Crimson Mists IV
my $h_ent_name = $ent->GetCleanName();
quest::ze(4, "The ancient mists pummel $h_ent_name with waves of agony.");
}
}
}
}
|
|
|
|
|
|
|
10-07-2014, 11:14 AM
|
Sarnak
|
|
Join Date: Jun 2013
Posts: 81
|
|
Found by digging deep in Frontier Mtns...
So the giants have uncovered a hidden chamber digging under their fort.
place in frontiermtns as chambersc_instance.pl
Code:
#NPCID 1575 chambersc_instance in frontiermtns v.0
sub EVENT_SPAWN {
$npc->TempName("");
$npc->NPCSpecialAttacks(ZHfDCAB, 0);
quest::enable_proximity_say();
quest::set_proximity($x-20,$x+20,$y-20,$y+20);
}
sub EVENT_ENTER {
if($ulevel >= 50){
$client->Message(315, "This passage leads to The Chamber of Pain, from which you return victorious or not at all. Do you really wish to [venture] there?!");
}
if($ulevel < 50){
$client->Message(315, "This passage leads to The Chamber of Pain, a place someone of your experience would not survive.");
}
quest::set_proximity($x-20,$x+20,$y-20,$y+20);
}
sub EVENT_EXIT {
quest::set_proximity($x-20,$x+20,$y-20,$y+20);
}
sub EVENT_PROXIMITY_SAY {
if($text =~/venture/i && $ulevel >= 50) {
my $InstId = quest::GetInstanceID("chambersc", 2);
$client->Message(315, "The Chamber of Pain");
if ($InstId > 0) {
quest::MovePCInstance(306, $InstId,0,0,0,0);
}
elsif ($ulevel > 0) {
my $i_id = quest::CreateInstance("chambersc", 2, 21600);
quest::AssignGroupToInstance($i_id);
quest::AssignToInstance($i_id);
quest::MovePCInstance(306, $i_id,0,0,0,0);
}
else {
}
}
}
place in chambersc folder as .pl file
Code:
#NPCID 1573 chambersc v.2
#set to type 11 (untargetable) after placing in zone
sub EVENT_SPAWN {
$npc->TempName("");
quest::settimer("walkdead", 246);
quest::settimer("arrow", 24);
}
sub EVENT_TIMER {
if ($timer eq "walkdead") {
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist) {
my $eid = $ent->GetID(); #Get this client's Entity_ID
$ent->CastSpell(5051,$eid); #casts Aura of Destruction (3 min duration)
}
}
if ($timer eq "arrow") {
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist) {
if (($ent->GetY) > 105) {
if ($ent->FindBuff(5051)) { #check for Aura of Destruction debuff, grants immunity to effect
$ent->Message(315, "A dark arrow narrowly misses you.");
}
else {
my $eid = $ent->GetID(); #Get this client's Entity_ID
my $arrow = quest::ChooseRandom(4849, 4850, 4851, 9296, 9297, 9298, 17611);
$ent->CastSpell($arrow,$eid); #casts Heartstopper, Skullpierce, Kneeshatter, Longsight Stinging Shot, Longsight Blinding Shot, Longsight Leg Shot, or Blood Shot
my $h_ent_name = $ent->GetCleanName();
quest::ze(4, "$h_ent_name is pierced by a dark arrow.");
}
}
}
}
}
Haroth,_Kyv_Headhunter.pl
Code:
#NPCID 1576 Haroth,_Kyv_Headhunter chambers v.2
sub EVENT_SPAWN {
$npc->NPCSpecialAttacks(S, 0);
quest::setnexthpevent(50);
}
sub EVENT_HP {
if($hpevent == 50) { #begins using spell ability at 50% HP
quest::settimer("spell", quest::ChooseRandom(18,30)); #random timer for spell
}
}
sub EVENT_TIMER {
if($timer eq "spell") {
$npc->CastSpell(7132,$client); #Casts Bleak Promise, decrease hitpoints by 1125 (L1) to 1225 (L100) PBAE 30 range
quest::settimer("spell", quest::ChooseRandom(18,30)); #random timer for spell
}
}
sub EVENT_DEATH_COMPLETE {
quest::depopall(1574);
quest::depopall(1573);
quest::spawn2(1577,0,0,0,0,0,0); #spawns a_sealed_chest
}
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:14 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|