PenUltima Online

It is currently Sun Sep 07, 2008 1:04 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: define regions by script
PostPosted: Fri Nov 10, 2006 6:18 am 
Offline

Joined: Sun Mar 05, 2006 7:25 am
Posts: 118
Location: Italy
What about the ability to define by script regions (with size multiple of blocks, like the config defined areas) with their enter scripts and exit scripts?
Do you like the idea? Devs, would it be too heavy in performance? Of course it would be an optional thing, no need to use them in one doesn't need them. And of course config defined will stay since they give better performance.
What's the use of them? Well, say you want to temporarily define a region where characters enter and suffer some damage each amount of time... the examples could me many. Creating walkon tiles for a medium size area (say 100 x 100) would be possible, but at what price?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 10, 2006 7:26 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 750
Location: Chicago, IL USA
There are already enter and exit scripts for regions.

Just put as the enter script a script that checks their XYZ (to make sure they havent exited in any way), then loop with damage, if XYZ isnt in the region, return.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 11, 2006 5:19 am 
Offline

Joined: Sun Mar 05, 2006 7:25 am
Posts: 118
Location: Italy
I suspect you didn't read the whole post :?
I'm talking about dynamic script defined regions. I know there are already regions, but the only way to have dynamic reagions with the actual system is to define hundreds of static regions and check cpropc which enable or disable them... which is pure madness
What I'm suggesting is a system to create and delete regions by script
Im my example alk about a TEMPORARY region damaging the charcter inside it. in an arbitrary position, choosen by the staff on the fly. Something like... .addtempdmgregion -> TargetCoordinates() -> AddRegion(region_name, x1, y1, x2, y2, enter_script, exit_script)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 11, 2006 10:14 am 
Offline

Joined: Wed Aug 30, 2006 5:24 pm
Posts: 82
Location: Italy
Yes... not a evil thing.....

_________________
Admin/Scripter Innominabile
ZuluHotelItalia shard on m4d


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 11, 2006 11:47 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
Lagoon wrote:
I suspect you didn't read the whole post :?
I'm talking about dynamic script defined regions. I know there are already regions, but the only way to have dynamic reagions with the actual system is to define hundreds of static regions and check cpropc which enable or disable them... which is pure madness
What I'm suggesting is a system to create and delete regions by script
Im my example alk about a TEMPORARY region damaging the charcter inside it. in an arbitrary position, choosen by the staff on the fly. Something like... .addtempdmgregion -> TargetCoordinates() -> AddRegion(region_name, x1, y1, x2, y2, enter_script, exit_script)


Or use a central system to control this with a core that the player attaches to for it. If you look in older distros at the AttributeCore, that would give you an example.

A script is fired at logon to check such things. When it "updates" it can check either a global cprop for regions, etc, or the script can contact a core system script (like AttributeCore does) to get updates/regions. Similar fashion, and pretty easy to implement without insane work. The global prop can even contain the scriptname to fire for enter/exit/walkin, etc for this if each region is stored as a Struct or Dict. Pretty basic really. I had that exact setup for a global tournament system I made in 095 on IC and LS that ran pretty decent for maze matches, tournaments, and so forth. Even controlled no looting, no damage, etc.

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 12, 2006 5:23 am 
Offline

Joined: Sun Mar 05, 2006 7:25 am
Posts: 118
Location: Italy
Ok, that's what I was planning to do in case no core support could be provided. I'll try this and do some benchmarks...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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