Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 07-22-2009, 10:13 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Thanks Capheus, I'll try the final "elsif" as an "else" instead, just as soon as I can get my global watchers in place again (deleted in my recent code update).
Quote:
I also don't see where it checks for loss of the ring, where I see ("$client->BuffFadeBySpellID();"), or changing their guild membership to the designated guild ("quest::setguild(0,1);"). It isn't checking for anything but for buffs.
Technically correct. To clarify, the script is looking for a change in the global flag called "kingdomfaction," which I referred to colloquially (in the language of the story line) as a "loss of the ring." The "ring" is item 13732, which when turned in to the "king" of a different faction changes the faction that receives the kingdom buffs. The kingdom buffs are continuous (they automatically rebuff when the buff fades) so long as that player's faction retains the "kingdomfaction" flag. When a specific kingdom faction becomes the recipient of the "kingdom blessing" buffs, they are also automatically placed into the "ring bearer" guild.

Once that faction is displaced by another faction in the global flag, the first faction should be removed from the guild and placed in a different guild (that's one of the parts not currently working). Simultaneously, the script should fade the buff found on any player of the first faction (again, this is one of the parts not currently working). Instead, the buff stays until it fades due to expired buff duration.

Quote:
Player zones in and it checks for item 13732
If player has item 13732 he/she gets aggro from a mob every 20 seconds until they leave the zone.
If they delete/lose item 13732 they still get aggro cause it only checks for the item when they zone in.
This timer repeats every 20 seconds
Correct. When a player obtains the ring (item 13732)--either by taking it from the reigning king after defeating him in battle, or by finding it after it becomes "lost"--the script tells the Ringwraiths in each zone to pursue him upon entry into that zone as he attempts to get the ring into the hands of his King. He will get aggro as long as he is alive and retains the ring. If a Wraith finds him, he will kill him (wraiths are very high level). Upon his death, the Ringwraith script nukes the ring from his inventory and sets the new qglobal. Since the player no long has the ring when he zones to his bind point, the Ringwraiths stop pursuing him.
Quote:
If player doesn't have item 13732 when they zone in it checks for the global set by some other npc or script not listed here.
Correct; the global is set by another script--either by the Ringwraiths or by the king he turns the ring into.
Quote:
I'd use quest::setglobal("kingdomfaction", 1, 5, "F"); for this one (All zones, All NPC, This player only)
Currently the function is quest::setglobal("kingdomfaction", 1, 7, "F"); . I think I must have used this based on a global quest I saw in another example. What would be the outcome of using 7 here instead of 5?
Quote:
Depending on the value of the global it checks for factionlevel and player level
So to make it simple a player will get a different buff depending on the qglobal/faction>850/playerlevel
Correct. The more faction a player has toward the reigning kindgom, the greater the blessing.
Quote:
If the player's factionlevel is less than 850 it checks to see if they have the buff depending on qglobal setting
If the player has the buff it debuffs them and changes their guild only if the qglobal was set at 1
Correct in its current form. There are three other kingdomfaction global options without the corresponding quest::setguild function. They will eventually be added, but I am waiting till I can get the first one to work correctly. Currently, neither the debuff object nor the setguild function is working.
Quote:
If the player doesn't have the buff it does nothing.
This timer repeats every one second
Correct.
Reply With Quote
  #2  
Old 07-23-2009, 08:21 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

Ok good that clarified a few things. And yes try to work out the if,elsif,else thing. If it were me I would just stick with if and get rid of the elsif and else statements. Now for the global.

With quest::setglobal("kingdomfaction", 1, 5, "F"); Its all zones, all npc and this player only

With quest::setglobal("kingdomfaction", 1, 7, "F"); Its all zones, all npc and all players

If you have several players each with this global, it could possibly confuse itself between players. Or another way of looking at it, it might not be able to tell which player should have what global setting, it is calling all the players the same person (if that remotely makes sense).

A global setting of 5 instead of 7 will give each person their own global setting/designation.
Reply With Quote
  #3  
Old 07-26-2009, 07:53 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Okay, after hours of testing I found the problem. In the original, the final "elsif" looked like this:
Code:
elsif ($client->FindBuff(5257) || $client->FindBuff(3467) || $client->FindBuff(1447) || $client->FindBuff(3692) || $client->FindBuff(312)) 
	{
	$client->BuffFadeBySpellID(5257);
	$client->BuffFadeBySpellID(3467);
	$client->BuffFadeBySpellID(1447);
	$client->BuffFadeBySpellID(3692);
	$client->BuffFadeBySpellID(312);
	quest::setguild(0,1);		
	}
It needs to look like this instead:
Code:
elsif ($client->FindBuff(5257 || 3467 || 1447 || 3692 || 312))
	{
	$client->BuffFadeBySpellID(5257);
	$client->BuffFadeBySpellID(3467);
	$client->BuffFadeBySpellID(1447);
	$client->BuffFadeBySpellID(3692);
	$client->BuffFadeBySpellID(312);
	quest::setguild(0,1);
	}
Reply With Quote
  #4  
Old 07-26-2009, 08:09 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Scratch that last post--the original was right after all. It's just that the condition (if ($qglobals{kingdomfaction} == 1)) had not been met when I was testing it. Once I met the condition, and tested it with a character whose faction level was below acceptable, it worked like a charm.
Reply With Quote
Reply

Thread Tools
Display Modes

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