1st quest file and I'm having troubles. Please help.
Hi,
I just made my first PERL script for a quest NPC. It is a modified soulbinder script that includes the options to heal HPs, cure poison and disease and finally to bind your soul. I saved the *.pl file into my eqemu\quests\zonesn\ folder on my EQEmu server. I created a NPC and used the #npcspawn create and add. The NPC respawns properly and I used #npcstats to get the NPCs ID. I got the id, so in the c:\eqemu\quests\zonesn\121095.pl 121095 is the NPCID number given to me by #npcstats. When I restarted the server and logged in the NPC was there but the script isn't running. When I hail the NPC he just faces me and does nothing. I'll list my code below. I would love to get this fixed so I can move forward making it more complex. Also, I'm using the latest version of the CVS 6.0 release of EQEmu with Perl enabled. I also have Perl installed on the EQEmu server and it appears to be running fine. I don't get any error messages when starting up the emulator. Code:
#Quest made by John Von Draugr 10-25-04 |
I had a thought and just wanted to post it in case it makes a difference. After installing Perl on my XP machine (Server for EQEmu) I don't have to run any files from within the PERL directories right?
|
You had about 5 or 7 closing curly brackets too many, and npcs generally cannot cast beneficial spells on players.
Therefore, use quest::selfcast(spellid); Code:
#Quest made by John Von Draugr 10-25-04 |
Hi,
I cut & Pasted the changes you made to the code, but I'm still having the same issue. I checked my zone.exe and it says Loading embedded perl Loading perlemb plugins So, the zones are loading with PERL enabled, but the NPC is still not responding to my hails or speech, except for turning to face me when I hail them. Is there another command in game that I have to give a NPC that will have a Perl Quest script attached? Sort of initializing the NPC to use the perl script? From what I read, you just make an NPC then attach a .pl file in hte zonesn folder with the pl file having the filename of the NPCs ID. |
This is not the actual path you are using correct? :
Code:
c:\eqemu\quests\zonesn\ Example.. quest is for an npc in Nexus, thus your path for ALL Nexus .pls is: Code:
c:\eqemu\quests\nexus\ The_Horrid |
Yes, I have the .pl file in c:\eqemu\quests\qeynos2 for North Qeynos. I did have it in qeynos as I got the two zone names mixed up. I corrected the folder name to qeynos2 and restarted the emulator. Still same thing as above :( Also, when I add new quests or modify current ones, do I have to reboot the server all the time as I have been doing or will a #repop command make the NPCs respawn and then the quests would work? I've tried both but no difference. Just wanted to ask that to see if the process of having to restart world and zone.exe everytime isn't necessary.
Thanks John |
#reloadqst will refresh the quests.
|
Thanks Muuss. I tried that just in case it made a difference. Sadly, the command worked, but the quest still doesn't. :(
|
Try this quest, when you'll make it working, start adding slowly some new stuff. When it stops to work, it means you made a mistake, search and correct it, then start again, that's the best way to learn )
Code:
sub EVENT_SAY { |
Ok, I did what you suggested and it was a good suggestion. I got the following to work so far.
Code:
sub EVENT_SAY Code:
#Binding to Point |
I'm actually getting it to work now. What I did was take the code you gave me and just cut and paste the text and cast info into it. I checked over and over, but my pl seems to be the exact same format as the one that I used to start from yours. Not sure why it wasn't working, but the script is starting to work great now. Thanks to all of you who helped me along the way with this issue. :) I'm sure I'll be posting more here as I have some heavy scripts to build next. Ex: A healer that when a player goes up to he is offered If he would like:
1. Minor Healing (1gp) (NOTE price is not final, just for example) 2. Greater Healing (1pp) 3. Complete Healing. (This is where it gets hard.) (I want it that the script checks the level of the player asking for Complete Healing then muliplies their level against the base fee. So, a Level 24 warrior, wizard, bard, etc... would ask for Complete Healing and the script would say "Complete healing is 5gp base price. 5gp*24lv= 120gp. The NPC would then tell the player that it will require 120gp to completely heal him. The player then has to give the NPC 120gp to get Completely healed. I'm not sure how this part works. Do you just select 120gp and give it to the NPC? Should the NPC just say it will cost 120gp, do you wish to pay? And if the player says "YES" then 120gp is removed from their backpack and they are healed? There is a lot that is going to have to go into this part. I'm sure I'll be posting questions along the way. :) Thanks again to all who have helped me. :) John |
All times are GMT -4. The time now is 11:34 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.