It is currently Mon Dec 01, 2008 12:02 pm

All times are UTC - 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: New member: who.minions
PostPosted: Fri Nov 17, 2006 2:13 pm 
Offline
User avatar

Joined: Tue Feb 07, 2006 10:40 am
Posts: 17
Location: Palermo, Italy
A member wich returns a list of all the creatures tamed by characters [creature.setmaster(who)];

It would be usefull when characters lose their creatures and we need to give them a reference for release them or whatever

_________________
Image
VenuS Scripter [Hosted by M4D]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 3:38 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 843
Location: Bowling Green, KY
That's what OSI has the "ball of pet summoning" that is special loot you can find and charge for. Nice idea without having server support directly (script based).

Aside from that you can also use cprops of them in the taming system and tamed ai's to handle that effectively enough.

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 4:01 pm 
Offline
User avatar

Joined: Tue Feb 07, 2006 10:40 am
Posts: 17
Location: Palermo, Italy
Yes I know, but a member it's a little bit "clean" and faster for usage :P

_________________
Image
VenuS Scripter [Hosted by M4D]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 4:13 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 430
Location: San Diego, California
you're wrong, cprops are cleaner in this situation and just as fast.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 4:55 pm 
Offline
User avatar

Joined: Tue Feb 07, 2006 10:40 am
Posts: 17
Location: Palermo, Italy
Mmmh.. Why?
A cprop should be cleaned when a mob die and references should be loaded through SystemFindObjectBySerial() in a member it's all done server side

Or I'm wrong?

_________________
Image
VenuS Scripter [Hosted by M4D]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 18, 2006 10:18 am 
Why is it 'cleaner'? A dozen reasons:

First, is this: Who is to say that anyone really wants -all- NPCs that have had npc.SetMaster(who); called to show up on who.minions? I know I use .SetMaster() on NPCs that I would never want to show up in my lists of pets or other such NPCs. I also have NPCs that have NOT had .SetMaster() called show up on some such lists. A scripted system lets me control exactly how and what shows up on what lists - and lets me easily create separate lists with separate criteria for inclusion, in fact.. making the scripted system much 'cleaner'.

Oh.. and the other thing that makes the scripted system 'clean' is that I have a single include file that handles all of the registering, unregistering and listing of NPCs, for all the various groups.

Code:
function RegisterNPC(npc, master, type)
    var npcs := GetObjProperty(master, "#npcs_"+type);
    ...etc... add/verify the NPC on the list...
endfunction

function UnRegisterNPC(npc, master, type)
    var npcs := GetObjProperty(master, "#npcs_"+type);
    ...etc... Remove the NPC from the list...
endfunction

function ListRegisteredNPCs(master, type)
    var npcs := GetObjProperty(master, "#npcs_"+type);
    ...etc... verify each NPC still exists, then list it...
endfunction



This, incidentally, was one reason I had recently requested method scripts for mobiles, including PCs; So that a custom implementation of adding, removing and listing NPCs could be tied directly to the PC instance, rather than in an include file. But in the meantime, the include works fine, too.


Top
  
 
 Post subject:
PostPosted: Sun Nov 19, 2006 4:12 am 
Offline

Joined: Sun Mar 05, 2006 7:25 am
Posts: 118
Location: Italy
I agree with marilla, no need for such a hardcoded method, cprops and scripts con do it quite well and hopefully scripted mobiles methods will do it even better


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users 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