EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Couple Bugs (https://www.eqemulator.org/forums/showthread.php?t=39149)

Bandor 12-28-2014 04:23 AM

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) {
                 
        }
    }
}


c0ncrete 12-28-2014 08:47 AM

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...

Bandor 12-28-2014 09:24 AM

ignore this post

Bandor 12-28-2014 09:45 AM

this one too

joligario 12-28-2014 10:30 AM

i got confused by script names. In your first script you need to close quotes.

Bandor 12-28-2014 10:51 AM

Quote:

Originally Posted by joligario (Post 236349)
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.

c0ncrete 12-28-2014 11:30 AM

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.

c0ncrete 12-28-2014 11:33 AM

i'd also recommend not deleting your posts with your questions, as others may run into similar issues in the future.

Bandor 12-28-2014 11:48 AM

Going to have to study that for awhile it has confused me big time lol.

Bandor 12-28-2014 03:06 PM

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");
        }
    }
}


c0ncrete 12-28-2014 03:18 PM

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 =>

c0ncrete 12-28-2014 03:22 PM

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

Bandor 12-28-2014 03:50 PM

Quote:

Originally Posted by c0ncrete (Post 236367)
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.

Kingly_Krab 12-28-2014 04:02 PM

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*
        }
}


Bandor 12-28-2014 04:18 PM

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~");
    }
}


Bandor 12-28-2014 04:20 PM

Quote:

Originally Posted by Kingly_Krab (Post 236370)
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*
        }
}


Worked ty sir,cant believe i deleted that lol


All times are GMT -4. The time now is 11:41 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.