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

10-24-2010, 08:14 AM
|
 |
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
Level check
I'm just learning how to work with perl. I setup an npc in the PoK, that
ports you back to tutorialb, but this seems to overide the level rule on
the zone. (It sends an 85 toon there)
I was trying to find a way for the script to check for level (15 and higher)
and just give a message instead of porting the toon, if too high.
#zone: poknowledge
sub EVENT_SAY {
if ($text=~/hail/i || $text=~/leave/i) {
quest::say("Ok $name back to the Tutorial you go!");
quest::movepc(189,-105,-127,16);
}
}
|

10-24-2010, 09:43 AM
|
Sarnak
|
|
Join Date: Jan 2006
Posts: 31
|
|
Something like this should work
Code:
sub EVENT_SAY {
if ($text=~/hail/i || $text=~/leave/i) {
if($level < 15) {
quest::say("Ok $name back to the Tutorial you go!");
quest::movepc(189,-105,-127,16);
}
else {
quest::say("Sorry $name but you are too experienced to venture here.");
}
}
}
|

10-24-2010, 08:23 PM
|
 |
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
Thank you covou, that kind of works, I got a level 16 toon to try and get a port to the tutorial. The toon got the "Entering Tutorial" screen, but it put him in the Nexus with a "You are too high for this zone" message. He didn't get the message from the script.
|

10-24-2010, 10:11 PM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
Quote:
Originally Posted by Huppy
Thank you covou, that kind of works, I got a level 16 toon to try and get a port to the tutorial. The toon got the "Entering Tutorial" screen, but it put him in the Nexus with a "You are too high for this zone" message. He didn't get the message from the script.
|
There's a rule_value, something like Character::MaxLevelForTutorial. change that to a different number than 10.
should work fine after a reboot
|

10-24-2010, 10:41 PM
|
 |
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
Oh yes, I have that rule set for 14 (like the "live" servers). I was just trying to get this npc to not port at all, if the level was over 14.
|

10-25-2010, 01:59 AM
|
 |
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
This one works perfect now.
I added a $client->Message line, now any level above 14 gets nothing, except that message.
sub EVENT_SAY {
if ($text=~/hail/i || $text=~/leave/i) {
if ($ulevel < 15) {
quest::say("Ok $name back to the Tutorial you go!");
quest::movepc(189,-105,-127,16);
}
if($ulevel > 14)
{
$client->Message(14,"You are too experienced to go back to the Tutorial $name");
}
}
}
|

10-25-2010, 03:02 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
The script covou posted and yours appear to be functionally equivalent. The else in the first script is the same as the extra if you have in yours. Is it possible you didn't reload the quests or restart the server when you tried the first script?
|

10-25-2010, 05:43 AM
|
 |
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
What are you asking about lerx ? The first script I posted, ported anyone of any level to Tutorial. No matter what was set in "rules"
covou gave an added idea of the "else" to help with a level check. That worked in such a way, that the npc still ported to tutorial, but got booted to the Nexus. So I found something else to change it so the npc would not port at all if the player was over level 14, which works good now. It just gives that message. I was testing the functionality of the quest script many times as I went along and modified, redone, reloaded, etc.
|

10-25-2010, 06:02 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
I was saying that they did the same thing, but there is a very subtle difference. Your second script uses $ulevel instead of $level.
The only reason I commented is that they looked the same to me, and IMO the else is cleaner than a redundant if check.
|

10-25-2010, 06:42 AM
|
Sarnak
|
|
Join Date: Jan 2006
Posts: 31
|
|
$ulevel is right... i was @ work talking to an extremely irate cusomter while typing the above on my iphone... =/... sorry about that
|
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 10:45 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |