Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2014, 03:41 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default Custom Teleporter.

I wrote a custom teleporter and I thought I'd share it, for an example of its use you can check out Valcarona. This teleporter lists out an array of zones defined in a plugin that you will have to make a file for.

This is a screenshot of the teleporter and how it works, Valcarona's is older, so it lists as short name. This new version lists them as their long name.


Here are the plugins necessary for the script to work: Plugins
Here's the Teleporter: Teleporter
Reply With Quote
  #2  
Old 06-15-2014, 06:16 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Thanks for this Kingly.

I've got it working with the exception of the "list them alphabetically" option.
If I type the zone short name with the NPC targeted, I do indeed zone.

If I type "A", I get nothing from the NPC.

The plugin that was linked was named "Zones.pl", but it mentions in the post "Plugins", is this two plugins in one file?

Currently, I'm using one plugin file named "Zone.pl" in my server/plugins folder.
And the teleporter code on an NPC in PoK.

Edit: Additionally, if I have the NPC targetted and enter numbers, I do get the "...must search with alphabetic characters",
so it seem he is listening, just can't get the output.

Thanks!

Last edited by vithmiris; 06-15-2014 at 06:22 PM.. Reason: Add troubleshooting info
Reply With Quote
  #3  
Old 06-15-2014, 11:41 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

The problem is I released this and forgot that I didn't give out the plugin::Message part of it.

Add this to your plugin file and tell me if it works:
Code:
sub Message {
    my $client = plugin::val('client');
    my $Message = $_[0];
    
    if($client) {
        $client->Message(315, "$Message");
    }
}
Reply With Quote
  #4  
Old 06-16-2014, 05:42 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Quote:
Originally Posted by Kingly_Krab View Post
The problem is I released this and forgot that I didn't give out the plugin::Message part of it.

Add this to your plugin file and tell me if it works:
Code:
sub Message {
    my $client = plugin::val('client');
    my $Message = $_[0];
    
    if($client) {
        $client->Message(315, "$Message");
    }
}
Works beautifully! Thanks again!
Reply With Quote
  #5  
Old 06-16-2014, 09:24 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

You're welcome.
Reply With Quote
  #6  
Old 05-07-2018, 07:50 AM
Anon.GM's Avatar
Anon.GM
Fire Beetle
 
Join Date: Apr 2018
Posts: 19
Default

Great porter script. Anon server thanks you.

Quote:
Originally Posted by Kingly_Krab View Post
I wrote a custom teleporter and I thought I'd share it, for an example of its use you can check out Valcarona. This teleporter lists out an array of zones defined in a plugin that you will have to make a file for.

This is a screenshot of the teleporter and how it works, Valcarona's is older, so it lists as short name. This new version lists them as their long name.


Here are the plugins necessary for the script to work: Plugins
Here's the Teleporter: Teleporter
__________________
email:anon.gm@protonmail.com
servers: Anon (bots) and Anon (solo)
Reply With Quote
  #7  
Old 05-07-2018, 12:14 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

You’re welcome. I’m sure the code could use some TLC being it has been 4 years since I wrote it.
Reply With Quote
  #8  
Old 08-27-2018, 11:40 PM
Bots
Fire Beetle
 
Join Date: Apr 2017
Posts: 4
Default

was trying to put something together for a porter that charged for ports just like that whisper script for buffs. any tips?
Reply With Quote
  #9  
Old 08-28-2018, 05:29 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Try this, currently $client->TakeMoneyFromPP() only checks if they have at least 1 Platinum, the value is number of Platinum times 1000 to convert it to Copper.
Just change the price to your discretion and this should work.
Untested, compiles fine using 'perl -c':

Code:
sub EVENT_SAY {
	my @zone_array = plugin::NonCustomZoneArray();
	my $count = 0;
	if ($text=~/hail/i) {
		plugin::Whisper("If there is a zone you would like to go to, just tell me the short name of it and I will see if I have a spell to send you there. I may " . quest::saylink("list", 1) . " them if you like. It will cost 1 Platinum to teleport.");
	} elsif($text=~/list/i) {
		plugin::Whisper("I may list them alphabetically, just say a letter from 'A' to 'Z'.");
	} elsif($text=~/[a-zA-Z]/ && length($text) == 1) {
		foreach $zone (@zone_array) {
			if(substr($zone, 0, 1)=~/$text/i) {
				$count++;
				plugin::Message("$count: " . quest::saylink($zone, 1, plugin::Zone("SN", "LN", $zone)));
			}
		}
		plugin::Message("There are $count zones that begin with $text!");
	} elsif($text!~/[a-zA-Z]/) {
		plugin::Whisper("You must search with alphabetic characters, try again.");
	} elsif($text!~/hail/i && $text!~/list/i && length($text) != 1) {
		foreach $zone (@zone_array) {
			if ($client->TakeMoneyFromPP(1000, 1)) {
				if($text eq $zone) {
					quest::zone($text);
				}
			} else {
				plugin::Whisper("You do not have enough Platinum to teleport.");
			}
		}
	}
}
Reply With Quote
  #10  
Old 08-29-2018, 05:48 AM
Bots
Fire Beetle
 
Join Date: Apr 2017
Posts: 4
Default

thank you kind sir it was very appreciated!
Reply With Quote
  #11  
Old 08-29-2018, 04:52 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

You're welcome.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:07 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3