Telekinesis

For ideas on how to make Second Age a better shard. Can it get any better? Maybe.
Forum rules
Posts in this forum are expected to be constructive, realistic and civil. Inflamatory or off topic posts will be removed.
User avatar
Ronald McDonald
Posts: 41
Joined: Sat Jul 26, 2008 10:48 am

Telekinesis

Post by Ronald McDonald »

You use to be able to use this on potions,food,lanterns,torches,books,ale,scrolls ect.. not just on doors and chests.

User avatar
MatronDeWinter
UOSA Donor!!
UOSA Donor!!
Posts: 7249
Joined: Wed Mar 04, 2009 3:35 am
Location: 你的錢包

Re: Telekinesis

Post by MatronDeWinter »

I have noticed that you cant telekenesis the back side of a locked door. (It should say "you open the door from the inside" or whatever)

User avatar
Populus
Posts: 2223
Joined: Tue Jul 14, 2009 8:01 am
Location: Sweden

Re: Telekinesis

Post by Populus »

You should also be able to telekinesis the hatch on a boat, now it says "That is not accessible".
ImageImageImage
[cA]

Fwerp
UOSA Subscriber!
UOSA Subscriber!
Posts: 626
Joined: Wed Feb 04, 2009 12:23 am

Re: Telekinesis

Post by Fwerp »

You should also be able to telekinesis a guildstone as well.

User avatar
MatronDeWinter
UOSA Donor!!
UOSA Donor!!
Posts: 7249
Joined: Wed Mar 04, 2009 3:35 am
Location: 你的錢包

Re: Telekinesis

Post by MatronDeWinter »

So basically telekenesis should be just like a double-click, only without the range check. Well with a spell-casting range/LOS check, but not the use-range.

Truksama
UOSA Donor!!
UOSA Donor!!
Posts: 54
Joined: Wed Mar 31, 2010 7:17 am
Location: Northern Territories

Re: Telekinesis

Post by Truksama »

MatronDeWinter wrote:So basically telekenesis should be just like a double-click, only without the range check. Well with a spell-casting range/LOS check, but not the use-range.
I think this is correct, yes.
(3:57:45 PM) Onslaught: i like dicks
(3:57:48 PM) Onslaught: so IronfistMax is OK
(3:57:52 PM) IronfistMax: Gross
(3:57:54 PM) Onslaught: fuck
(3:57:56 PM) Onslaught: that came out wrong

User avatar
Faust
Posts: 6247
Joined: Mon Sep 22, 2008 7:01 pm

Re: Telekinesis

Post by Faust »

Simply look at the Original OSI code for the spell.

Stuck
UOSA Donor!!
UOSA Donor!!
Posts: 324
Joined: Mon Aug 10, 2009 9:25 pm

Re: Telekinesis

Post by Stuck »

I looked at the demo code for telekinesis and interpreted it as best I could. After looking at all the functions and trying to figure out exactly what they did, I commented every line that calls a function, attempting to explain what that function does:

