PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Support realm for SetAnchor()

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 84
Location: Montreal, Canada

PostPosted: Thu May 15, 2008 5:37 pm    Post subject: Support realm for SetAnchor() Reply with quote

Yeah, I was wondering if it was already supported and if yes, nevermind.

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 168

PostPosted: Sun May 18, 2008 9:31 am    Post subject: Reply with quote

While I understand the possible usability of this (e.g. checking if NPC is in correct realm or lured into another), I don't know if this is worth implementation.

See, as far as I know, anchor is only checked when NPC is walking in peacemode. If so happens and the NPC somehow walks into the "wrong" realm, what exactly did you think the anchor should do? The way I see it, should this feature be added, the NPC wouldn't be able to move if anchored into another realm. Thus the question I'd like to get a answer to is, what possibilities would a scripter get out from this?

I can only think of this:

Code:

// snippet from NPC's AI script
var anchorrealm := "britannia";

---
    /*
        Instead of this...
    if (me.realm != anchorrealm)
        TeleportToAnchor();
    else
        Wander();
    endif
   
         Script could be...
    */

    if (!Wander())
        // Moving failed!
        if (me.realm != anchorrealm)
            TeleportToAnchor();
        endif
    endif


So this would ideally save, what, a one if-statement? IF NPC's current anchor could be read somehow (npc.anchor or NPC::GetAnchor()), scripter wouldn't have to save the anchor into a cprop (or in a variable in the script like in the example), but as it is now, I don't get the benefits.

Not saying this is a bad idea, maybe I just did not understood it properly. If so, could someone put me right?

Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty