Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   NPC that uses showcharacter() attacks players near it (https://forums.graalonline.com/forums/showthread.php?t=134256313)

firefighter 10-04-2009 02:02 PM

NPC that uses showcharacter() attacks players near it
 
Hello,

I got a problem on my server Zenox that every NPC that is using the showcharacter() function attacks player near it in a pk-zone. It happens although it hasn't joined any other class. I wanted to completely disable the default hitpoint-system because we have our custom one. So can you please help me to fix this?

Jay

cbk1994 10-04-2009 04:52 PM

I've noticed this before on several different servers, but unfortunately, I know of no way to fix it.

Deas_Voice 10-04-2009 06:09 PM

i never experienced this :o
does the npc have to walk around or just staying still like a "statue"?

firefighter 10-04-2009 11:10 PM

Quote:

Originally Posted by Deas_Voice
does the npc have to walk around or just staying still like a "statue"?

It even does it if it stays still. So we found a way to use images for characters but it isn't the best idea because then we need to many different images.

DustyPorViva 10-04-2009 11:21 PM

Need some more details here... you're not really explaining it very well. Do they actually use their sword? Do they chase the player? Do they just hurt the player if they touch them, or do they swing if the player gets in front of them?

fowlplay4 10-05-2009 12:16 AM

I would assume it's related to replacing the sword animation.

replaceani("sword", "idle");

Edit: Confirmed, if you do the above walking into idle characters will "hit" you.

Deas_Voice 10-05-2009 08:45 AM

Quote:

Originally Posted by fowlplay4 (Post 1527624)
Edit: Confirmed, if you do the above walking into idle characters will "hit" you.

i guess it's just defending itself :(

cbk1994 10-05-2009 12:57 PM

Quote:

Originally Posted by fowlplay4 (Post 1527624)
I would assume it's related to replacing the sword animation.

replaceani("sword", "idle");

Edit: Confirmed, if you do the above walking into idle characters will "hit" you.

Hah, I never thought of that in the year or so it happened on a server I worked on.

On Zenox, you can probably just remove the code since it's used to disable the sword and you have your own custom movement anyway, but otherwise, I guess you could upload a copy of idle called like "zenox_idle" to avoid the problem.

fowlplay4 10-05-2009 03:50 PM

They aren't disabling the sword properly if they're replacing the sword animation.

firefighter 10-09-2009 01:10 PM

Thank you for your help. I have fixed it now by using this.setcharani("zenox_idle",null); instead of using this.ani = "zenox_idle"; :D


All times are GMT +2. The time now is 04:51 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.