EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Mob wont cast. Please help! (https://www.eqemulator.org/forums/showthread.php?t=31220)

Reynin89 05-03-2010 04:41 PM

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.

Reynin89 05-03-2010 08:30 PM

anyone that could help me on this please?

joligario 05-03-2010 08:45 PM

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.

Reynin89 05-03-2010 08:58 PM

hm ok. where can i look at PEQs quests?

joligario 05-03-2010 09:07 PM

Here is the svn: http://code.google.com/p/projecteqquests/

Reynin89 05-03-2010 09:23 PM

Hm u sent me the link to a rev download?

Reynin89 05-03-2010 09:58 PM

i still cant find anything to make this dang mob cast.. anyone got any suggestions please?

Andrew80k 05-03-2010 10:25 PM

Quote:

Originally Posted by Reynin89 (Post 187445)
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.

Reynin89 05-03-2010 10:45 PM

hm that works how exactly do i search my quest directory specifically?

Andrew80k 05-03-2010 11:18 PM

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.

Reynin89 05-03-2010 11:30 PM

ahhh ok im using windows 7 ill try it thanks

Reynin89 05-03-2010 11:53 PM

nope cant do that with 7. wow lol still messin with this dam thing

Reynin89 05-04-2010 12:21 AM

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.

Reynin89 05-04-2010 12:31 AM

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?

Andrew80k 05-04-2010 12:54 AM

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);
}



All times are GMT -4. The time now is 06:37 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.