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-18-2008, 11:11 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

i would guess NO =)
sorry

a remote alternative is to have a item which coudl be given out by your king to any player who has ally faction with him which has nice stats on it, but make item NO RENT

this means every time player logs out- items poof, but player can get it again as long as his faction remains ally and the king curently has a special flag set to meet your condition where the king has HIS item.

if kings item is taken away he stops giving out player bonus items untill kings item has been returned
Reply With Quote
  #2  
Old 07-19-2008, 10:26 AM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Okay, that might work. The only potential problem I can see is that each player would have to make a trip to the kingdom to get this item each time he logs in--and these kingdoms are in the middle of nowhere. I suppose a portal would remedy that, but perish the thought! Portals are anathema in my world (as is spell casting).

Here's another thought. Could I place an npc of each allied faction in the major cities, have them hand out this item as a vicar of the king, and then, once the Item is taken from the king by another faction, the king sends some kind of quest::signal to all the vicars of the world to stop handing out items? Do global quests work that way (I have never used them).
Reply With Quote
  #3  
Old 07-19-2008, 10:54 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

you won't need to signal them - specialy since signaling does not work zone to zone

you simply have vicars to check for same global variable flag as king would
Reply With Quote
  #4  
Old 07-19-2008, 12:30 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Quote:
you won't need to signal them - specialy since signaling does not work zone to zone. you simply have vicars to check for same global variable flag as king would
How would I go about creating this flag?
Reply With Quote
  #5  
Old 07-20-2008, 01:26 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

by flag I mean global variable, which I belive you allready using for your event with King, no?
Reply With Quote
  #6  
Old 07-20-2008, 11:41 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

easiest way is probably to use player quest and a spell. For example, call if blessing of the kings with the stat buff. then, have it check for faction and/or global. With a global of "FactionA" (triggered with the turn in), but also the option of having FactionB and FactionC(not triggered), let the spell = 9000 in this example and faction_id = 600, 601, and 602 respectively:

player.pl in template folder

Code:
sub EVENT_ENTERZONE {
	quest::settimer("check",1);
	}

sub EVENT_TIMER {
	my $factioncheck = undef;
	if ($qglobals{kingdomfaction} ) {	#global is defined
	if ($qglobals{kingdomfaction} eq "FactionA") {	#FactionA has control
	$factioncheck = $client->GetCharacterFaction(600);
	if ($factioncheck >= 850) {	#FactionA and character faction over 850
	if (!$client->FindBuff(9000)) {	#No Buff?  Then cast
	quest::selfcast(9000);
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Has buff but not enough faction.  Fade buff
	$client->BuffFadeBySpellID(9000);
	}
	}
	}
	elsif ($qglobals{kingdomfaction} eq "FactionB") {
	$factioncheck = $client->GetCharacterFaction(601);
	if ($factioncheck >= 850) {	#FactionB and character faction over 850
	if (!$client->FindBuff(9000)) {	#No Buff?  Then cast
	quest::selfcast(9000);
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Has buff but not enough faction.  Fade buff
	$client->BuffFadeBySpellID(9000);
	}
	}
	}
	elsif($qglobals{kingdomfaction} eq "FactionC") {
	$factioncheck = $client->GetCharacterFaction(602);
	if ($factioncheck >= 850) {	#FactionA and character faction over 850
	if (!$client->FindBuff(9000)) {	#No Buff?  Then cast
	quest::selfcast(9000);
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Has buff but not enough faction.  Fade buff
	$client->BuffFadeBySpellID(9000);
	}
	}
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Global not set but has buff
	$client->BuffFadeBySpellID(9000);
	}
	}
}
Variations could also be used such as checking a player's global value (pledging alliance to a kingdom) or for an item. Several possibilities. If that doesn't work for you, let me know.

Another possibility is to use the quest::setstat command (I think that is it), but that could be more tricky.

The other possibility that I know of would simply be using a database query and updating values in the quest script (or adding a command). I really do not think that is optimal. It'd have the query in it though as UPDATE character format for typical sql update. I think you'd have to update blob file so could be a tad bit tricky. If you really really wanted to do it this way, let me know and I'll help you;p I do suggest one of the other methods though.

Edited--Since you mentioned you haven't really used quest globals, you'd need to have the hand in trigger the "flag". So in your king script when a player turns in the item, you would need to do like a quest::setglobal("kingdomfaction","FactionA",7,"F" ) in your event turn-in where FactionA is the value of the variable (just that it is defined) and 7 is for all players for the variable named kingdomfaction.
Reply With Quote
  #7  
Old 07-22-2008, 07:30 AM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Thanks again. Will try this out.
Reply With Quote
  #8  
Old 08-17-2008, 12:21 AM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Quote:
Originally Posted by Striat View Post
easiest way is probably to use player quest and a spell. For example, call if blessing of the kings with the stat buff. then, have it check for faction and/or global. With a global of "FactionA" (triggered with the turn in), but also the option of having FactionB and FactionC(not triggered), let the spell = 9000 in this example and faction_id = 600, 601, and 602 respectively:

player.pl in template folder

Code:
sub EVENT_ENTERZONE {
	quest::settimer("check",1);
	}

sub EVENT_TIMER {
	my $factioncheck = undef;
	if ($qglobals{kingdomfaction} ) {	#global is defined
	if ($qglobals{kingdomfaction} eq "FactionA") {	#FactionA has control
	$factioncheck = $client->GetCharacterFaction(600);
	if ($factioncheck >= 850) {	#FactionA and character faction over 850
	if (!$client->FindBuff(9000)) {	#No Buff?  Then cast
	quest::selfcast(9000);
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Has buff but not enough faction.  Fade buff
	$client->BuffFadeBySpellID(9000);
	}
	}
	}
	elsif ($qglobals{kingdomfaction} eq "FactionB") {
	$factioncheck = $client->GetCharacterFaction(601);
	if ($factioncheck >= 850) {	#FactionB and character faction over 850
	if (!$client->FindBuff(9000)) {	#No Buff?  Then cast
	quest::selfcast(9000);
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Has buff but not enough faction.  Fade buff
	$client->BuffFadeBySpellID(9000);
	}
	}
	}
	elsif($qglobals{kingdomfaction} eq "FactionC") {
	$factioncheck = $client->GetCharacterFaction(602);
	if ($factioncheck >= 850) {	#FactionA and character faction over 850
	if (!$client->FindBuff(9000)) {	#No Buff?  Then cast
	quest::selfcast(9000);
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Has buff but not enough faction.  Fade buff
	$client->BuffFadeBySpellID(9000);
	}
	}
	}
	}
	else {
	if ($client->FindBuff(9000)) {	#Global not set but has buff
	$client->BuffFadeBySpellID(9000);
	}
	}
}
I'm just now starting to experiment with this. Is the settimer function even necessary in this? Can't I just put the script that appears under the TIMER event under the ENTERZONE event instead? I don't even see an "if($timername eq "check")" statement that would trigger the timer. Or am I just missing something?
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:35 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