Jump to content

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  dr3ad : (17 October 2019 - 01:15 AM)

Added feature "Lookup retail NPC equipment" to the account panel for the upcoming item forge, can be seen on the right.

@  dr3ad : (16 October 2019 - 12:41 PM)

18 hours uptime. #record

@  dr3ad : (14 October 2019 - 08:56 PM)

Fixed some important performance issues, server back online

@  dr3ad : (13 October 2019 - 04:20 PM)

Server is up again, fixed some crash issues.

@  dr3ad : (12 October 2019 - 11:54 PM)

Server back online.

@  dr3ad : (12 October 2019 - 11:49 PM)

Server up in 3 mins. Applied some fixes.

@  dr3ad : (10 October 2019 - 09:49 PM)

Server has been started. Up in 3 mins.

@  dr3ad : (10 October 2019 - 09:47 PM)

5-10 mins downtime while we apply some changes

@  dr3ad : (10 October 2019 - 05:05 PM)

9 hours uptime #record. Thanks everyone for testing.

@  dr3ad : (09 October 2019 - 08:32 PM)

You can now spawn/create NPCs that have BFA Display ID without getting "Can't find NPC error" once you try to spawn NPC in-game.

@  dr3ad : (09 October 2019 - 02:57 PM)

Fixed restarter, server back online.

@  dr3ad : (09 October 2019 - 02:39 AM)

Added about 23k more .wmo gameobjects. Full list of gameobjects will be posted soon.

@  dr3ad : (08 October 2019 - 07:20 PM)

Fixed .phase promote command and loading of phase ranks

@  dr3ad : (08 October 2019 - 06:36 PM)

BFA Races added to NPC template creation page.

@  dr3ad : (08 October 2019 - 04:34 PM)

Fixed the "Failed to retrieve" password error that some people may have gotten in their web account panel. Check your panel again now.

@  dr3ad : (08 October 2019 - 04:28 PM)

Also there's been a known issue with incorrectly copied TRP or TRP in general that gives you disconnect as soon as you login. If you have this issue try deleting TRP then logging back in.

@  dr3ad : (08 October 2019 - 04:19 PM)

Added website feature "Fix character DC problem" in account panel which will fix characters that you get disconnected on when you login.

@  dr3ad : (08 October 2019 - 03:45 PM)

.gob state command fixed, you can do .gob state 0 3 now to activate light gobs. Also fixed loading of gameobjects that already had state set previously. Effective on next restart.

@  dr3ad : (07 October 2019 - 08:00 PM)

RPH 735 has just been put up online if you wish to copy over some character related stuff to BFA. RPH 735 will be up for the next 48 hours. However you have to set new realmlist: SET portal "leg.rpheaven.org"

@  dr3ad : (07 October 2019 - 07:36 PM)

Another crash fixed


Photo
- - - - -

NPC Scripting, When target casts spell problems


  • Please log in to reply
4 replies to this topic

#1 Akalies

Akalies

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 11 February 2019 - 07:53 PM

I'm twenty five and have never made a forum post in my life. That out of the way,

 

Spell cast detection via scripts doesn't seem to be working.

The original idea was a pet npc owned by the player would detect a spell the owner target cast, and nothing happened.

I tried with with many different spells, and then set the ID to 0 so it would pick up any spell I cast.

NONE OF THE SPELLS WERE INSTANT. I tried player spells, and random boss spells, all with cast times. I tried making it so the npc was no longer a pet, and the target was nearest player. Then I tried putting it on an enemy, and had the target be current victim. Nothing seemed to trigger the effect event, I even tried changing that a bunch from simple 'NPC talk' to random movement.

 

There is another event called 'When Spell Hits the Target', but that one has a 'school' parameter and I don't know the IDs for spell schools. If it just doesn't work I guess you can delete this, but I might not understand exactly how targetting works. I got both Owner Target and Current Victim Target to work with other scripts, just nothing as far as casting.



#2 Scott

Scott

    Donator

  • Donator
  • PipPipPip
  • 65 posts

Posted 12 February 2019 - 05:13 AM

Do they cost mana? They wont work if they consume mana but the NPC does not have it.



#3 Akalies

Akalies

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 12 February 2019 - 03:05 PM

The Player is casting the spell

The script has the "When target cast spell" condition

The event that plays was arbitrary, I tried changing it from NPC talk to NPC move forward, just to see if that changed anything but it never seemed to fire.

The Target is "Summoner or Owner", and the player is set as  the owner is set in a previous script. I also tried using "Nearest friendly player"

The scripted NPC doesn't have mana, but his action wasn't ever to cast a spell. I just wanted to know if the condition was ever met by making him talk or move, or die. 

No response, even after trying different spells with and with out mana, and the other target type of "nearest friendly player".

"Nearest Friendly Player" worked when setting the player as his owner, on the first script.



#4 just 'Neth'

just 'Neth'

    Master Creator, Host and Script-fanatic

  • Donator
  • PipPipPipPipPipPipPipPip
  • 1991 posts

Posted 12 February 2019 - 04:14 PM

"Summoner or Owner" is valid when the NPC has been summoned by the player with the "Summon NPC" action.

That happens if another NPC uses "Summon NPC" and is targeting e.g. "closest player" or maybe "action invoker" for gossip.
The summoned NPC can then use scripts targeting the same player who was either "closest player" or "action invoker" in this instance.


im a game dev or something now i guess


#5 Akalies

Akalies

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 February 2019 - 04:31 AM

The "Summon NPC" event works just fine, it's "When target casts spell" trigger that doesn't seem to do anything.
I've tried different spell parameters as well as casting different spells. Then I tried using different targets.
If some one could make or show me an example of " When target casts spell" that works then I can figure out what other part I had wrong. But I don't know if " when target casts spell" works at all.