(Keep in mind, I'm not 100% sure this is exactly what these functions do. This is just what I gathered from looking at the code for each function.)

Code: Select all

on targetobj(object user, object usedon)
{
  if(!Q4C8(user, this)) //makes sure the user is allowed to target and doesnt currently have a target??
  {
    return(0x01);
  }
  if(usedon == NULL()) //returns if nothing is targeted - most likely if "esc" is pressed and the targeting is canceled
  {
    return(0x00);
  }
  if(!Q4CU(user, usedon)) //checks to make sure the targeted object "is valid" and is in line of sight
  {
    return(0x00);
  }
  if(Q5UM(user, usedon, 0x0C)) //checks line of sight again, also checks distance - if the object is further than 12 tiles away it returns
  {
    if(!Q5YC(user, this)) //checks to make sure the telekinesis scroll is in a container if youre using a scroll, otherwise checks for necessary reagents
    {
      return(0x00);
    }
    if(Q4LT(user, getLocation(usedon), this)) //reveals you if hidden, makes sure spell casting is allowed at that location, determines whether the cast is a success, reduces mana if successful
    {
      Q4ML(user, usedon); //called when a target is valid, look below
    }
    else
    {
      Q4RD(user); //causes the spell to fizzle if the cast was not successful
    }
  }
  return(0x00);
}

function integer Q4ML(object user, object usedon) //called if the cast is successful and the target is valid
{
  integer Q5NC = 0x00;
  if(Q4CU(user, usedon)) //another check to make sure the targeted object "is valid" and is in line of sight
  {
    location Q4VS = getLocation(user);
    location there = getLocation(usedon);
    faceHere(user, getDirectionInternal(Q4VS, there)); //makes you face the item
    doLocAnimation(getLocation(usedon), 0x376A, 0x09, 0x20, 0x00, 0x00); //does the sparkly animation near the targeted item?
    sfx(there, 0x01F5, 0x00); //makes the telekinesis sound
    useItem(user, usedon); //this would be the most important function were looking for
    Q5NC = 0x01;
  }
  Q5UQ(this); //shortcallback
  return(Q5NC); //returns 1 if successfully cast and 0 otherwise, but this is seemingly irrelevant because when this is called by ontargetobj, it ignores the return value
}
I couldn't find any code in the scripts for useItem(). I'm guessing it does just what it says.

The only function that made me question whether telekinesis is just like double clicking something from range was the Q4CU function, which runs the isValid() function on the targeted item:

Code: Select all

function integer Q4CU(object user, object usedon)
{
  if(!isValid(usedon)) //checks to see if the targetted item "is valid"? my guess is this checks to see if the item actually exists
  {
    return(0x00);
  }
  if(!canSeeObj(user, usedon)) //checks line of sight
  {
    systemMessage(user, "Target can not be seen");
    return(0x00);
  }
  return(0x01);
}
I couldn't find any code for the isValid() function either. My guess was is that it checks to make sure the targeted item actually exists, but I'm not sure.

User avatar
Faust
Posts: 6247
Joined: Mon Sep 22, 2008 7:01 pm

Re: Telekinesis

Post by Faust »

Those are probably core functions that would have to be read in assembly by Batlin.

Stuck
UOSA Donor!!
UOSA Donor!!
Posts: 324
Joined: Mon Aug 10, 2009 9:25 pm

Re: Telekinesis

Post by Stuck »

I spoke to Batlin about the isValid() and useItem() functions above. He told me that isValid() only checks to see if an item exists. He also said that, more or less, useItem() would be the same as double-clicking an item.

I'll mess around on the demo to see exactly how and what telekinesis works on.

Hicha
UOSA Donor!!
UOSA Donor!!
Posts: 2264
Joined: Tue May 05, 2009 10:03 am
Location: out selling permits

Re: Telekinesis

Post by Hicha »

Everyone is a programmer.
Image
"I consider most of you NPC's that inhabit the single player game that I am here to enjoy." - MatronDeWinter

User avatar
Derrick
Posts: 9004
Joined: Thu Dec 13, 2007 7:49 pm
Location: Cove
Contact:

Re: Telekinesis

Post by Derrick »

WHile useItem() would be the same as double clicking it, a house door then does a special check to see which side of the door you are on. That file may prove interesting in regards to this.
Image
"The text in this article or section may be incoherent or very hard to understand, and should be reworded if the intended meaning can be determined."

User avatar
prosonic
UOSA Subscriber!
UOSA Subscriber!
Posts: 340
Joined: Tue Dec 16, 2008 10:43 am
Location: Australia

Re: Telekinesis

Post by prosonic »

we used to use Telekinesis to steal ore off boats by combining it just like a double click
[22:41:17] <Braden> Prosonic: If you get drunk and cause trouble here, I am banning ian for life.

User avatar
Robbbb
UOSA Donor!!
UOSA Donor!!
Posts: 2067
Joined: Sat Jul 10, 2010 10:51 pm

Re: Telekinesis

Post by Robbbb »

prosonic wrote:we used to use Telekinesis to steal ore off boats by combining it just like a double click
https://groups.google.com/forum/#!searc ... 0yHINT-SMJ

12/21/1998
cast telekinesis, target the orepile you want to steal, target the 1 or
more ore on your own boat and voilá, the ore on the target boat is
combined into your stack.


https://groups.google.com/forum/#!searc ... HHCJoaE7EJ


9/21/1999
> can another person steal ore off my boat by using their plank? or use
> telekinesis?

Defintally. I set myself up and watched this happen. All the goon needs to
do is have the ore on the plank or manage to drop the ore on the deck and
then use telekenisis to double-click your pile and combine it with his.

Roser
UOSA Subscriber!
UOSA Subscriber!
Posts: 3367
Joined: Sat Jan 30, 2010 12:01 am
Location: In your tree house with binoculars
Contact:

Re: Telekinesis

Post by Roser »

Great thread! and nice find rob!
Image

Post Reply