PenUltima Online

It is currently Mon Oct 06, 2008 3:48 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Support realm for SetAnchor()
PostPosted: Thu May 15, 2008 1:37 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 103
Location: Montreal, Canada
Yeah, I was wondering if it was already supported and if yes, nevermind.

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 18, 2008 5:31 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl