Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
hpoonis2010
Adept


Joined: 18 Jun 2019
Posts: 279

PostPosted: Tue Mar 08, 2022 12:35 pm   

Client Anomaly?
 
I have portals. Names are eg.:

takeda
bonds
adaldar
reme
immhomes
academy
...
etc

Aside from the specific data: name & exit, all the portals have the same parameters: valid zone, cost. I am curious as to 'Valid Zone' and what that means. However, this is not the question.

I have portal equipment from the MUD, a specific portal item, going to a MUD destination. Each item has a unique id number (10-digits). Eg., 2178928380 (immhomes)
I have portal aliases and each has the same name as the mapper portal name (academy, immhomes, etc)
I have portal VARS with the same name as the portal and alias, containing the 10-digit item number.

To cap it all I have shortnames for each zone which (in almost all cases) are the same as the portal name. There is no problem here as it means I can use the client #WALK to take a route to a zone or just use the alias to portal. The reason for this is that the portal destinations are not always the same as the zone 'start' room. In a few cases, the zone has more than one entry point and thus no 'start' room.

The alias code is exactly the same for all portals:-
Code:
$portalItem=@Portal_VARS/bonds
$portbag=@portalBag

#IF (%match($portalItem,@char_EQ_VARS/currentEQ.portal)) {enter} {
  get $portalItem $portbag
  wear $portalItem
  enter
  dress portal

  put $portalItem $portbag
  }

and
Code:
$portalItem=@Portal_VARS/immhomes
$portbag=@portalBag

#IF (%match($portalItem,@char_EQ_VARS/currentEQ.portal)) {enter} {
  get $portalItem $portbag
  wear $portalItem
  enter
  dress portal

  put $portalItem $portbag
  }


Portal items must be held to enable their use. Hold item and then 'enter'.

CurrentEQ is a dbvar for each wearable location (eyes, hands, etc). Among these is a PORTAL wearable slot and I keep one of (currently) two for permanent wear. Immhomes item is from level 1-179 and the 'takeda' portal from 179-. They have a bunch of useful stat increases so is a free slot of extra char stats (int, wis, etc).

#WALKs will auto-use these portal items, so a walk may consist of PORTAL dir dir dir dir real-destination, which is great as it reduces the MV cost. But, we don't want the WALK to use the same portal every time so the speedwalk gets an appropriate (I assume shortest distance to ultimate destination) portal out of my bag and uses that to reduce the walk. Whichever portal destination is the closest (nice logic).

So, I run a test to see if the currently held portal can be used. If so, don't look in the bag, just ENTER, otherwise pick one out.

And, when I had only the one permanent portal (immhomes), I had no problems at all. All worked fantastically.

Here is the problem:

Every other portal/alias/var works fine except the immhomes one. I have checked the portal item ID and it tallies fine. There are no extraneous references to this item. The only call to it comes from the alias with the same name. In every case, it tries to use the takeda portal item then continue the walk as though was already holding the correct item. If I specify that alias (immhomes) it still just enters and doesn't go in the bag. If I use the takeda alias, it just enters...any other and it gets the right item.

I checked the XML and all seems fine.

How is it that every other works but that one?

NOTE to self: I can reduce the VARS to a DBVAR with keyword as name and number values...and I could reduce the amount of code by using a function/call another alias with params.
Reply with quote
hpoonis2010
Adept


Joined: 18 Jun 2019
Posts: 279

PostPosted: Tue Mar 08, 2022 1:31 pm   
 
UPDATE:

I did reduce my code. Aliases are now just
Code:
$portalItem=@PortalVarsDB.adaldar
funcPortal $portalItem


and I am now using a DBVAR to store the item number.

I was still getting failures until I checked/reset the recall location. Now I seem to have fixed it all.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Wed Mar 09, 2022 2:24 am   
 
Sometimes remaking a specific alias will fix the issue, rather than just editing it.
_________________
Discord: Shalimarwildcat
Reply with quote
hpoonis2010
Adept


Joined: 18 Jun 2019
Posts: 279

PostPosted: Fri Mar 11, 2022 8:23 pm   
 
I had that glitch where the editor showed me the correct value but the XML had a different value.
Reply with quote
hpoonis2010
Adept


Joined: 18 Jun 2019
Posts: 279

PostPosted: Sun Mar 13, 2022 7:53 pm   
 
Still getting some 16s.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net