Page 3 of 3
Re: Dispel Gate
Posted: Fri Jul 03, 2009 12:17 am
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.
Re: Dispel Gate
Posted: Fri Jul 03, 2009 12:41 am
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...
Re: Dispel Gate
Posted: Fri Jul 03, 2009 9:13 pm
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.
Re: Dispel Gate
Posted: Fri Jul 03, 2009 9:21 pm
by Mephistopheles
Feel free to post that code with an explanation for us less code-savvy folks.
Re: Dispel Gate
Posted: Fri Jul 03, 2009 9:47 pm
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.
Re: Dispel Gate
Posted: Fri Jul 03, 2009 9:50 pm
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.
Re: Dispel Gate
Posted: Sat Jul 04, 2009 5:05 am
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.
Re: Dispel Gate
Posted: Sat Jul 04, 2009 5:38 am
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.
Re: Dispel Gate
Posted: Sat Jul 04, 2009 5:46 am
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.
Re: Dispel Gate
Posted: Sat Jul 04, 2009 1:45 pm
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.
Re: Dispel Gate
Posted: Sat Jul 04, 2009 2:23 pm
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.
Re: Dispel Gate
Posted: Tue Jul 07, 2009 11:23 pm
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.
Re: Dispel Gate
Posted: Tue Jul 07, 2009 11:28 pm
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.
Re: Dispel Gate
Posted: Tue Jul 07, 2009 11:32 pm
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.
Re: Dispel Gate
Posted: Wed Jul 15, 2009 2:16 pm
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.