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 05-03-2010, 04:41 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default Mob wont cast. Please help!

Hey everyone me and my friend just got back into eqemu and made our server. We used to have great scripts but lost them and cant remember anything lol. Can someone please help me with making this cast a spell?

Code:
sub EVENT_COMBAT 
{

 if ($combat_state == 1) 

{
    quest::settimer("timer", 1);
    quest::shout("test test test"); 
}
}

sub EVENT_TIMER
{
if ($timer eq "timer")
  {
        quest::cast($userid,131);

}
}

and so like after u wipe or sumthing or lose aggro the spell will stop casting. As of right now the only thing this mob is doing is shouting "test test test" as I said we used to do it all the time with sub EVENT_TIMER just cant rememeber how. a quick explination would prolly bring it back to us.

Thanks in advance.
Reply With Quote
  #2  
Old 05-03-2010, 08:30 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

anyone that could help me on this please?
Reply With Quote
  #3  
Old 05-03-2010, 08:45 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

You don't have to remember all the code. The wiki is pretty comprehensive. http://www.eqemulator.net/wiki/wikka...=QuestTutorial Another good resource is pre-existing code. There are several events already written that cast spells on regular intervals and reset on a wipe. You can check out PEQ's quests for examples.

If you are trying to use the client as a target, you need to remember that the client does not trigger the timer event, so it won't be automatically available to that sub.
Reply With Quote
  #4  
Old 05-03-2010, 08:58 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

hm ok. where can i look at PEQs quests?
Reply With Quote
  #5  
Old 05-03-2010, 09:07 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Here is the svn: http://code.google.com/p/projecteqquests/
Reply With Quote
  #6  
Old 05-03-2010, 09:23 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

Hm u sent me the link to a rev download?
Reply With Quote
  #7  
Old 05-03-2010, 10:25 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Quote:
Originally Posted by Reynin89 View Post
Hm u sent me the link to a rev download?
The link goes to the svn. Click on the source tab and then on the browse link, then the trunk and keep drilling down. I can't think of a quest offhand that will do what you require, but if you have your own server, surely you've downloaded the quests from somewhere. Just do a search of the quest directory looking for the quest::cast key word and you'll get tons of hits. Poke around until you find one that is similar enough to what you are trying to do and use that.
Reply With Quote
  #8  
Old 05-03-2010, 09:58 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

i still cant find anything to make this dang mob cast.. anyone got any suggestions please?
Reply With Quote
  #9  
Old 05-03-2010, 10:45 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

hm that works how exactly do i search my quest directory specifically?
Reply With Quote
  #10  
Old 05-03-2010, 11:18 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Windows? or Linux?

Windows(XP), bring up a File Explorer window, navigate to your emu folder, where the quests are, then click on search. Click on files and folders, find the text box that says find IN files and enter quest::cast. Click find or whatever.

Unix: Let me know and I'll add directions.
Reply With Quote
  #11  
Old 05-03-2010, 11:30 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

ahhh ok im using windows 7 ill try it thanks
Reply With Quote
  #12  
Old 05-03-2010, 11:53 PM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

nope cant do that with 7. wow lol still messin with this dam thing
Reply With Quote
  #13  
Old 05-04-2010, 12:21 AM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

Messing around with another script while i look at that svn link i got I figured out how to make this mob cast on ITSELF but no on the player.. So its nuking itself lol ANY IDEAS?!?!

Quote:
sub EVENT_COMBAT {
if ($combat_state == 1) {
quest::setnexthpevent(95);
quest::shout ("test test test");
}
}

sub EVENT_HP
{
if($hpevent == 95)
{
quest::shout ("HELP HELP HELP");
quest::castspell($userid,477); }
}
im to the point now i just want it to cast anything on a player thats attacking it.
Reply With Quote
  #14  
Old 05-04-2010, 12:31 AM
Reynin89
Sarnak
 
Join Date: Apr 2010
Posts: 71
Default

if i use

Quote:
quest::castspell(477,$mobid);
itll cast on itself but if i use ($userid,477) or (477,$userid) it wont cast on the player, how does that make sense. Theres gotta be SOMETHING im missing?
Reply With Quote
  #15  
Old 05-04-2010, 12:54 AM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

should be quest::castspell($userid,<spell#>) so that should be working. Did you try it without the EVENT_HP?

Code:
if ($combat_state == 1) {
      quest::castspell($userid,477);
}
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 01:44 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