This code also allows you to toggle on Tick Pulling (Aggro:AllowTickPulling)
which was a pulling technique (exploit) fixed sometime in 2006
This code also implements assist caps to cut down on trains (5 by default)
Unsure if live what this number is (it exists) or if it's a per NPC basis
An NPC with Assist Aggro will not call for help, only NPCs with Primary Aggro will
219 not_extendable - > not_focusable - No focus are applied to these spells
217 maxtargets -> no_heal_damage_item_mod - Not applied to these spells.
232 -> no_remove -> Can not click off these spells even if beneficial
209 powerful_flag -> no_resist -> Unresistable spell
Added a custom Health Update message that will display in the middle of the players screen, to enable this server wide you must enable rule 'Character:MarqueeHPUpdates'
(Haynar) Fixed some runspeed issues with Perl and LUA scripts
(Haynar) Updated #showstats and #npcstats for new speed calcs to display speeds again in familiar float format.
(Haynar) Improved client movement while AI Controlled, such as feared and charmed. Movement will be much smoother from clients perspective.
Updated #showstats and #npcstats for new speed calcs to display speeds again in familiar float format.
Improved client movement while AI Controlled, such as feared and charmed. Movement will be much smoother from clients perspective.
Also found the cause of bard song tick increase and removed
the uneeded code
Also removed the IsBardSong check from GetFocusEffect, it really
shouldn't be needed, but will need to keep an eye out. The focus
effects should most often limit out the bard songs anyways
This increases the timer that mobs will send out updates
(It could probably be increased more)
This will also reset the timer every time SendHPUpdate is called
to prevent sending like 3+ completely useless updates at once
Also skip sending the update to the client if we're sending an
OP_Damage with the damage since the client will apply this number
Changes Speed from float to int. EQ client deals with int step locs better than it does floats according to Haynar's testing.
This also contains mob runspeed changes. I recommend you set runspeeds to start in the DB 1.25 for NPCs below 1.25 which will match player runspeeds almost equally. Existing DBs will need to be updated.
General Cleanup of MobAI functions. Mobs now change their heading on AIMovement timers if their targets' heading has changed since that time. This prevents players from being able to land backstabs inbetween mob swings.
Charmed/feared players now send the appropriate packet, there was a missing CastToClient() in spells that was missing.
Mob runspeed can no longer be snared to 0%, instead, 1% of their base runspeed is the maximum. Roots apply as roots instead of a modifier under this code.
There is going to be bugs with this code. It's better we push through it than revert it. Sanctuary has been running this for a good week and we've worked through the issues.
Misc updates:
Exported some variables to perl, including:
EVENT_ITE_CLICK_CAST:
EVENT_ITEM_CLICK:
spell_id - returns the spell_id of the click effect.
return value - cancels the cast.
EVENT_DROP_ITEM:
quantity - returns the # of items dropped in the packet. If the item has charges, charges are returned here instead.
itemname - name of the item being dropped
itemid - id of the item being droppped
spell_id - spell_id associated with the item's click effect.
slotid - the inventory slot id of the item being dropped.
return value - cancels the item from being dropped.
Added Perl function: CalcEXP. Calculates the experience you would gain for an NPC that cons a specific con value to you.
Fixed a bug where you would receive the group experience bonus and group experience messages for simply being in a group, regardless of the player being in the same zone as you.
Syntax on NPC is:
e.other:QuestReward(e.self,copper,silver,gold,platinum,item,experience,factionid,factionvalue);
This will give you any or all of the rewards and their messages with one call, including the quest ding sound. Any item is sent to your inventory, like SummonItem does now. The coin message is generated by the client, and will give you a message for each coin type (You recieve 5 copper...). No way around that, but it's still useful if the reward only calls for a single type.
We now send the PlayerState in the spawn struct to allow clients
to see other bard animations with instrument to be played if they
zone in after the bard equipped the instrument
OP_WeaponEquip2 and OP_WeaponUnequip2 renamed to OP_PlayerStateAdd
and OP_PlayerStateRemove
Still needs work: Get AI controlled mobs sending the correct
PlayerStates. (stunned, attacking, etc)
various situations.
First, the set function for mob _appearance optimized sending a message
if the new appearance was equal to the old. This cann't be done, as
the 1st time the zone runs there is no client when the set function is
called. If we're combining set/send, as we are, better to always do both. This fixes several of the cases.
Repop also did not work, as no code was being called reliably to set
appearance and update the client based on code path and various flags. This is also fixed.
when the spawn vie gm command or normally with loot tables that equip.
Refined previous changes that fixed the issue with zoning in and not seeing
previosuly spawned armor by sharing the same module.
and NPCs wearing gear in non-weapon slots.
The illusion thing: Not sure why, but te opcode for BulkZoneSpawn doesn't
display the tree/object illusions. I did notice that even OP_Illusion gets
rejected by the client if sent before Client_Ready. Maybe that is why. The
BULKSpawns cannot be sent that late, I tried moving it in the sequence but
it never did the illusions correctly, at any point. So, we new new the
single spawn OP code for PCs with those illusions. This works.
The NPC gear thing. Same story with BulkZoneSpawn, Not sure why. The data
is sent correctly. So now we update the client zoning in (only them) with
what the NPCs are wearing. Every othe client already is up to date.
This change allows #npcedit
armtexture/bracertexture/handtexture/legtexture/feettexture to work
properly and sets individual armor slot materials for NPCs.