Telekinesis
Posted: Mon Jun 07, 2010 2:43 pm
You use to be able to use this on potions,food,lanterns,torches,books,ale,scrolls ect.. not just on doors and chests.
A forum for discussion of Second Age UO Shard
http://forums.uosecondage.com/
I think this is correct, yes.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.
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
}
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);
}
https://groups.google.com/forum/#!searc ... 0yHINT-SMJprosonic wrote:we used to use Telekinesis to steal ore off boats by combining it just like a double click
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.
> 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.