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 { thanks! any ideas? |
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
|
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 |
OK, ill try that. but it doesnt make sense... EVERYTHING works except the attack and the depop (
|
Code:
sub EVENT_HP |
yah thats what i meant by my post
|
try quest::attack($userid);
|
$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.
|
if your account name != your character name, will $userid return your account name?
|
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.
|
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 { |
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. |
nope.
it doesn't work without the spawn either. have never had him attack and i just recently added the spawn line |
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 e.g. Code:
sub EVENT_ITEM { (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 hope this helps ya out, ask with any questions you have |
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.
|
All times are GMT -4. The time now is 02:08 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.