Dispel Gate

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.
noxmonk
UOSA Donor!!
UOSA Donor!!
Posts: 573
Joined: Tue Apr 14, 2009 2:29 am

Re: Dispel Gate

Post by noxmonk »

I'm pretty sure there's someone out there with a screenshot video of going through a brit GY gate, only to get parafielded with no return gate on that side. It was a great way to PK the newbie-reds who would be running from a pack of 55 swords pack of angry bluebies and just gate-hop right into your loving bosom.

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

Re: Dispel Gate

Post by Faust »

Mephistopheles wrote:That's dated to the modern version of UO. If you actually went through and played the demo until you had enough Magery to gate, please record yourself.
Read much?

Faust wrote: The demo code for the dispel field spell looks to me like it will only remove the gate that is targeted. This obviously means that the way it works on here is entirely incorrect.
FYI, I have a hacked version of the demo and can also hack the memory changing multiple values such as gold piles into a maximum amount allowed for the pile... However, this isn't required since its simply easier to browse the decompiled code file and see that it only dispels one side of the gate in the code file itself...

User avatar
Alex21
UOSA Donor!!
UOSA Donor!!
Posts: 473
Joined: Tue Dec 18, 2007 10:53 pm
Location: Australia

Re: Dispel Gate

Post by Alex21 »

Kraarug wrote:That's the way it worked in 1999. If one side got dispelled, there was no way back.

It was pretty useful against gate jumpers. We'd cast gates, dispel the side we were on, and just wait for a jumper to go through...

Lewting would proceed shortly.
Yeh but orcs are gay dude.
The First Player Of UO Second Age.
Image

Mephistopheles
UOSA Donor!!
UOSA Donor!!
Posts: 631
Joined: Sat Mar 29, 2008 3:55 am
Location: The 9th Circle of Hell

Re: Dispel Gate

Post by Mephistopheles »

Feel free to post that code with an explanation for us less code-savvy folks.
Image

At least change the angle so people can't see where my characters are. Fire/IPBan anyone who plays my characters too plz. KThxBai.

Kraarug
UOSA Donor!!
UOSA Donor!!
Posts: 1448
Joined: Tue Dec 16, 2008 2:46 pm

Re: Dispel Gate

Post by Kraarug »

Alex21 wrote:
Kraarug wrote:That's the way it worked in 1999. If one side got dispelled, there was no way back.

It was pretty useful against gate jumpers. We'd cast gates, dispel the side we were on, and just wait for a jumper to go through...

Lewting would proceed shortly.
Yeh but orcs are gay dude.
This was on OSI, way before I started playing an orc.

You are welcome to come to the fort sometime. I'll help you develop another opinion about orcs in short order.
Image

User avatar
Alex21
UOSA Donor!!
UOSA Donor!!
Posts: 473
Joined: Tue Dec 18, 2007 10:53 pm
Location: Australia

Re: Dispel Gate

Post by Alex21 »

Kraarug wrote:
Alex21 wrote:
Kraarug wrote:That's the way it worked in 1999. If one side got dispelled, there was no way back.

It was pretty useful against gate jumpers. We'd cast gates, dispel the side we were on, and just wait for a jumper to go through...

Lewting would proceed shortly.
Yeh but orcs are gay dude.
This was on OSI, way before I started playing an orc.

You are welcome to come to the fort sometime. I'll help you develop another opinion about orcs in short order.
O but man, orc's are uber fags.
The First Player Of UO Second Age.
Image

User avatar
Batlin
wobble llama
wobble llama
Posts: 512
Joined: Fri Dec 19, 2008 4:32 am
Location: Ultima Universe

Re: Dispel Gate

Post by Batlin »

Feel free to post that code with an explanation for us less code-savvy folks.
There is too much going in so I'll just post the important parts from gatetravel and dispelfield

Gate travel:

Code: Select all

integer Q4K4(object user, object usedon)
{
  integer Q5NC = 0x00;
  integer Q4EI;
  location Q4VS = getLocation(user);
  object caster = user;
  location dest = Q42F(Q4VS); // NOTE: Q42F just returns its parameter without doing anything with it
  faceHere(user, getDirectionInternal(Q4VS, dest));
  object Q55F = usedon;

  // Get the location of the player
  Q4VS = dest;

  // Get the destination from the rune
  location destination = getObjVar(Q55F, "markLoc");
  if(Q50L(destination) && Q50M(destination) && Q50L(dest) && Q50M(dest) && (!Q46L(dest)))
  {
    // Create the gate at your own position
    object Q4R9 = createGlobalObjectAt(0x0F6C, dest);
    Q4VS = getLocation(Q4R9); // Odd, can Q4VS != dest after creation?
    if(isValid(Q4R9))
    {
      integer xPoint = getX(destination);
      integer yPoint = getY(destination);
      integer zPoint = getZ(destination);
      setObjVar(Q4R9, "xPoint", xPoint);
      setObjVar(Q4R9, "yPoint", yPoint);
      setObjVar(Q4R9, "zPoint", zPoint);

      // Attach 2 scripts : opengate and destroy
      // opengate: does the actual gate-travelling
      // destroy: handles event 0x1E and destroys the gate when called
      attachScript(Q4R9, "opengate");
      attachScript(Q4R9, "destroy");
     
      // in 0x1E seconds (30) raise event 0x1E (destroy script)
      callback(Q4R9, 0x1E, 0x1E);

      // Create the second gate (at the same location of the first gate)
      object Q4R8 = createGlobalObjectAt(0x0F6C, Q4VS);
      if(isValid(Q4R8))
      {
        xPoint = getX(Q4VS);
        yPoint = getY(Q4VS);
        zPoint = getZ(Q4VS);
        setObjVar(Q4R8, "xPoint", xPoint);
        setObjVar(Q4R8, "yPoint", yPoint);
        setObjVar(Q4R8, "zPoint", zPoint);
        setObjVar(Q4R8, "sourceGate", Q4R9);

        // Same stuff
        // Two "destroy" scripts are needed (one for source, one for destination)
        attachScript(Q4R8, "opengate");
        attachScript(Q4R8, "destroy");
        callback(Q4R8, 0x1E, 0x1E);

        // This callback will destroy both gates (using the sourceGate link) if target is at a 'multi'
        shortcallback(Q4R8, 0x00, 0x79);
        Q5NC = 0x01;
        sfx(Q4VS, 0x020E, 0x00);

        // Move gate to final destination
        integer Q46Q = teleport(Q4R8, destination);
      }
    }
    else
    {
      barkTo(caster, caster, "I will need more room to cast this next time!");
    }
  }
  else
  {
    systemMessage(caster, "You can not teleport from here to the destination.");
  }
  Q5UQ(this);
  return(Q5NC);
}
You notice: 2 objects are created (AT THE SAME LOCATION!!!), both objects get two scripts attached "destroy" and "opengate". Only the destination is linked with the source gate using an object variable "sourceGate". "sourceGate" is only used to destroy the gates if the target is at a house or boat (event 0x79 which is called in 0 ticks right after creation). Both gates will raise an event in 30 seconds after creation to destroy it.It's not one event for the two gates, it's two events; for each gate one. Important! it's the teleport call at the end of the code that moves the destination gate to its final target!

The dispel field code is much more basic:

Code: Select all

integer Q4JJ(object user, object usedon)
{
  integer Q5NC = 0x00;
  if(Q50G(usedon))
  {
    location Q4VS = getLocation(user);
    location there = getLocation(usedon);
    faceHere(user, getDirectionInternal(Q4VS, there));
    doLocAnimation(there, 0x376A, 0x09, 0x14, 0x00, 0x00);
    sfx(there, 0x0201, 0x00);
    if(hasScript(usedon, "destroy"))
    {
      deleteObject(usedon);
      Q5NC = 0x01;
    }
  }
  Q5UQ(this);
  return(Q5NC);
}
The dispel field faces the user to the "field", does some animation and if the target has the "destroy" script attached then it's deleted. Only one object gets destroyed, there is no code at all to destroy the "sourceGate", also note that the source gate never got linked with the destination gate.
+ORC: If you give a man a crack he'll be hungry again tomorrow, but if you teach him how to crack, he'll never be hungry again.
chumbucket: I don't collect pixels.

Never trust the client. It's in the hands of the enemy : UO Demo internals @ JoinUO

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

Re: Dispel Gate

Post by MatronDeWinter »

Looks like that solves it right there. Gate-trapping for everyone!

/I personally cannot run the demo but would be really interested in getting a copy of the decompiled version if it is available. Thanks.

User avatar
Batlin
wobble llama
wobble llama
Posts: 512
Joined: Fri Dec 19, 2008 4:32 am
Location: Ultima Universe

Re: Dispel Gate

Post by Batlin »

I personally cannot run the demo but would be really interested in getting a copy of the decompiled version if it is available. Thanks.
http://forum.uosecondage.com/viewtopic.php?f=5&t=8260
You don't need to be able to run the demo to decompile the scripts. But you still need the DAT file that comes with the demo.
+ORC: If you give a man a crack he'll be hungry again tomorrow, but if you teach him how to crack, he'll never be hungry again.
chumbucket: I don't collect pixels.

Never trust the client. It's in the hands of the enemy : UO Demo internals @ JoinUO

TheDon
Posts: 76
Joined: Wed May 06, 2009 3:19 am

Re: Dispel Gate

Post by TheDon »

Jesus, that Galad page when he's talking to the three newbs at haven had me in stitches, nice headbands, you must be a gang? no..

God, im a geek.

User avatar
Hemperor
UOSA Subscriber!
UOSA Subscriber!
Posts: 4368
Joined: Sat Jul 19, 2008 9:15 am

Re: Dispel Gate

Post by Hemperor »

Any chance we could see an already decompiled demo posted up? Never done any decompiling myself, although I have programming experience as I'm sure many others here do as well..I really think a couple of the players here could scour through all the code easily and find a few things.
Image

[22:26] <ian> why am i making 3750 empty kegs
[22:27] <ian> 1125000 for 3750 empty kegs
----------------------------------------
[10:44] <ian> a good cat is a dead cat

Wernham Hogg
Posts: 36
Joined: Tue Jul 07, 2009 1:26 pm

Re: Dispel Gate

Post by Wernham Hogg »

I know for sure that during some ERA i used to gate to my house, then dispel the gate when i went through it to make sure people didnt follow.

I also remember clearly how we used to dispel gates coming to LL-rooom so the gater couldnt enter.

So people saying that they've never dispelled on both sides are wrong.

Im 100% sure on this.

Could be it was pret2a or very early UOR.

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

Re: Dispel Gate

Post by Derrick »

Wernham Hogg wrote:I know for sure that during some ERA i used to gate to my house, then dispel the gate when i went through it to make sure people didnt follow.

I also remember clearly how we used to dispel gates coming to LL-rooom so the gater couldnt enter.

So people saying that they've never dispelled on both sides are wrong.

Im 100% sure on this.

Could be it was pret2a or very early UOR.
This is my memory too and it was put in initially on what I belived to be a very very solid memory. However, I'm definately starting to doubt myself based on what has been presented.

Wernham Hogg
Posts: 36
Joined: Tue Jul 07, 2009 1:26 pm

Re: Dispel Gate

Post by Wernham Hogg »

Derrick wrote:
Wernham Hogg wrote:I know for sure that during some ERA i used to gate to my house, then dispel the gate when i went through it to make sure people didnt follow.

I also remember clearly how we used to dispel gates coming to LL-rooom so the gater couldnt enter.

So people saying that they've never dispelled on both sides are wrong.

Im 100% sure on this.

Could be it was pret2a or very early UOR.
This is my memory too and it was put in initially on what I belived to be a very very solid memory. However, I'm definately starting to doubt myself based on what has been presented.
Im not doubting myself when it comes to this.
Like i said, im 100% sure about this.
The 2 scenarios i mentioned above is something i did on daily basis.

However, i cannot argue when it was. Cause im not 100% sure it was during T2A.
But the people saying it was never in are wrong.

Xukluk Tuguznal
Posts: 416
Joined: Wed Oct 15, 2008 9:38 am
Location: Orcish Killing Fields
Contact:

Re: Dispel Gate

Post by Xukluk Tuguznal »

I remember it dispelling one side up until somewhere of AoS.

Even with one side closed you could still go from the open side. You just couldn't go back because the side you traveled to would be closed.
Tforc YM wrote: if you are over 24 though do not apply because i dont like nerdy people who dont get there lifes past uo. also if you do not have a microphone or vent then i can not make you into a good player, sorry , dont apply.

Post Reply