tested for syntax, not functionality.
Code:
# array of playable class long names |
I am trying, i cannot get it to work in game. I cannot see where sub EVENT_SAY calls the class specification to know which list to call. I am looking for another $npcClass to do the trick but obviously theres something i do not understand. Currently the NPC does not respond to a hail.
Edit: I dunno what I did, but I just got a response from a hail. It is blank, it is not pulling my $greeting = $data->{$npcClass}->{greet}; but its a start. Going to work on it some more, will update. Edit2: I know what i did to fix, I took out the use 5.012 and use warnings ,I read you needed to use those for the given and when statements if thats the correct term. But noticed you took those out as well. |
everything that sets the class specific info for the current npc happens here (outside of any subroutine):
Code:
# get class-specific stuff for this npc nevermind. just saw your update. :) |
oops.
change this Code:
# if client gave the correct amount of money, cast the spell Code:
# if client gave the correct amount of money, cast the spell |
Ok change done. Still does not pull the greet. I am reading on arrays from the one of the books off the perl site you linked. lol light reading :)
Edit: But the npc is definately responding to the hail, he turns and does the Buffbot says. " |
probably something to do with that saylink quirkiness. looking at the source for that now.
|
Lol I changed
Code:
Necromancer => { Now the npc responds on hail and says Souls and Buffs(broke link) and on a 2nd line also still says the blank. Edit: Getting closer! :) |
Well when I had only changed the necro greet, it worked, then i changed the ench also and repopped the zone to spawn the buffbot as ench, zone.exe crashes. had to take the quest::say out.
|
that syntax is wrong, but it was good effort. this moves all of the calls to quest::saylink into EVENT_SAY per notes here:
http://www.eqemulator.net/wiki/wikka.php?wakka=SayLink Code:
# array of playable class long names |
Use of uninitliazed value $greeting in sprintf line 51
|
that'll happen when the NPC is of a class that isn't covered in the hash ref.
to cover those issues, change this Code:
my $greeting = $data->{$npcClass}->{greet}; Code:
my $greeting = $data->{$npcClass}->{greet} || "Got %s?"; |
I only test the script on enchanter and necro bc that is the only 2 with a spelllist. I added what you suggested and i still get the error.
|
copy and paste the whole script you have now.
|
Code:
# array of playable class long names |
hrm... did you #repop after #reloadpl?
|
All times are GMT -4. The time now is 12:03 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.