Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2004, 04:23 PM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default Npcs wont attack ???

I tried code i saw used in many places, and it doesn't seem to work. everything else in it works. but the mob simply doesn't attack me when i hand the item in.

Code:
sub EVENT_ITEM { 
if($itemcount{20368} == 1){ # Note to Maligar
quest::say("Hmmm. What's this? A note from that silly bard Baenar? I wasn't aware that those of his kind could write, much less read.");
quest::emote("lets out a deep laugh.");
quest::say("I see you do not share my sense of humor. Let's read it, shall we? Oh, no! She's dead? I knew that already, you fool. It was by my hand she died! Ooops! Did I let that slip out? Silly me. I guess I will have to kill you now!");
quest::spawn(12132,0,0,-10905,1249,210);
quest::attack("$name");
}
}
sub EVENT_DEATH { 
quest::depop();
}

#END of FILE Zone:qey2hh1  ID:12076 -- Maligar
Also, i noticed depop(); on death doesn't appear to work. I would of expected it to make him go poof after he dies like a vendor would. Maybe i need to pass an arguement through it? The reason i did a depop() on death was because when i kill him, he has the note that i had given him to spawn the second mob and cause him to attack me. This item is a quest item and should be destroyed after i hand it in, shouldn't be able to loot it when he dies ) Anybody know a way to get around this some how?

thanks!

any ideas?
Reply With Quote
  #2  
Old 08-03-2004, 06:30 PM
hypershadow66
Banned
 
Join Date: Nov 2003
Posts: 335
Default

i am not sure if there is a way to, but if there is, you could make him depop on 1HP and give an amount of exp apon depoping, that way he would give exp and dissapear
Reply With Quote
  #3  
Old 08-03-2004, 07:26 PM
x-scythe
Discordant
 
Join Date: Jun 2003
Posts: 449
Default

try moving the comment "# note to maligar" out of the {} and put it about sub EVENT_ITEM
ive heard this has messed up a quest before
Reply With Quote
  #4  
Old 08-04-2004, 01:07 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

