View Full Version : How can I create a greeter NPC or Buff NPC?
dew1960
08-09-2012, 10:00 PM
Hello There folks! I created my own server, "Adventure Unlimited".
I compiled it to allow for #bot commands and I edited the Veteran AA "Steadfast Servant" to be able to re-use every 25 minutes and he lasts for 30 minutes so that is my version of an all around merc if you prefer to use a merc instead of OR with your bots. I was able to figure out how to make some custom merchants so I made some to sell each type of defiant armor and I created a merchant to be a greeter and to sell epic 1.0 items. Veteran AA's are free at lvl 1 like any PEQ type server and the server supports clients up to Underfoot. I will also allow players to use Macroquest if they choose to.
My problem is I want to make that greeter that I created in the guild lobby to be able to offer new players this information when they hail him. How do I add dialogue to the NPC I made?
I was thinking of adding some buff NPC's to the lobby also but I am thinking with the bots and the Steadfast Servant Merc, they should get all the buffs they would need anyway unless they choose to totally solo without bots or npc's and then that is their choice.
I would like to be able to add some custom quests and maybe trade skills in the future but my knowledge of how to accomplish this is limited at the moment.
Also, I don't know how to do it or if it is going to be possible but I really liked the #seller (bazaar seller bots for players) that I saw on the EQ Titan server, but it is custom code and I doubt they will let me have it. I would like to know if anyone has a solution like that AND would also be willing share the code with me, to allow for offline player bazaar sellers.
I used the PEQ Database Editor to do what I have done so far. Is there a tool some where I can get to help make custom quests and such?
As always I appreciate any support you folks can offer me. If not for this forum I would never have been able to get my server up and running at all!
Sincerely,
Daniel Walker
Adventure Unlimited Server Admin and GM
FievelMousey
08-09-2012, 10:08 PM
If i read right dont you say can use Underfoot if not oh well server useless to me try i wont ever go any lower on clients.
Thanks
dew1960
08-09-2012, 10:21 PM
Yes, the underfoot client is supported, also Titanium, SoD, and SoF
I use the underfoot client myself. You may have tried to connect when I restarted the server, sorry about that. :)
Born2rot
08-09-2012, 10:50 PM
If you search there are many buff bot examples out there. If you can't find one PM me and I'll share mine. Can't remember who to credit for it. As for a greeter... Here's the script for my server info bot. It uses Akka's pop up window plugin. I'm sure I could have done a lot better, but it'll give ya an idea of what you can do. Any quests just ask.
sub EVENT_SAY {
my $NPCName = $npc->GetCleanName();
my $info = quest::saylink("Server Info");
my $rules = quest::saylink("Server Rules");
my $will = quest::saylink("will be taken");
my $recent = quest::saylink("Recent Updates");
my $upcoming = quest::saylink("Planned Updates");
if ($text=~/hail/i){
$client->Message(315,"$NPCName whispers to you, 'Hi there $name. What would you like to know? $info or $rules? Perhaps you'd like to hear about $recent or $upcoming?'");
}
if ($text=~/server info/i) {
my $Link = plugin::PWHyperLink("http://www.fleshripper.forumotion.com", "Fleshripper Forums!");
my $spell = plugin::PWHyperLink("http://www.mediafire.com/?7632vqiocu7lvco", "Spell File");
my $TextToCenter = plugin::PWAutoCenter("Main things going on with the server:");
my $TextToCenter1 = plugin::PWAutoCenter("Server up to GoD max lvl 65");
my $TextToCenter2 = plugin::PWAutoCenter("1/2 hp on mobs.");
my $TextToCenter3 = plugin::PWAutoCenter("Bots. You can have 2 out with 1 backup.");
my $TextToCenter4 = plugin::PWAutoCenter("No corpse runs! Items stay on you.");
my $TextToCenter5 = plugin::PWAutoCenter("Rested regen super fast timer and regen.");
my $TextToCenter6 = plugin::PWAutoCenter("Buff timer stopped in PoK.");
my $TextToCenter7 = plugin::PWAutoCenter("Manastone, Guise & Circlet of Shadow, in.");
my $TextToCenter8 = plugin::PWAutoCenter("Scribe spells, learn disc and skills on level");
my $TextToCenter9 = plugin::PWAutoCenter("Guild Lobby & Hall open with Guild Bank");
my $TextToCenter10 = plugin::PWAutoCenter("Please visit and register on forums");
my $TextToCenter11 = plugin::PWAutoCenter(">>>> $Link <<<<");
my $TextToCenter12 = plugin::PWAutoCenter("Fabled are in. Look out.");
my $TextToCenter13 = plugin::PWAutoCenter("For Spell File:");
my $TextToCenter14 = plugin::PWAutoCenter(">>>> $spell <<<<");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Welcome to Fleshripper!",
"<br>
$Yel $TextToCenter9 </c> <br>
$Yel $TextToCenter </c> <br>
$TextToCenter1 <br>
$TextToCenter2 <br>
$TextToCenter3 <br>
$TextToCenter4 <br>
$TextToCenter5 <br>
$TextToCenter6 <br>
$TextToCenter7 <br>
$TextToCenter8 <br>
$TextToCenter12 <br>
$Red $TextToCenter10 </c><br>
$Red $TextToCenter13 </c><br>
$TextToCenter14
<br>
$TextToCenter11
");
}
if ($text=~/server rules/i) {
my $Link = plugin::PWHyperLink("http://www.fleshripper.forumotion.com", "Fleshripper Forums!");
my $TextToCenter = plugin::PWAutoCenter("MQ use is prohibited.");
my $TextToCenter2 = plugin::PWAutoCenter("Bot exploiting is prohibited.");
my $TextToCenter3 = plugin::PWAutoCenter("You can box if you want 2 - 3.");
my $TextToCenter4 = plugin::PWAutoCenter("Be respectful of others.");
my $TextToCenter5 = plugin::PWAutoCenter("-No one likes douches-");
my $TextToCenter6 = plugin::PWAutoCenter("MQ and Bot exploiting will get");
my $TextToCenter7 = plugin::PWAutoCenter("you banned.");
my $TextToCenter8 = plugin::PWAutoCenter("Any questions visit the forums");
my $TextToCenter9 = plugin::PWAutoCenter("Or ask Goregut.");
my $TextToCenter10 = plugin::PWAutoCenter("Please visit and register on forums");
my $TextToCenter11 = plugin::PWAutoCenter(">>>> $Link <<<<");
my $TextToCenter13 = plugin::PWAutoCenter("for up to date info!.");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Fleshripper Rules:",
"<br>
$Yel $TextToCenter </c> <br>
$Yel $TextToCenter2 </c> <br>
$Yel $TextToCenter3 </c> <br>
$Yel $TextToCenter4 </c> <br>
$Yel $TextToCenter5 </c> <br>
$Yel $TextToCenter6 </c> <br>
$Yel $TextToCenter7 </c> <br>
$Yel $TextToCenter8 </c> <br>
$Yel $TextToCenter9 </c> <br>
$Red $TextToCenter10 </c> <br>
$Red $TextToCenter13 </c> <br>
<br>
$TextToCenter11
");
}
if ($text=~/recent updates/i) {
my $Link = plugin::PWHyperLink("http://www.fleshripper.forumotion.com", "Fleshripper Forums!");
my $TextToCenter = plugin::PWAutoCenter("Server up to GoD now.");
my $TextToCenter2 = plugin::PWAutoCenter("PoP flags should be removed fully");
my $TextToCenter3 = plugin::PWAutoCenter("Compleely redid alt currency system!");
my $TextToCenter4 = plugin::PWAutoCenter("NPCs will now take dust and frags from inventory!");
my $TextToCenter5 = plugin::PWAutoCenter("Thanks Croaker for the awesome solution!");
my $TextToCenter6 = plugin::PWAutoCenter("Added a new random lotto system and bot.");
my $TextToCenter7 = plugin::PWAutoCenter("Huge server file update. Lots of things improved.");
my $TextToCenter8 = plugin::PWAutoCenter("Including war & knight bots have defensive now!");
my $TextToCenter9 = plugin::PWAutoCenter("");
my $TextToCenter10 = plugin::PWAutoCenter("Please visit and register on forums");
my $TextToCenter11 = plugin::PWAutoCenter(">>>> $Link <<<<");
my $TextToCenter13 = plugin::PWAutoCenter("for up to date info!.");
my $TextToCenter14 = plugin::PWAutoCenter("");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Recent Updates",
"<br><br>
$Yel $TextToCenter </c> <br>
$Yel $TextToCenter2 </c> <br>
$Yel $TextToCenter3 </c> <br><br>
$Yel $TextToCenter4 </c> <br>
$Yel $TextToCenter5 </c> <br>
$Yel $TextToCenter6 </c> <br>
$Yel $TextToCenter7 </c> <br>
$Yel $TextToCenter8 </c> <br>
$Yel $TextToCenter9 </c> <br>
$Yel $TextToCenter14 </c>
<br>
$Red $TextToCenter10 </c> <br>
$Red $TextToCenter13 </c> <br>
$TextToCenter11
");
}
if ($text=~/planned updates/i) {
my $Link = plugin::PWHyperLink("http://www.fleshripper.forumotion.com", "Fleshripper Forums!");
my $TextToCenter = plugin::PWAutoCenter("");
my $TextToCenter2 = plugin::PWAutoCenter("");
my $TextToCenter3 = plugin::PWAutoCenter("");
my $TextToCenter4 = plugin::PWAutoCenter("");
my $TextToCenter5 = plugin::PWAutoCenter("");
my $TextToCenter6 = plugin::PWAutoCenter("");
my $TextToCenter7 = plugin::PWAutoCenter("");
my $TextToCenter8 = plugin::PWAutoCenter("");
my $TextToCenter9 = plugin::PWAutoCenter("");
my $TextToCenter10 = plugin::PWAutoCenter("Please visit and register on forums");
my $TextToCenter11 = plugin::PWAutoCenter(">>>> $Link <<<<");
my $TextToCenter13 = plugin::PWAutoCenter("For up to date info!.");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Planned Updates",
"<br>><br>
$Yel $TextToCenter </c> <br>
$Yel $TextToCenter2 </c> <br>
$Yel $TextToCenter3 </c> <br>
<br>
$Red $TextToCenter10 </c> <br>
$Red $TextToCenter13 </c> <br>
<br>
$TextToCenter11
");
}
}
Just reread your post. Making the NPC do stuff is done by the quest files in the quest directory of the zone they're in. It'll need to have their name as the file name. Mine is Gore Bot, so the file will need to be Gore_bot.pl ... You need to create/edit with a text editor just make sure it has the .pl extension.
Goregut
dew1960
08-09-2012, 11:21 PM
Thanks that helps me a lot. I can use your sample script and edit it to fit my own needs i think and save it as the greeter's name with the .pl extension.
Do I need to edit the database to link that script to the greeter/merchant?
Thanks for your help, I really appreciate it.
Born2rot
08-10-2012, 12:29 AM
Nothing needs be done as long as the name is the file name.
Goregut
dew1960
08-10-2012, 03:05 AM
Thanks again!
dew1960
08-10-2012, 12:30 PM
Hello!
I thought I had this working but now it isn't. I have the npc named Server_Greeter and saved the code as Server_Greeter.pl in the quest/guildlobby folder. I am thinking it must be something wrong with my code but I can't see what it could be.
sub EVENT_SAY {
my $info = quest::saylink("Server Info");
my $rules = quest::saylink("Server Rules");
my $recent = quest::saylink("Recent Updates");
my $upcoming = quest::saylink("Planned Updates");
if ($text=~/hail/i){
$client->Message(315,"Server Greeter whispers to you, 'Hi there $name. What would you like to know? $info or $rules? Perhaps you'd like to hear about $recent or $upcoming?'");
}
if ($text=~/server info/i) {
my $TextToCenter = plugin::PWAutoCenter("Bots. You can have a full set of bots.");
my $TextToCenter1 = plugin::PWAutoCenter("Type '#bot help' for more information.");
my $TextToCenter2 = plugin::PWAutoCenter("");
my $TextToCenter3 = plugin::PWAutoCenter("");
my $TextToCenter4 = plugin::PWAutoCenter("No corpse runs! Items stay on you.");
my $TextToCenter5 = plugin::PWAutoCenter("Defiant Gear Vendors are in the Guild Lobby.");
my $TextToCenter6 = plugin::PWAutoCenter("I have epic 1.0 items - free! Right click me");
my $TextToCenter7 = plugin::PWAutoCenter("Macroquest2 is allowed - see rules");
my $TextToCenter8 = plugin::PWAutoCenter("Free Veteran AA's available at lvl One! Very Handy!");
my $TextToCenter9 = plugin::PWAutoCenter("You can use the Steadfast Servant as a Merc Here!");
my $TextToCenter10 = plugin::PWAutoCenter("It lasts 30 mins but by then you can reuse it again!");
my $TextToCenter11 = plugin::PWAutoCenter("All LDoN Adventures are up and running");
my $TextToCenter12 = plugin::PWAutoCenter("You can even solo the Adventures with a group of 2");
my $TextToCenter13 = plugin::PWAutoCenter("Guild Hall is open with Guild Bank");
my $TextToCenter14 = plugin::PWAutoCenter("Server is up to GoD max lvl 65");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Welcome to Adventure Unlimited",
"<br>
$Yel $TextToCenter9 </c> <br>
$Yel $TextToCenter </c> <br>
$TextToCenter1 <br>
$TextToCenter2 <br>
$TextToCenter3 <br>
$TextToCenter4 <br>
$TextToCenter5 <br>
$TextToCenter6 <br>
$TextToCenter7 <br>
$TextToCenter8 <br>
$TextToCenter12 <br>
$Red $TextToCenter10 </c><br>
$Red $TextToCenter13 </c><br>
$TextToCenter14
<br>
$TextToCenter11
");
}
if ($text=~/server rules/i) {
my $TextToCenter = plugin::PWAutoCenter("Macroquest2 IS Allowed.");
my $TextToCenter2 = plugin::PWAutoCenter("As long as you don't interfere with other players.");
my $TextToCenter3 = plugin::PWAutoCenter("You can box all you want to.");
my $TextToCenter4 = plugin::PWAutoCenter("Be respectful of others. No harrassment!");
my $TextToCenter5 = plugin::PWAutoCenter("-No one likes douches-");
my $TextToCenter6 = plugin::PWAutoCenter("Please try to help others if and when you can");
my $TextToCenter7 = plugin::PWAutoCenter("If you enjoy this server, tell your friends!");
my $TextToCenter8 = plugin::PWAutoCenter("EQ Clients, up to Underfoot are supported");
my $TextToCenter9 = plugin::PWAutoCenter("Rested mana and health regen rates improved!");
my $TextToCenter10 = plugin::PWAutoCenter("");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Adventure Unlimited Rules:",
"<br>
$Yel $TextToCenter </c> <br>
$Yel $TextToCenter2 </c> <br>
$Yel $TextToCenter3 </c> <br>
$Yel $TextToCenter4 </c> <br>
$Yel $TextToCenter5 </c> <br>
$Yel $TextToCenter6 </c> <br>
$Yel $TextToCenter7 </c> <br>
$Yel $TextToCenter8 </c> <br>
$Yel $TextToCenter9 </c> <br>
$Red $TextToCenter10 </c> <br>
$Red $TextToCenter13 </c> <br>
<br>
$TextToCenter11
");
}
if ($text=~/recent updates/i) {
my $TextToCenter = plugin::PWAutoCenter("Server up to GoD now.");
my $TextToCenter2 = plugin::PWAutoCenter("PoP flags should be removed fully");
my $TextToCenter3 = plugin::PWAutoCenter("Custom Vendors added for Defiant Gear & Epic 1.0's");
my $TextToCenter4 = plugin::PWAutoCenter("");
my $TextToCenter5 = plugin::PWAutoCenter("");
my $TextToCenter6 = plugin::PWAutoCenter("");
my $TextToCenter7 = plugin::PWAutoCenter("");
my $TextToCenter8 = plugin::PWAutoCenter("");
my $TextToCenter9 = plugin::PWAutoCenter("");
my $TextToCenter13 = plugin::PWAutoCenter("");
my $TextToCenter14 = plugin::PWAutoCenter("");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Recent Updates",
"<br><br>
$Yel $TextToCenter </c> <br>
$Yel $TextToCenter2 </c> <br>
$Yel $TextToCenter3 </c> <br><br>
$Yel $TextToCenter4 </c> <br>
$Yel $TextToCenter5 </c> <br>
$Yel $TextToCenter6 </c> <br>
$Yel $TextToCenter7 </c> <br>
$Yel $TextToCenter8 </c> <br>
$Yel $TextToCenter9 </c> <br>
$Yel $TextToCenter14 </c>
<br>
$Red $TextToCenter10 </c> <br>
$Red $TextToCenter13 </c> <br>
$TextToCenter11
");
}
if ($text=~/planned updates/i) {
my $TextToCenter = plugin::PWAutoCenter("");
my $TextToCenter2 = plugin::PWAutoCenter("");
my $TextToCenter3 = plugin::PWAutoCenter("");
my $TextToCenter4 = plugin::PWAutoCenter("");
my $TextToCenter5 = plugin::PWAutoCenter("");
my $TextToCenter6 = plugin::PWAutoCenter("Updates will be added as they become available");
my $TextToCenter7 = plugin::PWAutoCenter("");
my $TextToCenter8 = plugin::PWAutoCenter("");
my $TextToCenter9 = plugin::PWAutoCenter("");
my $TextToCenter10 = plugin::PWAutoCenter("");
my $Indent = plugin::PWIndent();
my $Yel = plugin::PWColor("Yellow");
my $Blu = plugin::PWColor("Light Blue");
my $Red = plugin::PWColor("Red");
my $grn = plugin::PWColor("Forest Green");
quest::popup("Planned Updates",
"<br>><br>
$Yel $TextToCenter </c> <br>
$Yel $TextToCenter2 </c> <br>
$Yel $TextToCenter3 </c> <br>
<br>
$Red $TextToCenter10 </c> <br>
$Red $TextToCenter13 </c> <br>
<br>
$TextToCenter11
");
}
}
Do you see any errors?
lerxst2112
08-10-2012, 12:35 PM
Start small, just the hail response, and if that works add the other bits one by one until it stops working and then you've found your problem.
perl -c your_script_name.pl is a good way to spot any obvious errors.
dew1960
08-10-2012, 01:30 PM
LOL, good idea.
I decided to make is simple and just do it as a hail response and [text] responses.
Wouldn't you know that as soon as I finished it the old script started working again? There must be some delay on the server.
Going to restart it now and check it after a while to make sure this new script works.
sub EVENT_SAY {
if ($text=~/hail/i){
quest::say("Server Greeter whispers to you, 'Hi there $name. What would you like to know? You can say [bots],[macros],[merc],[adventure],or [other]");
}
if ($text=~/bots/i){
quest::say("You can have a full set of bots here. Type '#bot help' for more information or '#bot help create' to get started making one.");
}
if ($text=~macros/i){
quest::say("You are allowed to use Macroquest2 (MQ2) here as long as you do not interfere with other players. Be reasonable. Box all you want to.");
}
if ($text=~/merc/i){
quest::say("You get free [veteran] AA's at level one. One of the is the Steadfast Servant. It only lasts 30 minutes, but by the time it expires you can reuse the AA again. He will follow you around and cast beneficial spells and heals on you.:);
if ($text=~/veteran/i){
quest::say("AA's or Alternate Advancement - click the EQ Icon, then click Player, then Alternate Advancement, then the Special Tab, Train and hot key the available AA's and drag them to an action bar to use. You can also just hit the V key to brin up AA's by default.");
}
if ($text=~/adventure/i){
quest::say("All LDoN adventures are up and running. You can start and adventure with a group of only 2 or one person and a bot, or more up to a full group if you like. You could even do a raid with bots);
}
if ($text=~/other/i){
quest::say("For more information - You can say [death],[level],[guild],or [epic]");
}
if ($text=~/death/i){
quest::say("When you die here your items stay with you, no corpse runs needed, just like live!");
}
if ($text=~/level/i){
quest::say("The server is up to the GoD expansion, with max character level of 65");
}
if ($text=~/guild/i){
quest::say("The Guild Hall is open and the guild bank is working. If you want to create a guild, whisper your request to a GM or ask to join his guild");
}
if ($text=~/epic/i){
quest::say("I have useful items for sale, just right click me to purchase. I have your class epic 1.0 weapon for sale - free is a good price!");
}
Thanks for the help guys, I am new to this scripting but learning fast!
Sincerely,
Daniel Walker,
Adventure Unlimited Server Admin & GM
Born2rot
08-10-2012, 02:01 PM
Check the name versus the file. And yes you can test out parts at a time. You can put # in front of things to comment them out so that it doesn't read them as code. Put in a Quest::say("Hi!"); to test each step.
btw love that you kept "No on likes douches" lol
Goregut
lerxst2112
08-10-2012, 02:08 PM
There isn't a delay on the server, but if you make changes to perl files you must tell the server to reload them. Use #rq to do so.
dew1960
08-10-2012, 02:09 PM
Thanks again :)
Do you have a sample script for an npc to create a guild for players? Is there some place I can search for scripts like these? I know there are a lot of scripts for quests already in the game and now that I have a basic understanding, I am looking at some of them to learn how to do things. :)
dew1960
08-10-2012, 02:23 PM
There isn't a delay on the server, but if you make changes to perl files you must tell the server to reload them. Use #rq to do so.
Thanks that makes sense. I had been restarting the server each time, lol.
I appreciate that.
dew1960
08-10-2012, 03:42 PM
Check the name versus the file. And yes you can test out parts at a time. You can put # in front of things to comment them out so that it doesn't read them as code. Put in a Quest::say("Hi!"); to test each step.
btw love that you kept "No on likes douches" lol
Goregut
LOL, well it is true! :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.