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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2013, 03:06 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Smile New Waypoint Instance Code

I re-wrote the Waypoint Instance code and sharing for anyone else to use or modify. So feel free to use, edit, share, anything with this code. Some of it was copy/paste/edit from other peoples code.

The code is for global_player.pl and players don't need to have any npc target to use instance. Just say in chat commands.

Allows solo, raid, and guild instances. The leader of raid and guild instances may invite and remove people from the raid and guild instances. There will be a pop up window showing a list of who's been invited (pending / joined) and who's been removed.

There is code there for GM to find and goto players in any instanced or public zone at their last known XYZ which can be a pain without this tool if the player is assigned to several instances. This even works if the player is offline!

Feedback and suggestions welcome.

Its about 105k and 2800 lines of code, so using pastebin to share.

Still requires NPC to give money if you are going to charge the users.

See links for source code to use on your server, and screenshots below to get an idea of the menu, etc.

Special Thanks to Bamron, Hateborne, Natedog, Trevius, Akkadius, Secrets and a few other people

Waypoint 1.6 Code
http://pastebin.com/cjzXvDyb

Waypoint NPC
http://pastebin.com/uL8ZqeZ6







Reply With Quote
  #2  
Old 04-01-2013, 03:07 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default





Reply With Quote
  #3  
Old 04-01-2013, 03:12 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Note the instance code uses all qglobals, no DBI.

The GM tool for find/goto how ever does use DBI to get info from the character_ table so you would need to update your db name, user name, and password that is clearly labeled in the code.

The discussion during the creation on this code can be followed here:

http://ezserveronline.com/forums/index.php?topic=3631.0

Last edited by thepoetwarrior; 04-01-2013 at 03:15 AM.. Reason: More Info
Reply With Quote
  #4  
Old 04-01-2013, 11:19 AM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default

Wow. This is amazing work, poet.
Reply With Quote
  #5  
Old 04-01-2013, 06:13 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Seems crosszonesignalclientbyname() only works if you are in the same zone with the other player, would be nice if it worked across to a different zone.

Might need to use DBI to read the qglobals since sometimes the zone bugs and doesn't see them giving the Illusion of the instance disappeared. This is a known bug with qglobals for years.
Reply With Quote
  #6  
Old 04-01-2013, 07:10 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by thepoetwarrior View Post
Seems crosszonesignalclientbyname() only works if you are in the same zone with the other player, would be nice if it worked across to a different zone.

Might need to use DBI to read the qglobals since sometimes the zone bugs and doesn't see them giving the Illusion of the instance disappeared. This is a known bug with qglobals for years.
This sends a signal to all zones given you have provided the accurate name for the player. It is not limited to the same zone, that was the point of it. I've used it in my own implementations and it works for sure. Might need to debug what is getting sent to your arguements.

The packet is sent to all zones regardless of what zone the player is in.

Last edited by Akkadius; 04-01-2013 at 07:39 PM..
Reply With Quote
  #7  
Old 04-01-2013, 09:12 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Ok, thats good to know, originally assumed and was hoping sent to all zones.

Now to find out why its not.

Is there any rule value to turn on?
Reply With Quote
  #8  
Old 04-01-2013, 09:40 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Well, I confirmed the crosszonesignal does work to any player in any zone.

So if the players were not able to invite someone into their instances from another zone, then its because they are not seeing the qglobals for the instance.

Current code to be in same zone name to work due to info being passed in the signal but you can be in your guild instance, then send signal to player in the public zone to join the instance, tested and working.

95% of players have no problem but sometimes there is the random issue that they don't see the qglobal that I can't pin point the problem.

Code is available for looking at.
Reply With Quote
  #9  
Old 04-01-2013, 09:47 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by thepoetwarrior View Post
Well, I confirmed the crosszonesignal does work to any player in any zone.

So if the players were not able to invite someone into their instances from another zone, then its because they are not seeing the qglobals for the instance.

Current code to be in same zone name to work due to info being passed in the signal but you can be in your guild instance, then send signal to player in the public zone to join the instance, tested and working.

95% of players have no problem but sometimes there is the random issue that they don't see the qglobal that I can't pin point the problem.

Code is available for looking at.
That goes back to the intermittent issue where a zone doesn't immediately update its qglobal memory for whatever reason.
Reply With Quote
  #10  
Old 04-01-2013, 10:12 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Yes, but don't know why.

