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

05-26-2009, 09:24 PM
|
 |
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
I have a related quetsion.
Trev - would it be posible to write a perl script which woudl identify a player by some sort of parameter (level above X or class X etc) and somehow mark that player UNABLE to damage the mob?
BTW I was thinking, basing of Nagafen script can we try to emulate Trivial Encounter restriction like on FV server has or eq2:
Could we use perhaps use EVENT_AGGRO to determien player level and ONLY banish him if he actualy agroes the mob (gets on it hate list) rather than just enter its proximity?
|

05-26-2009, 10:24 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I have tried using EVENT_AGGRO for that, but it didn't work. I think it only runs the check when the mob changes aggro, not for anyone who gets on the hate list. Though, it would be nice to have that as an event type (among the list of quite a few other event types I wouldn't mind seeing).
The only way I can think of to keep particular levels or classes or whatever from damaging a mob would be to cast DA on them repeatedly for the length of the fight. That would be possible, but would require using the client search script code that a few scripts in the custom quest section use.
|

05-26-2009, 10:58 PM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 905
|
|
Thanks for the reply Trev. Think this would work?
Code:
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
quest::set_proximity($x - 100, $x + 100, $y - 100, $y + 100);
$enter_count = 0; #Keep track of how many characters enter the proximity.
}
sub EVENT_ENTER {
$enter_count = $enter_count + 1;
if ($enter_count >= 6) {
quest::echo("No more than 6 at a time may do this encounter.");
quest::movepc(152, 0, 0, -30);
}
sub EVENT_EXIT (
$enter_count = $enter_count - 1;
}
sub EVENT_COMBAT (
if ($combat_state == 0) {
$enter_count = 0;
}
}
|

05-26-2009, 11:10 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
That would work for most cases, but if I was writing something that I wanted to be positive people could not exploit in any way, it would probably take a considerable amount more coding to handle.
My main concern about that is 6 people could enter the proximity and then have 1 person engage and die, and then they would be able to bring 6 more players in. When making special encounters like that, you have to try to think of all possible angles people could use to exploit it. When you get a lot of people trying the same event over time, it is a sure thing that they will eventually find the loopholes if there are any. Trust me, I have had my fair share of them on Storm Haven lol.
|

05-26-2009, 11:21 PM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 905
|
|
Quote:
Originally Posted by trevius
That would work for most cases, but if I was writing something that I wanted to be positive people could not exploit in any way, it would probably take a considerable amount more coding to handle.
My main concern about that is 6 people could enter the proximity and then have 1 person engage and die, and then they would be able to bring 6 more players in. When making special encounters like that, you have to try to think of all possible angles people could use to exploit it. When you get a lot of people trying the same event over time, it is a sure thing that they will eventually find the loopholes if there are any. Trust me, I have had my fair share of them on Storm Haven lol.
|
Hmm, nothing that can be written without a ton of work?
Is there a way to lower the count when someone dies?
|

05-26-2009, 11:39 PM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 905
|
|
Just tested this script:
Code:
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
$enter_count = 0; #Keep track of how many characters enter the proximity.
}
sub EVENT_ENTER {
$enter_count = $enter_count + 1;
quest::shout("1");
if ($enter_count > 1) {
quest::shout("No more than 1 at a time may do this encounter.");
quest::movepc(241, 0, 0, 20);
}
sub EVENT_EXIT {
$enter_count = $enter_count - 1;
quest::shout("2");
}
}
The NPC shouts 1 when PC 1 enters. When PC 2 enters he shouts 1, then kicks PC 2 out, then shouts the "No more blahblah."
I also had my PC run up to him and just die. When I died he shouted 2, which means he drops count when a player dies.
|
 |
|
 |

05-27-2009, 01:33 AM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 905
|
|
Ok, now I'm trying to add a timed check because the script fires slowly. I expect if several people rush the proximity at the same time the boss would lose count. Using the following code he still keeps count and tells you he's over his limit, but the second MovePC won't fire. I'm guessing this is because he doesn't know which PC to move? Can I have him move a random PC if this is the case?
Code:
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
quest::settimer("count",5);
$enter_count = 0;
}
sub EVENT_ENTER {
$enter_count = $enter_count + 1;
quest::shout("1");
if ($enter_count > 1) {
quest::shout("No more than 1 at a time may do this encounter.");
quest::movepc(241, 0, 0, 20);
}
}
sub EVENT_TIMER {
if (($timer eq "count") && ($enter_count > 1)) {
quest::shout("No more than 1 at a time may do this encounter. Part 2");
quest::movepc(241, 0, 0, 20);
quest::stoptimer("count");
quest::settimer("count",5);
}
}
sub EVENT_EXIT {
$enter_count = $enter_count - 1;
quest::shout("2");
}
|
 |
|
 |
| 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:53 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |