|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
12-28-2014, 04:23 AM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
Couple Bugs
Having a couple bugs with 3 quests im working on looking for a little input ive been working on them for a couple hours now and have got much closer to them working but still having trouble lol.
First - I have a basic script for a popup window for basic server info,but when you click Ok,after hailing the npc, nothing else happens. Code is
Code:
#Quest file for Mesa - Server Guide
sub EVENT_SAY{
if($text=~/hail/i){
plugin::DiaWind("Hello {gold}$name~! Would you like basic {lb}server information~? [information> ");
}
}
if($text=~/information/i){
plugin::DiaWind("Make sure to check your {lb}AA's~ as some classes get freebies aswell as custom aa's. Exp is fairly fast but group exp is double!
Make sure your server {r}files~ [server files> are up to date. The Server {r}website~ [website> contains more information. Speak to {y}Deevan~ to proceed!");
}
if($text=~/server files/i){
plugin::DiaWind(""Speak with {lb}Mahk~, He will guide you further.);
}
if($text=~/website/i){
plugin::DiaWind("Our forums can be located at {g}eqanw.forumotion.com~);
}
}
Second- Quest texts work fin but npc is not giving reward upon turn in.
Code:
#Quest file for Mesa - Apprentice Loso
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("Hail $class. Do you seek to earn a [bridle]");
}
if($text=~/bridle/i) {
quest::say("I suspect, as most of us these days,that you are a bit low on platinum? Well no need to worry! Simply handle a...well,[situation] for me");
}
if($text=~/situation/i) {
quest::say("I have a high intolerance for the Tuffien these days. If you would be willing to bring me back one of their hides I will be willing to [reward] you");
}
if($text=~/reward/i) {
quest::say("Bring me back any color hide and I will give you the corresponding bridle");
}
}
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 1 = 1261){ # Black Tuffien Hide
quest::summonitem(21810); # Black Rope Bridle*
}
elsif (plugin::check_handin(\%itemcount, 1267 = 1) { # White Tuffien Hide
quest::summonitem(21805); # White Rope Bridle*
}
elsif (plugin::check_handin(\%itemcount, 1266 = 1) { # Tan Tuffien Hide
quest::summonitem(21800); # Tan Rope Bridle*
}
elsif (plugin::check_handin(\%itemcount, 1264 = 1) { # Brown Tuffien Hide
quest::summonitem(21815); # Brown Rope Bridle*
}
}
And last. I want this guy to send a direct download link of my server files. have the first pop up window appearing but no clue as to how to direct it to a webpage.
Code:
#Quest file for Mesa - Mahk
sub EVENT_SAY {
if ($text=~/hail/i) {
plugin::DiaWind("Do you wish to update your server [files] ?");
if ($text=~/files/i) {
}
}
}
|
|
|
|
12-28-2014, 08:47 AM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
on your second one issue, you have two instances of the EVENT_SAY subroutine. you can only have one.
example:
Code:
#Quest file for Mesa - Deevan
sub EVENT_SAY {
if ($text=~/hail/i) {
if ($ulevel > 34) {
plugin::DiaWind("blah");
quest::summonitem(); # Note to Vahl
} else {
plugin::DiaWind("yack");
quest::summonitem(105611); # Charm
}
}
}
NOTE: now that the original post has been edited, my response no longer really applies...
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|
12-28-2014, 09:24 AM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
ignore this post
|
12-28-2014, 09:45 AM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
this one too
|
12-28-2014, 10:30 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
i got confused by script names. In your first script you need to close quotes.
|
12-28-2014, 10:51 AM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
Quote:
Originally Posted by joligario
i got confused by script names. In your first script you need to close quotes.
|
What do you mean exactly?
Going to edit my posts so that all current problems are on first post to make it easier to read.
|
12-28-2014, 11:30 AM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
run scripts this way to check for syntax shenanigans
Code:
perl -cW path/to/script.pl
additionally...
here is the official 5.12.4 introduction.
here is a list of official, categorized 5.12.4 tutorials.
here is a list of online resources for the beginner.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|
12-28-2014, 11:33 AM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
i'd also recommend not deleting your posts with your questions, as others may run into similar issues in the future.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|
12-28-2014, 11:48 AM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
Going to have to study that for awhile it has confused me big time lol.
|
12-28-2014, 03:06 PM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
Still having trouble with these 3. Nothing I seem to be doing is working. Though I have made a pretty ugly work-around for #3 using just the web address in the window,still trying to find a way to make it a hyperlink or something if possible. And #2 still wont give reward for turn in,#1 still stuck on first window lol.
Code for Pop-up with web address if anyone wants to use or modify
Code:
sub EVENT_SAY {
if ($text=~/hail/i) {
plugin::DiaWind("Server files available http://google.com");
}
}
}
|
12-28-2014, 03:18 PM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
after a quick glance at your (current) second issue, i see you're using incorrect syntax in your calls to plugin::check_handin().
replace all instances of = with =>
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|
12-28-2014, 03:22 PM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
and as for your first issue, the problem is with where your quotation marks are located in your calls to plugin::DiaWind().
this would have likely been caught by testing the script as was previously suggested
Code:
perl -cW path/to/script.pl
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|
12-28-2014, 03:50 PM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
Quote:
Originally Posted by c0ncrete
after a quick glance at your (current) second issue, i see you're using incorrect syntax in your calls to plugin::check_handin().
replace all instances of = with =>
|
Code:
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 1261 => 1){ # Black Tuffien Hide
quest::summonitem(21810); # Black Rope Bridle*
}
elsif (plugin::check_handin(\%itemcount, 1267 => 1) { # White Tuffien Hide
quest::summonitem(21805); # White Rope Bridle*
}
elsif (plugin::check_handin(\%itemcount, 1266 => 1) { # Tan Tuffien Hide
quest::summonitem(21800); # Tan Rope Bridle*
}
elsif (plugin::check_handin(\%itemcount, 1264 => 1) { # Brown Tuffien Hide
quest::summonitem(21815); # Brown Rope Bridle*
}
}
Still not wanting to work.
|
12-28-2014, 04:02 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Missing ) on the end.
Code:
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 1261 => 1)) { # Black Tuffien Hide
quest::summonitem(21810); # Black Rope Bridle*
} elsif (plugin::check_handin(\%itemcount, 1267 => 1)) { # White Tuffien Hide
quest::summonitem(21805); # White Rope Bridle*
} elsif (plugin::check_handin(\%itemcount, 1266 => 1)) { # Tan Tuffien Hide
quest::summonitem(21800); # Tan Rope Bridle*
} elsif (plugin::check_handin(\%itemcount, 1264 => 1)) { # Brown Tuffien Hide
quest::summonitem(21815); # Brown Rope Bridle*
}
}
|
12-28-2014, 04:18 PM
|
Hill Giant
|
|
Join Date: May 2014
Posts: 209
|
|
Got first problem taken care of,ty for the help code
Code:
#Quest file for Mesa - Server Guide
sub EVENT_SAY{
if($text=~/hail/i){
plugin::DiaWind("Hello {gold}$name~! Would you like some basic {lb}information~ [server information>");
}
if($text=~/information/i){
plugin::DiaWind("Make sure to check your {lb}AA's~ as some classes get freebies aswell as custom aa's. Exp is fairly fast but group exp is double!
Make sure your server {r}files~ are up to date by speaking with {g}Mahk~. The Server {lb}website~ contains more information. Speak to {y}Deevan~ to proceed! [website>");
}
if($text=~/website/i){
plugin::DiaWind("Our forums can be located at {g}eqanw.forumotion.com~");
}
}
|
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 02:10 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|