The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No walking caster npc when attack
Author Message
xfolder
Apprentice
*

Posts: 9
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #1
No walking caster npc when attack
My npc caster follow the target. I want them to stay at same position when they cast. How to do it?
03-25-2012 03:26 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #2
RE: No walking caster npc when attack
At the same position when they cast 'x' spell or the entire time they are spawned? I assume the former. If it is the former you can set their flags to be frozen during spellcast possibly... and remove when the spell is done. I am sure there are other options that I am not thinking of at the moment since I am a bit preoccupied.
03-25-2012 05:03 AM
Find all posts by this user Like Post Quote this message in a reply
CptObvious
Apprentice
*

Posts: 27
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #3
RE: No walking caster npc when attack
I would try to flag the npc as frozen, removing the flag as he finishes casting. It's a quick solution and even if the npc will appear as [paralyzed] I think it will not harm the "good looking" of the game.


E comunque ste cose puoi chiedermele direttamente su skype niubbone : D

Messing scripts on DNA Shard (ita) : P
03-25-2012 05:18 AM
Find all posts by this user Like Post Quote this message in a reply
xfolder
Apprentice
*

Posts: 9
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #4
RE: No walking caster npc when attack
My casters when they're paralyzed don't cast Big Grin
03-25-2012 06:52 AM
Find all posts by this user Like Post Quote this message in a reply
CptObvious
Apprentice
*

Posts: 27
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #5
RE: No walking caster npc when attack
Try setting stamina = 0

Messing scripts on DNA Shard (ita) : P
03-25-2012 08:14 PM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #6
RE: No walking caster npc when attack
Code:
on=@spellcast
local.stam=<src.stam>
stam=0
cast <argn1>
stam=<local.stam>
return

This isn't tested, but might work? That is based on CapObvious.

If that doesn't work I would do...

Code:
on=@spelleffect
tag.spellcast.stam=<src.stam>
serv.newitem=i_memory_caster_freeze, ,<uid>   // Bounce the item to caster
new.timer=<argn3>
stam=0
return 0    // Might not need this.

[itemdef i_memory_caster_freeze]
id=i_memory
name=freeze caster memory

on=@create
timer=-1   // This should get updated by the spellcast trigger

on=@timer
cont.stam=<tag.spellcast.stam>
cont.tag.spellcast.stam=
remove
return 1

Again, nothing to test in front of me. Ideas though Big Grin
(This post was last modified: 03-25-2012 11:58 PM by Khaos.)
03-25-2012 11:56 PM
Find all posts by this user Like Post Quote this message in a reply
sco
Apprentice
*

Posts: 38
Likes Given: 0
Likes Received: 3 in 1 posts
Joined: Mar 2012
Reputation: 7

Elantharil

Post: #7
RE: No walking caster npc when attack
I'd do it something like this way:

Code:
on=@spellcast
tag.nomovetill = <eval <serv.spell.<argn1>.casttime>+<serv.time>>
cast <argn1>

tag.nomovetill stops movement on every mobile until the timestamp in this tag
03-26-2012 08:10 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #8
RE: No walking caster npc when attack
In the sphere.ini you should try to set this flag

// MAGICF_FREEZEONCAST = 0x0000020 // No movement whilst casting

MagicFlags=020
(This post was last modified: 03-26-2012 11:07 PM by darksun84.)
03-26-2012 11:05 PM
Find all posts by this user Like Post Quote this message in a reply
CptObvious
Apprentice
*

Posts: 27
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #9
RE: No walking caster npc when attack
I tried with the stamina solution: well, it works BUT there is the automatic stats regeneration ruining everything xD

I tried the nomovetill too and it seems to work! (<eval <<serv.time> + 100> for a 10 second time "froz")




EDIT:
Hey this nomovetill really is a surprise! Thank you mr. SCO for the discover!

Messing scripts on DNA Shard (ita) : P
(This post was last modified: 03-27-2012 02:54 AM by CptObvious.)
03-27-2012 02:35 AM
Find all posts by this user Like Post Quote this message in a reply
Vendetta
Apprentice
*

Posts: 39
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #10
RE: No walking caster npc when attack
speedmode=4 STOP
speedmode=0 NORMAL
speedmode=1 WALK & RUN AS MOUNTED (even if is not mounted)
speedmode=2 ALWAYS WALK
speedmode=3 ALWAYS RUN (unmounted speed)
(This post was last modified: 03-27-2012 04:13 AM by Vendetta.)
03-27-2012 04:13 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)