Any way to force this to update in the quest code?
Reply With Quote
  #11  
Old 04-02-2013, 08:01 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Smile

Updated!

Version 1.8.4

http://pastebin.com/9B0hWVCC

Changes are listed on the top of the source code.

The biggest change is that the instances now use DBI.

Reading Qglobals now by using DBI to 100% guarantee seeing the values qglobals for credit balance, if instance is created, list of invited players etc. Still don't know why randomly 5% chance for zones to not refresh memory what the qglobals are. DBI fixes this, possibly at the cost of performance (so far haven't noticed any performance hit). The new sub for reading qglobals is small and simple, returns the value of the qglobal. Did a find/replace on all the $qglobal{$variable} with the new sub fuction name.

Writing to the Qglobals table works the same way as before with setglobal command.

Fixed minor bug that players needed to be in the same public zone to invite each other into raid or guild instances. Now the leader can invite any player that is in any zone public or instance etc.

Also can now remove a player from the invite even if the player is in a different zone. When removing a player, it will zone them to the public version of the current zone the player is in if they are in the same zone name as the instance they were removed from. Else if they are in a completely different zone, then they will get the message but won't be teleported to the public version since there is no need. You can re-invite players after they have been removed/banned from the instance.

Players without guild can no longer create a guild instance with id of -1 and it will tell them that they have no guild if trying to create.

Enjoy!
Reply With Quote
  #12  
Old 04-02-2013, 09:36 PM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default

Just got the new version , went to use it and I cannot figure out how to make it work. I have a free and paid token, but whenever i say instance it just gives me the " X waypoint menu" and "--------------" - - I'm sure im missing something... Im just not sure what it is
Reply With Quote
  #13  
Old 04-02-2013, 09:56 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Smile

You can change the item id of your Waypoint click, just search for "hasitem" to quickly find the lines where you can change item ID.

In case you don't want to use clickie to summon pet for adjust prices, then just ignore that and edit the prices in sub SOLO_PRICE, sub RAID_PRICE, and sub GUILD_PRICE for example at line 1690 for else $new_price = 0;

Most likely, the user name and password are either missing or wrong in this part of the code:

Starts on line 2787

Code:
### Establish a Connection with password from Config File
sub LoadMySQLConnection
{
        use DBI;
        use DBD::mysql;
        my $DATABASE_NAME               = "XXXXXXXXXXXX";
        my $DATABASE_USER               = "XXXXXXXXXXXX";
        my $DATABASE_PASSWORD   = "XXXXXXXXXXXX";
        my $dsn = "DBI:mysql:database=$DATABASE_NAME;host=localhost";
        my $connect = DBI->connect($dsn, $DATABASE_USER, $DATABASE_PASSWORD);
        return $connect;
} # End LoadMySQLConnection()
Be sure to replace XXXXXXXXXXXX with your database name, user, and password.

Sorry for any confusion.

Working on a new version today and just about done that will allow people in your raid group to enter raid without needing to be invited manually, will post it when soon within a day here.
Reply With Quote
  #14  
Old 04-02-2013, 10:04 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

I'm going to add some error check for people that try this for the first time and forget change the password, will look something like this when I put out the next source:

Reply With Quote
  #15  
Old 04-03-2013, 03:13 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Thumbs up

Updated to version 1.9.9

http://pastebin.com/jbWpGkL3

Now automatically gets your password to log into your database via your config file that you already have in your server directory. Alternate login / connect function available via renaming function name.

Anti Spam (Set to 5 message limit per 10 seconds)

Allow group to join leaders solo instance.

Allow raid group to join raid instance without having to be invited.

Anyone in raid group in raid instance can view the list of players invited via /say raid list

Anyone with guild tag can join guild raid without having to be invited.

Anyone with guild tag in guild instance say view invited players via /say guild list

Only raid instance leader can invite/remove players

Anyone with guild tag can invite others into guild instance

Bug fixed where qglobal name started with instance id and qglobal name started with guild id, if either were same, could zone into wrong zone, so those qglobals were renamed to avoid that problem.

Other qglobals got renamed. Easier to see them all in the quest_globals table now by searching qglobal names that contain "RaidI", "GuildI", or "SoloI".

Prices were adjusted to free for testing purposes.

Due to the testing from the players on EZ Server, most of the bugs are worked out and fixed now, and they are really enjoying the new system.
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:01 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