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

11-01-2008, 04:55 PM
|
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
Yeah, and? I'm quite aware of the newbie quests, fact is there are a lot of popups that don't work that way. I'll probably add a player quest event for it tonight to be coupled with the npc quest so people can choose which they'd like.
|

11-01-2008, 05:10 PM
|
|
Hill Giant
|
|
Join Date: Sep 2007
Posts: 117
|
|
Sorry if I came across rude in my last post. I was not trying to be offensive was just pointing out a few NPCs could use the popups the way Derision implemented it. However, I agree it will mainly be used in the player.pl. Thank you for taking your time to add the option to use it in both.
|

01-31-2010, 03:08 AM
|
|
Banned
|
|
Join Date: Sep 2006
Posts: 841
|
|
Trying to get this stuff to work with Sub Event Enter.. And can not..
Here is what i have based off what you posted but it simply will not work...
What am I doing wrong??
Code:
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
my $range = 12;
quest::set_proximity($x - $range, $x + $range, $y - $range, $y + $range);
}
sub EVENT_POPUPRESPONSE {
quest::say("Popup response");
if($popupid eq "10") {
quest::movepc(176,1900.0,-474.8,24.75);
}
}
sub EVENT_ENTER {
quest::popup("Test Popup", "Test popup with ID 10", 10);
}
}
|

01-31-2010, 04:22 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Quote:
Originally Posted by KingMort
Code:
sub EVENT_ENTER {
quest::popup("Test Popup", "Test popup with ID 10", 10);
}
}
|
Extra closing bracket marked in red.
|

01-31-2010, 03:19 PM
|
|
Banned
|
|
Join Date: Sep 2006
Posts: 841
|
|
Pop up works fine, it's just not porting me after I hit OK...
|

01-31-2010, 03:46 PM
|
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
It doesn't work because when you click OK to the popup, you have no NPC targeted, and so the EVENT_POPUPRESPONSE doesn't get called.
This was what KLS was getting at further back in the thread, about this being better handled in the player.pl.
I could alter the behaviour, but it would break any existing scripts using this event, or maybe even have both the npc and player.pl receive the event ... let me test it.
|

01-31-2010, 04:12 PM
|
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
OK, using Rev1202 code, do it like this. In your NPC quest:
Code:
sub EVENT_SPAWN
{
my $x = $npc->GetX();
my $y = $npc->GetY();
my $range = 12;
quest::set_proximity($x - $range, $x + $range, $y - $range, $y + $range);
}
sub EVENT_ENTER {
quest::popup("Test Popup", "Test popup with ID 10", 10);
}
And in player.pl, add
Code:
sub EVENT_POPUPRESPONSE
{
if($popupid eq "10")
{
quest::movepc(176,1900.0,-474.8,24.75);
}
}
|
| 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 08:45 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |