modifynpcstat?
Greetings,
Was trying to add a Code:
quest::modifynpcstat("runspeed","1"); Is there a reason this modifynpcstat doesn't work? Does it matter what sub EVENT it's under? I'm trying to add it under the sub EVENT_TIMER portion of my quest. Thanks! |
Doesn't capitalization matter on the quest functions?
If so.. inside the source its written like this... Code:
quest::ModifyNPCStat("runspeed", 1); |
Quote:
Code:
quest::modifynpcstat("special_attacks","ABHGZ"); |
figured it out... if an NPC starts with 0 runspeed in database... no matter how many times you try to edit it with ... ModifyNPCStat it will never change!
So set the NPCs runspeed to 1 or somtehing... and on spawn modifynpcstat it to 0 ... then use whatever timer you need to edit it. Not sure why it works like this.. but meh Code:
sub EVENT_SPAWN { Decided to look it up... and inside mob there is this.... mob.cpp Code:
float Mob::_GetMovementSpeed(int mod) const { inside mob.cpp it seems to also add a flag called "permarooted" if an NPC has 0 runspeed in database (means it cant be altered unless there is another function that I do not know about to remove this flag?) mob.cpp Code:
permarooted = (runspeed > 0) ? false : true; Code:
inline const bool IsRooted() const { return rooted || permarooted; } So.. the IsRooted() is called and puts runspeed back to 0 since it has that permarooted flag :( So ghetto way to do it works at least... start npc with 1 runspeed.. then set to 0 upon spawn.. then later in the script you can edit the NPCs runspeed.. |
Nate,
Currently my script is this: Code:
#Ghaud Code:
sub EVENT_SPAWN { |
Yes that is correct... set runspeed to 1 in database and change runspeed to 0 when it spawns
|
Quote:
I changed it to 1 in the database, basically what the boss does is ports away at 76, 51, 26 and adds spawn .. he's supposed to remain "invulnerable" and perma rooted where he gets moved to and not be part of the fight until after the timer goes down. I THINK it's modifying his run speed when it moves him away to 0, but then he's like warping back on top of me .. weird Edit: Yeah. I don't think you can play with runspeed from 0 to 1 or 1 to 0. With having him start at 0(in DB) you can't add runspeed(as you figured out) and it seems when you have it start at runspeed of 1(in DB) and then try to make his runspeed 0 via modifynpcstat it's making it warp onto me. |
All times are GMT -4. The time now is 08:54 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.