|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Quests::Q&A This is the quest support section |
 |
|
 |

04-20-2015, 10:08 PM
|
 |
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Not sure if you made changes yet, but for anyone following the thread:
Code:
sub EVENT_SPAWN {
quest::settimer("portershout",90);
}
sub EVENT_TIMER {
if($timer eq "portershout") {
quest::stoptimer("portershout");
quest::shout("Porting to all druid locations! Hail me near tunnel to Qeynos Hills!");
quest::settimer("portershout", int(rand(100))+30);
}
}
sub EVENT_SAY {
my %porthash = (
"surefall" => ["Surefall Glade", 3, -391, -209, 4.75, 0,],
"butcher" => ["Butcherblock Mountains",68, 1984, -2135, 0,],
"feerrott" => ["The Feerrott",47, -1885, 367, 13.57, 0,],
"northkarana" => ["North Karana",13, -1494, -2706, -7.5, 0,],
"lavastorm" => ["Lavastorm Mountains",27, 460, 460, -84.88, 0,],
"misty" => ["Misty Thicket",33, -1896, -490, 120.34, 0,],
"sro" => ["South Ro",35, 317, -2034, -22.64, 0,],
"steamfont" => ["Steamfont Mountains",56, 1668, -1779, -108.07, 0,],
"commons" => ["West Commonlands", 21, 1427, 479, -51, 0,],
"toxxulia" => ["Toxxulia Forest", 56, -357, 1099, -57.93, 0,],
);
if ($text=~/Hail/i) {
plugin::Whisper("Hail! Where would you like to go? ");
foreach my $key (keys %porthash) {
$client->Message(315, "[".quest::saylink($key, 1, $porthash{$key}[0])."]");
}
}
elsif (defined $porthash{$text}) {
plugin::Whisper("Off to ".$porthash{$text}[0]." you go!");
quest::doanim(43);
$client->SpellEffect(43,10);
castdelay(5);
quest::selfcast(34);
quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
}
}
sub castdelay{
$delayOver = (time + $_[0]);
while (time < $delayOver){}
1;
}
|
 |
|
 |
 |
|
 |

04-20-2015, 10:36 PM
|
 |
Sarnak
|
|
Join Date: Jan 2012
Location: Plano, TX
Posts: 70
|
|
I figured it out about 30 minutes ago, then saw your PM. I really appreciate the help from everyone on this. Hopefully I can pay it forward. Here's what I came up with:
Code:
sub EVENT_SAY{
my %porthash = (
# line# => [lname, zoneid, x, y, z, heading]
1 => ["Surefall Glade", 3, -391, -209, 4.75, 0 ],
2 => ["Butcherblock Mountains",68, 1984, -2135, 0 ],
3 => ["The Feerrott", 47, -1885, 367, 13.57, 0 ],
4 => ["North Karana", 13, -1494, -2706, -7.5, 0 ],
5 => ["Lavastorm Mountains", 27, 460, 460, -84.88, 0 ],
6 => ["Misty Thicket", 33, -1896, -490, 120.34, 0 ],
7 => ["South Ro", 35, 317, -2034, -22.64, 0 ],
8 => ["Steamfont Mountains", 56, 1668, -1779, -108.07, 0 ],
9 => ["West Commonlands", 21, 1427, 479, -51, 0 ],
10 => ["Toxxulia Forest", 56, -357, 1099, -57.93, 0 ],
);
if ($text=~/Hail/i) {
plugin::Whisper("Hail! Where would you like to go? ");
foreach my $key (keys %porthash) {
$client->Message(315, "[".quest::saylink($key, 1, $porthash{$key}->[0])."]");
}
}
elsif (defined $porthash{$text}) {
quest::selfcast(34);
quest::doanim(43);
$client->SpellEffect(43,10);
castdelay(9);
quest::movepc($porthash{$text}->[1],$porthash{$text}->[2],$porthash{$text}->[3],$porthash{$text}->[4],$porthash{$text}->[5]);
plugin::Whisper("Off to ".$porthash{$text}->[0]." you go!");
}
}
My hash has some extra info in it but that's b/c I played with it a few times. I also stretched the cast delay so the spell effect made more sense aesthetically (at least to me it did). The good news is, I actually understand how hashes work now  So it's not all Greek anymore.
The last thing I'd like to do with this is make the Superior Camo not be a self-cast (if its possible). Been looking at some other threads about group spells, but technically it's not a group spell. You just have to be in the group for it to land on you.
If there's a way to fake the NPC casting this on the player, I'm all ears:
Code:
quest::selfcast(34);
The below works, it just doesn't land on the player (presumably b/c the player is not grouped with the NPC).
Code:
$npc->CastSpell(34, $client);
I also messed around with CastGroupSpell but I'm reasonably sure that didn't work b/c this isn't a true group spell (like Group Wolf Form, Talisman of whatever, etc.).
|
 |
|
 |
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
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 11:54 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |