Anyone see an issue..?
Just curious, its been a loooong while since ive scripted anything, and i was never like the BEST but i considered myself pretty decent. Anyway computer got fried lost all scripts trying to rebuild, anyone see why this wouldnt work? Please and thank u for responses.
Code:
sub EVENT_SPAWN { |
Start with putting a closing bracket on your 'sub EVENT_HP' procedure.
|
Ok great :D now hes shouting properly, but not casting the spells now it looks like
Quote:
Oh and its set for 1 2 and 3 sec just for testing, not sure if that will make a difference? |
It's just a matter of closing what you open :) (refrigerator doors, toilet seats, etc...)
I'm not 'real' familiar with timers in script..but are the settimer names suppose to be in quotes as well in EVENT_SPAWN? You can always put a test message in your timer checks to verify script operation as well..even if the server isn't processing every casting call. |
if i had to guess, i would say that you can't use quest::selfcast() in EVENT_TIMER because it should be looking for the client that initiated the event.
i'd suggest starting those timers only when the npc was engaged (as well as stopping them when it is disengaged instead of just dead) and then pulling the target for the spell from the npc's hate list, since there is no need for the timers to be running constantly. |
How would i make the cast do it on a target rather then selfcast then if u dont mind? And ill just keep messing with it more and hopefully figure it out thx guys
|
oh, yeah... it could be the syntax issue uleat just pointed out as well. :)
|
$npc->CastSpell(spellid,targetid) should work to target an individual.
examples: $npc->CastSpell(6646, $npc->GetHateRandom()); // DT random hated client $npc->CastSpell(15236, $npc->GetHateDamageTop()); // slow client that has done the most damage $npc->CastSpell(9051, $npc->GetHateTop()); // nuke most hated client |
I assume that you know about this:
http://www.eqemulator.net/wiki/wikka...=QuestTutorial You can always check the source definitions for any changes since this was made. |
great thanks i appreciate it u guys!
|
Ah 1 last thing, if the spell is a PB aoe it shouldnt matter which GetHate blah blah i type in correct?
|
i'm not sure if it checks for valid range to target and whatnot, but it should hit everyone in range of the AoE, if that's what you mean.
|
Ok thanks again!
|
been working on this all day again trying stuff i assume now its sumthing wrong with how the timers r set up cuz im trying to have him shout on a timer and thats not working either >_<
Quote:
|
Also I used a perl script checker and got this
Quote:
..I put it in GeorgeS Tools and it says im missng a right bracket } I just CANNOT figure out where |
I didn't go through much, but just got some obvious things for you:
Code:
sub EVENT_AGGRO { |
Code:
Sub EVENT_TIMER { |
Jolig that is working thanks a lot! What was wrong with it?
bad_captain, I see I had 4 starting brackets and 2 ending, but where would the other 2 brackets have gone? |
There's a reason people format code, because it is much more obvious when things are wrong. Compare your code to this:
Code:
Sub EVENT_TIMER |
This part:
Code:
Sub EVENT_TIMER { You're original posting was correct..the second one is wrong. Quote:
There could still be other issues, but this is how procedures should be wrapped. I don't know if perl let's you use single-line conditional statements. If it does, and that's what you're attempting to do, then the con checks shouldn't have the opening bracket after it. IF perl does let you, it should look like this. Otherwise you need both open and close brackets around any procedure or sub-procedure. Code:
Sub EVENT_TIMER { |
Here try this.
Also look at this: Quote:
Code:
sub EVENT_COMBAT { |
If you need additional help you can contact me at akaishigpg@gmail.com
|
as for your timer checks, when you are using a string, you should enclose it in quotations and use the eq operator (if the name of your timer is an integer, you don't need the quotations and you use == instead). it's also better practice to use elsif for when you only expect a single condition to be met, otherwise the script will continue to evaluate the rest of the conditions instead of stopping at the first one it sees. here's an example:
Code:
Sub EVENT_TIMER |
Quote:
|
Quote:
|
All times are GMT -4. The time now is 03:13 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.