Custom Boss (test)
Ive been messing with timers and I was just wondering if anyone knew why in the world this boss will NOT cast this spell, has equal brackets, ID is correct, syntax looks fine.. so wth?
Code:
sub EVENT_COMBAT { Thanks in advance. Lol im sure its a nub mistake >_< |
Quote:
|
Ahhh great thank you Akkadian!
|
Hm.. Well right now I have
Code:
sub EVENT_COMBAT { Code:
if ($combat_state == 0) { |
Quote:
Code:
sub EVENT_SPAWN{ |
Ohhh.. Great thanks so much! Working perfect now :)
|
You probably need to learn about strings:
Code:
sub EVENT_COMBAT { quest::castspell(id,spellid) - Casts "spell" on entity with "id". This is buggy, if it does not work try $npc->CastSpell(id,spellid); |
Bah! I didnt know, its casting it when not even aggro'd if ur near the mob. It will just cast the spell, why is that the case when i have
Quote:
|
Quote:
|
oh great guide Joligario ty.
|
But thats why im confused Akkadian, I have that in. But ill attack the mob, itll cast. Ill #repop and as soon as it gets back it starts casting on me again..
|
Quote:
|
Akkadius: FYI - In your code sample, you don't need to stop and start your repeatsay timer in your timer block above. Just redundant as the timer cycles.
|
Im reading it Akkadius, but im unsure. I am somewhat new and starting to learn scripting.. I mean, im reading that, but im still unsure as to why the mob is casting out of combat when i have that code in there?
|
I tried changing the integer like u said so now its
Quote:
|
Quote:
Code:
sub EVENT_COMBAT { |
Quote:
|
What do you want him to do? According to the code you have given, he is acting as intended. If you aggro the NPC, his combat state changes to 1. If you are standing near him when he repops, he will isntantly aggro you. If you want to test it, you should try turning on your GM flag (#gm on) so that he won't aggro you until you attack him.
|
Well hes non kos, and he shouldnt be casting the spell on a random player that just runs by. Hes an indifferent mob.
|
Yea when I add in that extra stoptimer, the mob will only cast the spell once, instead of on the timer.
Quote:
|
I find it hilarious that you have been given a ton of examples of proper formatting and you still don't use a tab or space for anything. You will go far...
|
Quote:
|
Im sorry... Im very new to this, I cant find any of my old timer scripts to look off of. Ive read the examples I just still cant figure it out. Im still studying it. I just dont understand. Ive read tutorials on the site and the GeorgeS Tools lexicon page. Im trying. But I just cant get the darn thing to loop, but stop when the mob isnt in combat.
And as far as your Quote:
|
Not to derail your thread anymore but its all part of the package. Nobody had to tell me to format things a certain way, I looked at examples and thought "damn that does make it alot easier to read and see errors." So when somebody is coming here asking about problems(and if you read the whole thread, he initially had syntax errors as well) and doesnt decide to make his code both more readable for him and for his audience, I do find it hilarious.
Either way our style is totally different Secrets but I can guarantee this guy will use more legible formatting from now on, so I count it as a victory :) |
All times are GMT -4. The time now is 01:51 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.