Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2008, 04:22 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

hmm ya i saw that while i was doing code. but i did not understand it all saw that it went to 7 but in the code only went to like 3 did not know you added it up.. question is though is it still tied to the player or npc or is it tied to the server or something like that? becuase what im wanting to do is move from one zone to another with player 1 then the npc in zone 1 should read the variable and tell player 2 the zone is in use come back later and then npc 2 in zone 2 should turn off the same variable so that npc 1 will then again let players in without needing to know what npc its reading from or what player got the variable set? because from the code it seems that it always ties it to a player or npc or zone maybe.

the code i have working now just simply sets a variable to the database name and value and then calls it based on the name.. not set to anything npc,player,zone wise.

if the questglobales already do that great but if not thats what i need to know... wasted about 2 days of my time trying to get this to work if it does but hey lol y reinvent the wheel.
Reply With Quote
  #2  
Old 07-06-2008, 04:58 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by spider661 View Post
i did not understand it all saw that it went to 7 but in the code only went to like 3 did not know you added it up.. question is though is it still tied to the player or npc or is it tied to the server or something like that? becuase what im wanting to do is move from one zone to another with player 1 then the npc in zone 1 should read the variable and tell player 2 the zone is in use come back later and then npc 2 in zone 2 should turn off the same variable so that npc 1 will then again let players in without needing to know what npc its reading from or what player got the variable set? because from the code it seems that it always ties it to a player or npc or zone maybe.
We're basically working with a bitmask in the options field. The first binary bit is NPCs, the 2nd is Player, and the 3rd is Zone. Since it looks like you would need all 3 to be able to access the global, that would make it 111 in binary. Because binary reads right to left, that would be the same as saying this:
Code:
Option:		Zone	Player	NPC
Decimal value:	4	2	1
Binary value:	1	1	1
So, when you add that up, you get 7. Another example would be just the zone & player: 4 + 2 = 6.

Quote:
Originally Posted by spider661 View Post
the code i have working now just simply sets a variable to the database name and value and then calls it based on the name.. not set to anything npc,player,zone wise.
That's exactly what quest globals do: set a variable in the database (the quest_globals table) that can be called based on the name of the global. By default (when 0 is used for the option), it is specific to that player, npc, & zone that it was set in, but with the options, it opens up those permissions, just like the permissions on a file.

Hope this provides a little more clarity.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #3  
Old 07-06-2008, 05:39 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

well just tested it your right it already does exactly what i wanted it to do.. good news for everyone that did not know.. a big wast of time for me lol but thanks for the info really nice to know guess i get to just use this as another learning example for the code base :P eventually i will find something i can contribute lol..

thanks again.
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 02:53 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3