Author Topic: Please fix this...#2  (Read 13382 times)

0 Members and 1 Guest are viewing this topic.

Offline Zsijn

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Please fix this...#2
« on: October 01, 2012, 07:31:51 pm »
my wand remembered its location all of 2 seconds...

get wand
You drop a Magic Return wand.

1749H 40448M 24482V (4) 3,716,416,463TNL>You pick up a Magic Return wand.

1752H 40448M 24482V (4) 3,716,416,463TNL>
The wand glows momentarily in your hand, memorizing the location.

1755H 40448M 24482V (4) 3,716,416,463TNL>z
You grab the Mjollnir thunder hammer.

1755H 40448M 24482V (4) 3,716,416,463TNL>
The Return Wand no longer remembers its location.

1764H 40451M 24485V (4) 3,716,416,463TNL>
You stump Thor's hammer on the ground and disappear into the lighting.
Path
[ Exits: n e w u ]
This is a narrow, but well trodden path, leading between the Fisherman's
village and the pier to the harbour.  Lining the path you see several
fishing-tools, a couple of small dinghies, resting upside down on the
ground, and some fishing-nets hanging to dry.  Ocean Street is directly to
your west.

Offline Calypso

  • Administrator
  • Full Member
  • *****
  • Posts: 133
    • View Profile
    • Email
Re: Please fix this...#2
« Reply #1 on: October 03, 2012, 02:09:33 pm »
I have had similar things happen to me with the Magic Return Wand. I know a couple others have complained about this same issue, too.

Additionally, it seems to me that if one wand in the room forgets its location, everyone's wand in that room forgets its location.
I get my energy from my Inner G.

Offline Prometheus

  • the bang your head against the wall coder.
  • Administrator
  • Sr. Member
  • *****
  • Posts: 365
    • View Profile
Re: Please fix this...#2
« Reply #2 on: October 03, 2012, 07:14:17 pm »
Thotter or Graham will need to look at this since it seems to be an issue with the script. It might be an issue with dg scripts remembering variables then it goes right to Thotter. Otherwise one of them need to look it over.

Prometheus.
« Last Edit: October 06, 2012, 10:55:27 am by Prometheus »

Offline Hayato

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Please fix this...#2
« Reply #3 on: October 04, 2012, 04:29:29 pm »
That's simply because the countdown variable does not reset when dropping the wand.  It only resets when the timer has completely run out.  I dunno if this was the intent or not, but I'm willing to fix it so it resets every time the wand is dropped if I get the go from Molly or Diandra.
aka graham

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: Please fix this...#2
« Reply #4 on: October 05, 2012, 01:37:50 am »
Go!

Offline Hayato

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Please fix this...#2
« Reply #5 on: October 05, 2012, 03:24:09 am »
Done

Also fixed the output error.  Seems you didn't know about the makeuid command.  Very useful in such a situation.  I've turned your previous while loop that checks everyone in the room if that held a return wand to send that message to all of those people (which is obviously wrong anyway) to the following two lines:

Quote
makeuid owner %self.val2%
%send% %owner% The Return Wand no longer remembers its location.

the wand's val2 variable was of course earlier set to %actor.id%
You cannot use %self.val2% as a replacement for %actor.id%.  This is because the val2 variable is precisely just a variable.  "makeuid" turns that variable back into a unique identifier that can interact with the rest of the script again.



Also fixed an issue that allowed players to hijack ownership of a wand they did not earn.  Kinda silly, since it is supposed to bind to a player.  It also means from now on, players will have to redo the quest themselves if they lose their wand.


and lastly, one question.  Is there any reason at all for the following?

Quote
elseif %actor.room.sector% == Space || %actor.room.sector% == Atmosphere || %actor.room.sector% == Sun || %actor.room.sector% == Black Hole || %actor.room.sector% == Air
  return 0
  wait 1s
  %send% %actor% The wand disappears into the darkness of Outer Space.
  wait 1s
  %send% %actor% Maybe the wand only works on dry land?
 %load% obj 9223 %actor%
  %purge% %self%

Just in case it is not clear, the two lines I highlighted is the item loading a second copy of itself, then purging itself.  I mean.. why?  Maybe I'm just dense and not seeing the point, but that seems entirely unnecessary to me.  Maybe just change the output to floating around uselessly, and skip the purge and load?
« Last Edit: October 05, 2012, 03:48:05 am by Hayato »
aka graham

Offline Zsijn

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Please fix this...#2
« Reply #6 on: October 05, 2012, 05:41:40 am »
its purging itself on the ground and then reloading in the person inventory rather than just vanishing into space/water/ect?

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Re: Please fix this...#2
« Reply #7 on: October 05, 2012, 12:50:33 pm »
Doesn't the return 0 stop the wand from being dropped in the first place which brings Hayato's question back, why the two lines?  Or am I wrong on the reason for the retun 0?

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: Please fix this...#2
« Reply #8 on: October 08, 2012, 01:43:58 am »
Just in case it is not clear, the two lines I highlighted is the item loading a second copy of itself, then purging itself.  I mean.. why?  Maybe I'm just dense and not seeing the point, but that seems entirely unnecessary to me.  Maybe just change the output to floating around uselessly, and skip the purge and load?

There are three different return items, one for dry land sectors, one for water sectors and one for space/air sectors, which is the main reason for the wand not working in space, but obviously I made a mistake with loading and purging a second copy.
Thanks for fixing it.

Perhaps you should also take a look at the hunting facon from Avalon, the scripts on that were set up in a similar way, and I think there may be similar bugs on them. The vnums of these scripts are 3929-3932.

Offline Prometheus

  • the bang your head against the wall coder.
  • Administrator
  • Sr. Member
  • *****
  • Posts: 365
    • View Profile
Re: Please fix this...#2
« Reply #9 on: October 08, 2012, 12:46:14 pm »
I have seen the falcon go poof as well on some players.

Prometheus

Offline Hayato

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Please fix this...#2
« Reply #10 on: October 09, 2012, 10:18:47 pm »
I'll try to take a look within this week
aka graham