Author Topic: Dual Functionality Spell: Premonition & Teleport ?  (Read 351 times)

Legacy_diagnull

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Dual Functionality Spell: Premonition & Teleport ?
« on: January 20, 2011, 07:05:53 pm »


               Ran across this on youtube: www.youtube.com/watch

Anyone know anything more about this? I've always though teleport, even a limited line-of-sight way like this, would be cool to have. Didn't see any info on the vault for it though, so I wonder how it's done.
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Dual Functionality Spell: Premonition & Teleport ?
« Reply #1 on: January 20, 2011, 08:33:15 pm »


               We have all the teleport spells coded on ArgetumRegio, from BLINK to the coveted Teleport Without Error - even down to planar limits. It is all just script.



Be well. Game on.

GM_ODA

66.232.100.90 cep2.1 or better

aldohral.forumotion.com

24x7 we bring the game.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Dual Functionality Spell: Premonition & Teleport ?
« Reply #2 on: January 20, 2011, 08:44:36 pm »


               This is a pretty easy one to do.

1. Edit spells.2da, line 134 (premonition spell).  Set the TargetType column to 0x0D. This will allow targeting of the caster, an item, or the ground.  Oh, and change the entry for the Range column to "L" (long range).

2. In the toolset, edit NW_S0_Premo (the script for the premonition spell).  You'll have to play around a bit, but essentially you'll want to create a "split" spell script:

Very rough code snippet, not tested, definitely not complete:

object oTarget = GetSpellTargetObject();
if (oTarget = OBJECT_SELF)
   {
   // default premonition coding can go here
   }
else if (GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
   {
   // items-specific coding can go here
   }
else
   {
   // really basic coding for "teleportation"
   location lTarget = GetSpellTargetLocation();
   ActionJumpToLocation(lTarget);
   }

               
               

               


                     Modifié par The Amethyst Dragon, 20 janvier 2011 - 08:53 .
                     
                  


            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Dual Functionality Spell: Premonition & Teleport ?
« Reply #3 on: January 20, 2011, 09:43:51 pm »


               

diagnull wrote...

Ran across this on youtube: www.youtube.com/watch

Anyone know anything more about this? I've always though teleport, even a limited line-of-sight way like this, would be cool to have. Didn't see any info on the vault for it though, so I wonder how it's done.


He tells you how he did it but there is a lot of other ways to do some of this as well. There is a good teleport system on the vault (actually there is two) that add some great functions such as Blink, Teleport Part, and Word of Recall. Check it out when you get a chance as just reading it helped us write our own.
               
               

               
            

Legacy_Dae-Glyth

  • Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Dual Functionality Spell: Premonition & Teleport ?
« Reply #4 on: June 12, 2012, 03:25:01 pm »


               I created this '<img'>  sorry for the late response.  I'd be glad to share my code if still interested... I'd have to dig it up somewhere.  I have other videos on youtube, too.


It's been a very long time since I touched this, though.  I think there are issues with changing how spells are allowed to be targeted.  You have to change the spells 2da to do this, but clients will not gain the functionality unless they have your same spells 2da override, if memory serves.

So the spell has to be one that already is self and area targetable.
               
               

               


                     Modifié par Dae-Glyth, 12 juin 2012 - 02:28 .