OK, ill try that. but it doesnt make sense... EVERYTHING works except the attack and the depop (
Reply With Quote
  #5  
Old 08-04-2004, 05:05 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Code:
sub EVENT_HP
{
 if ($hpevent == 1){
 quest::depop();
 quest::exp(500);
 }
}
Try that, as suggested.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #6  
Old 08-04-2004, 09:07 AM
hypershadow66
Banned
 
Join Date: Nov 2003
Posts: 335
Default

yah thats what i meant by my post
Reply With Quote
  #7  
Old 08-04-2004, 09:46 AM
cofruben
Old-EQEmu Developer
 
Join Date: Oct 2002
Location: Spain
Posts: 323
Default

try quest::attack($userid);
Reply With Quote
  #8  
Old 08-04-2004, 02:05 PM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

$charid seems to respond better for me, $userid returns the same value, but for some reason i have noticed that $charid works smoother, don't as me why but it does.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #9  
Old 08-04-2004, 02:26 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

if your account name != your character name, will $userid return your account name?
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #10  
Old 08-04-2004, 04:00 PM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

nope, $userid, and $charid return the value of the id in ther user table, i.e. if i was the 184th person to create a character on your server then $charid will return 184. your account name is only used as a refrence to who the character belongs to. $name returns your charactername and $charid returns the value of id in the character table.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #11  
Old 08-04-2004, 04:53 PM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Still no luck.. This is what i currently have. and it yields the same result. when i turn in the item, the new mob spawns. but they just stand there the original mob wont attack me

Code:
sub EVENT_ITEM {
if($itemcount{20368} == 1){
quest::say("Hmmm. What's this? A note from that silly bard Baenar? I wasn't aware that those of his kind could write, much less read.");
quest::emote("lets out a deep laugh.");
quest::say("I see you do not share my sense of humor. Let's read it, shall we? Oh, no! She's dead? I knew that already, you fool. It was by my hand she died! Ooops! Did I let that slip out? Silly me. I guess I will have to kill you now!");
quest::spawn(12132,0,0,-10905,1249,210);
quest::attack($charid);
}
}
sub EVENT_DEATH {
quest::summonitem("20367");
quest::depop();
}

#END of FILE Zone:qey2hh1  ID:12076 -- Maligar
Reply With Quote
  #12  
Old 08-05-2004, 06:21 AM
x-scythe
Discordant
 
Join Date: Jun 2003
Posts: 449
Default

not positive but the problem could be is that since there is a new mob being spawned, it wont have the quest script since it is a different mob, thus it wont attack..
just an idea, could be wrong

-edit-
try adding the new spawn to your spawn table, then either make it KOS or add a quest script to it.
Reply With Quote
  #13  
Old 08-05-2004, 07:12 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

nope.

it doesn't work without the spawn either. have never had him attack and i just recently added the spawn line
Reply With Quote
  #14  
Old 08-05-2004, 10:38 AM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

GAH! i didn't read your script. ok few questions, are you getting attacked by any mob? or do both mobs just stand there lookign stupid.
if you get attacked by one, but its the wrong one here is the problem. The quest::attack line causes the current mob to attack, not the mob that is spawns, what you need to do is add a line into the EVENT_SPAWN of the mob you want to attack. i.e.

Mob that is spawned:
Code:
sub EVENT_SPAWN
 {
   quest::attack($charid);
  }
now the problem is this, this mob won't have the character targeted when it spawns, so what you have to do is tell it what to target, sadly, there is no stock command in the quest sytem that tells mobs to target stuff via another mob, so there are two ways you can go about doing this. You can one, use corfuben's guide and make your own command to transfer the charid data to the other mob, if this is to difficult you can take the easier route which is to set a qglobal with the value of the $charid.

e.g.
Code:
sub EVENT_ITEM { 
if($itemcount{20368} == 1)
  { 
    quest::say("Hmmm. What's this? A note from that silly bard Baenar? I wasn't aware that those of his kind could write, much less read."); 
    quest::emote("lets out a deep laugh."); 
    quest::say("I see you do not share my sense of humor. Let's read it, shall we? Oh, no! She's dead? I knew that already, you fool. It was by my hand she died! Ooops! Did I let that slip out? Silly me. I guess I will have to kill you now!"); 
    quest::targlobal("VARCHARID",$charid,"D1",210,$charid,$zoneid); #note that i set mobid to 210, the number of the mob you are spawning, you will see why i did this in a moment.
    quest::spawn(12132,0,0,-10905,1249,210); 
   }
  }
This goes in the mob that you hand the note to.
(btw you might want to depop this mob if it is suppose to be him attacking you, in which case you just add the quest::depop command. but if this is the case you will want to make a copy of him in the mob database, as a seperate mob number. this way as you will see in the next script, when this mob normally pops on his timer, he won't try to attack someone on accident.)


then in the mob you are spawning.

in the mob you are spawning (mob 210 in this case):
Code:
sub EVENT_SPAWN
  {
    # i set $mobid to 210, so this mob would have access to the $VARCHARID in the qglobal table.
    quest::attack($VARCHARID); 
   }
sub EVENT_DEATH 
  { 
    quest::summonitem("20367"); 
   }
so what we have is, you hand in the item, the mob sets a variable in the databse equal to that of the current characters id. then it spawns this mob, which then reads the variable and attacks whatever the value of that variable is.

i hope this helps ya out, ask with any questions you have
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #15  
Old 08-05-2004, 10:41 AM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

and ofcourse after reading your most recent post i see you just added the spawn to try somthing out. hmm well in that case if you just want the mob to attack you, i gave you way to much info. if the mob isn't attacking period, i am not sure exactly what is going on, i am sorry i need to read all of the posts before i make my own, hmm, make sure the mob doesn't have 0 and 0 in the runspeed and walk speed in the database and he is just trying to attack you but he is permarooted. otherwise i sadly don't know whats wrong, you can ignore the above post, it won't help you if your mobs aren't attacked at all.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
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 12:30 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3