Worlds of Carnage
It is currently Tue Apr 16, 2024 5:58:40pm

All times are UTC-04:00




Post new topic  Reply to topic  [ 17 posts ] 


 Post subject: an example of BS Zones?
PostPosted: Mon Jul 18, 2005 8:45:18pm 
Joined: Sun Apr 16, 2006 9:12:10pm
Posts: 2
Offline
Guess I never really understood the power or potential of scripting zones. Are there any help docs? Any examples that we could see?


Top
   

 Post subject: Re: an example of BS Zones?
PostPosted: Mon Jul 18, 2005 9:44:42pm 
User avatar
Implementor
Joined: Fri Oct 06, 2000 5:32:29pm
Posts: 288
Website: http://www.wocmud.org
Location: Ottawa, Canada
Offline
Quote:
Guess I never really understood the power or potential of scripting zones. Are there any help docs? Any examples that we could see?
Wel for instance properly randomizing the location of items in the cretan shark area so that players can't beeline to the key was done by using a BlobbieScript zone reset. Feel free to try and decipher for yourselves what is happening in the following zone BlobbieScript:
Code:
protect { static @whaleShark1 if( !%isValid( @whaleShark1 ) ) #@whaleShark1 = %load( mobile, 125205, 125206 ) #%setCharStat( @whaleShark1, npcGroup, 125206 ) endif static @largeShark1 if( !%isValid( @largeShark1 ) ) #@largeShark1 = %load( mobile, 125204, 125213 ) #%setCharStat( @largeShark1, npcGroup, 125207 ) endif //---- static @dolphin1 if( !%isValid( @dolphin1 ) ) #@dolphin1 = %load( mobile, 125217, 125218 ) #%setCharStat( @dolphin1, npcGroup, 125202 ) endif static @dolphin2 if( !%isValid( @dolphin2 ) ) #@dolphin2 = %load( mobile, 125217, 125223 ) #%setCharStat( @dolphin2, npcGroup, 125202 ) endif static @dolphin3 if( !%isValid( @dolphin3 ) ) #@dolphin3 = %load( mobile, 125217, 125204 ) #%setCharStat( @dolphin3, npcGroup, 125202 ) endif //---- static @lamprey1 if( !%isValid( @lamprey1 ) ) #@lamprey1 = %load( mobile, 125208, 125205 ) #%setCharStat( @lamprey1, npcGroup, 125210 ) endif static @lamprey2 if( !%isValid( @lamprey2 ) ) #@lamprey2 = %load( mobile, 125208, 125205 ) #%setCharStat( @lamprey2, npcGroup, 125210 ) endif static @lamprey3 if( !%isValid( @lamprey3 ) ) #@lamprey3 = %load( mobile, 125208, 125208 ) #%setCharStat( @lamprey3, npcGroup, 125210 ) endif static @lamprey4 if( !%isValid( @lamprey4 ) ) #@lamprey4 = %load( mobile, 125208, 125208 ) #%setCharStat( @lamprey4, npcGroup, 125210 ) endif static @lamprey5 if( !%isValid( @lamprey5 ) ) #@lamprey5 = %load( mobile, 125208, 125217 ) #%setCharStat( @lamprey5, npcGroup, 125210 ) endif static @lamprey6 if( !%isValid( @lamprey6 ) ) #@lamprey6 = %load( mobile, 125208, 125217 ) #%setCharStat( @lamprey6, npcGroup, 125210 ) endif static @lamprey7 if( !%isValid( @lamprey7 ) ) #@lamprey7 = %load( mobile, 125208, 125222 ) #%setCharStat( @lamprey7, npcGroup, 125210 ) endif static @lamprey8 if( !%isValid( @lamprey8 ) ) #@lamprey8 = %load( mobile, 125208, 125222 ) #%setCharStat( @lamprey8, npcGroup, 125210 ) endif static @lamprey9 if( !%isValid( @lamprey9 ) ) #@lamprey9 = %load( mobile, 125208, 125224 ) #%setCharStat( @lamprey9, npcGroup, 125210 ) endif static @lamprey10 if( !%isValid( @lamprey10 ) ) #@lamprey10 = %load( mobile, 125208, 125224 ) #%setCharStat( @lamprey10, npcGroup, 125210 ) endif static @lamprey11 if( !%isValid( @lamprey11 ) ) #@lamprey11 = %load( mobile, 125208, 125228 ) #%setCharStat( @lamprey11, npcGroup, 125210 ) endif static @lamprey12 if( !%isValid( @lamprey12 ) ) #@lamprey12 = %load( mobile, 125208, 125228 ) #%setCharStat( @lamprey12, npcGroup, 125210 ) endif //---- static @jellyfish1 if( !%isValid( @jellyfish1 ) ) #@jellyfish1 = %load( mobile, 125202, 125224 ) #%setCharStat( @jellyfish1, npcGroup, 125205 ) endif static @squid1 if( !%isValid( @squid1 ) ) #@squid1 = %load( mobile, 125203, 125228 ) #%setCharStat( @squid1, npcGroup, 125204 ) endif static @whale1 if( !%isValid( @whale1 ) ) #@whale1 = %load( mobile, 125210, 125200 ) #%setCharStat( @whale1, npcGroup, 125201 ) endif //---- static @stuff if( %isNull( @stuff ) ) { #@stuff->1 = 125218 #@stuff->2 = 125219 #@stuff->3 = 125220 #@stuff->4 = 125200 #@stuff->5 = -1 #@stuff->6 = 125221 #@stuff->7 = 125222 #@stuff = %arrayShuffle( @stuff ) } endif //---- static @greatWhite1 if( !%isValid( @greatWhite1 ) ) #@greatWhite1 = %load( mobile, 125212, 125215 ) #%setCharStat( @greatWhite1, npcGroup, 125207 ) endif static @limb1 if( !%isValid( @limb1 ) ) #@limb1 = %load( object, 125202, @greatWhite1 ) endif static @hand1 if( !%isValid( @hand1 ) ) #@hand1 = %load( object, 125210, @greatWhite1, hold ) endif static @treasure1 if( !%isValid( @treasure1 ) && !%isPc( %getOwner( @hand1 ) ) ) #@treasure1 = %load( object, @stuff->1, @hand1 ) endif //---- static @greatWhite2 if( !%isValid( @greatWhite2 ) ) #@greatWhite2 = %load( mobile, 125212, 125217 ) #%setCharStat( @greatWhite2, npcGroup, 125207 ) endif static @limb2 if( !%isValid( @limb2 ) ) #@limb2 = %load( object, 125202, @greatWhite2 ) endif static @hand2 if( !%isValid( @hand2 ) ) #@hand2 = %load( object, 125210, @greatWhite2, hold ) endif static @treasure2 if( !%isValid( @treasure2 ) && !%isPc( %getOwner( @hand2 ) ) ) #@treasure2 = %load( object, @stuff->2, @hand2 ) endif //---- static @greatWhite3 if( !%isValid( @greatWhite3 ) ) #@greatWhite3 = %load( mobile, 125212, 125209 ) #%setCharStat( @greatWhite3, npcGroup, 125207 ) endif static @limb3 if( !%isValid( @limb3 ) ) #@limb3 = %load( object, 125226, @greatWhite3 ) endif static @hand3 if( !%isValid( @hand3 ) ) #@hand3 = %load( object, 125210, @greatWhite3, hold ) endif static @treasure3 if( !%isValid( @treasure3 ) && !%isPc( %getOwner( @hand3 ) ) ) #@treasure3 = %load( object, @stuff->3, @hand3 ) endif //---- static @greatWhite4 if( !%isValid( @greatWhite4 ) ) #@greatWhite4 = %load( mobile, 125212, 125211 ) #%setCharStat( @greatWhite4, npcGroup, 125207 ) endif static @limb4 if( !%isValid( @limb4 ) ) #@limb4 = %load( object, 125227, @greatWhite4 ) endif static @hand4 if( !%isValid( @hand4 ) ) #@hand4 = %load( object, 125210, @greatWhite4, hold ) endif static @treasure4 if( !%isValid( @treasure4 ) && !%isPc( %getOwner( @hand4 ) ) ) #@treasure4 = %load( object, @stuff->4, @hand4 ) endif //---- static @greatWhite5 if( !%isValid( @greatWhite5 ) ) #@greatWhite5 = %load( mobile, 125212, 125213 ) #%setCharStat( @greatWhite5, npcGroup, 125207 ) endif static @limb5 if( !%isValid( @limb5 ) ) #@limb5 = %load( object, 125226, @greatWhite5 ) endif static @hand5 if( !%isValid( @hand5 ) ) #@hand5 = %load( object, 125210, @greatWhite5, hold ) endif static @treasure5 if( !%isValid( @treasure5 ) && !%isPc( %getOwner( @hand5 ) ) ) #@treasure5 = %load( object, @stuff->5, @hand5 ) endif //---- static @greatWhite6 if( !%isValid( @greatWhite6 ) ) #@greatWhite6 = %load( mobile, 125212, 125212 ) #%setCharStat( @greatWhite6, npcGroup, 125207 ) endif static @limb6 if( !%isValid( @limb6 ) ) #@limb6 = %load( object, 125227, @greatWhite6 ) endif static @hand6 if( !%isValid( @hand6 ) ) #@hand6 = %load( object, 125210, @greatWhite6, hold ) endif static @treasure6 if( !%isValid( @treasure6 ) && !%isPc( %getOwner( @hand6 ) ) ) #@treasure6 = %load( object, @stuff->6, @hand6 ) endif //---- static @greatWhite7 if( !%isValid( @greatWhite7 ) ) #@greatWhite7 = %load( mobile, 125212, 125208 ) #%setCharStat( @greatWhite7, npcGroup, 125207 ) endif static @limb7 if( !%isValid( @limb7 ) ) #@limb7 = %load( object, 125227, @greatWhite7 ) endif static @hand7 if( !%isValid( @hand7 ) ) #@hand7 = %load( object, 125210, @greatWhite7, hold ) endif static @treasure7 if( !%isValid( @treasure7 ) && !%isPc( %getOwner( @hand7 ) ) ) #@treasure7 = %load( object, @stuff->7, @hand7 ) endif //---- #@exit = %getRoomExits( 125226 )->down #%setExitStat( @exit, isLocked, 1 ) #@exit = %getRoomExits( 125244 )->up #%setExitStat( @exit, isLocked, 1 ) } endprotect
For the record, this was implemented ages ago, and I could have done it better, but I felt lazy. Also using resolutions would make it a lot clearer... eg:
Code:
#%setCharStat( @greatWhite7, npcGroup, 125207 )
Would be cleaner as:
Code:
#@greatWhite7->npcGroup = 125207


Top
   

 Post subject: Re: an example of BS Zones?
PostPosted: Mon Jul 18, 2005 9:52:08pm 
User avatar
Implementor
Joined: Fri Oct 06, 2000 5:32:29pm
Posts: 288
Website: http://www.wocmud.org
Location: Ottawa, Canada
Offline
Quote:
Guess I never really understood the power or potential of scripting zones. Are there any help docs? Any examples that we could see?
Another good use, that I haven't done yet but is simple enough, you can use it to re-arrange maze structures between zone resets. Very cool if you don't want your maze to be eternally solved after a person first solves it. Just need 3 or 4 rooms that the zone re-arranges the connections on.


Top
   

 Post subject:
PostPosted: Mon Jul 18, 2005 9:54:19pm 
User avatar
Joined: Sat Dec 25, 2004 1:14:21pm
Posts: 157
Website: http://photobucket.com/albums/y216/Kinara/
Offline
Good lord. I actually think I understand part of that. wow......................


Top
   

 Post subject:
PostPosted: Tue Jul 19, 2005 7:35:15am 
Joined: Sun Apr 16, 2006 9:12:10pm
Posts: 2
Offline
Quote:
Good lord. I actually think I understand part of that. wow......................
Once you learn the quests, the logic behind some of the stuff (when we're so privledged to see it) becomes more understandable!


Top
   

 Post subject:
PostPosted: Tue Jul 19, 2005 5:04:40pm 
User avatar
Immortal
Joined: Sun Apr 15, 2001 10:17:32pm
Posts: 27
Website: http://defed.wocmud.org
Location: USA
Offline
in my experience, it is a heck of a lot easier to understand what is already scripted. i almost always understand what blob shows me or what i read but when it comes time to write my own, i usually have more trouble. maybe it's just me =p


Top
   

 Post subject:
PostPosted: Tue Jul 19, 2005 7:18:36pm 
User avatar
Implementor
Joined: Fri Oct 06, 2000 5:32:29pm
Posts: 288
Website: http://www.wocmud.org
Location: Ottawa, Canada
Offline
Quote:
in my experience, it is a heck of a lot easier to understand what is already scripted. i almost always understand what blob shows me or what i read but when it comes time to write my own, i usually have more trouble. maybe it's just me =p
A good part of that is because the functions and variable names I use tend to speak for themselves. However if you aren't completely familiar weith the function library then starting from scratch is much more difficult since you need to seek out what functions you can use to achieve your goal. Viewing my code simplfies that stage since they are presented to you without the need to know the whole library.


Top
   

 Post subject:
PostPosted: Tue Jul 19, 2005 8:58:44pm 
User avatar
Joined: Sat Dec 25, 2004 1:14:21pm
Posts: 157
Website: http://photobucket.com/albums/y216/Kinara/
Offline
theres a library of this stuff?!?!?!?!?!?!?


Top
   

 Post subject:
PostPosted: Tue Jul 19, 2005 9:01:40pm 
User avatar
Immortal
Joined: Sun Apr 15, 2001 10:17:32pm
Posts: 27
Website: http://defed.wocmud.org
Location: USA
Offline
of course.


Top
   

 Post subject:
PostPosted: Tue Jul 19, 2005 9:34:15pm 
User avatar
Implementor
Joined: Fri Oct 06, 2000 5:32:29pm
Posts: 288
Website: http://www.wocmud.org
Location: Ottawa, Canada
Offline
Quote:
theres a library of this stuff?!?!?!?!?!?!?
Start reading dog!

http://www.wocmud.org/Carnage/blobbieScript/index.phtml

It's all explained. See the "triggers" and "functions" links for the "library" :)


Top
   

 Post subject:
PostPosted: Wed Jul 20, 2005 10:09:33am 
User avatar
Joined: Sat Dec 25, 2004 1:14:21pm
Posts: 157
Website: http://photobucket.com/albums/y216/Kinara/
Offline
wow................................. is all i have to say right now...........


Top
   

 Post subject:
PostPosted: Wed Jul 20, 2005 11:35:28am 
Joined: Sun Apr 16, 2006 9:12:10pm
Posts: 2
Offline
Quote:
wow................................. is all i have to say right now...........
Don't try to absorb it all at once. As I said, I don't mind lending a hand Kay. It's probably easiest to learn some of the easier functions, and how to use variables properly, then get into the mass number of functions in BS on an as needed basis.


Top
   

 Post subject:
PostPosted: Wed Jul 20, 2005 11:44:02am 
User avatar
Joined: Sat Dec 25, 2004 1:14:21pm
Posts: 157
Website: http://photobucket.com/albums/y216/Kinara/
Offline
heheh yeah, was a tad overwhelming =) dont worry, ill keep buggin ya =)

cheers


Top
   

 Post subject:
PostPosted: Wed Jul 20, 2005 11:48:16am 
Joined: Sun Apr 16, 2006 9:12:10pm
Posts: 2
Offline
Quote:
heheh yeah, was a tad overwhelming =) dont worry, ill keep buggin ya =)

cheers
Feel free.


Top
   

 Post subject:
PostPosted: Wed Jul 20, 2005 2:31:36pm 
User avatar
Implementor
Joined: Fri Oct 06, 2000 5:32:29pm
Posts: 288
Website: http://www.wocmud.org
Location: Ottawa, Canada
Offline
Quote:
heheh yeah, was a tad overwhelming =)
Whenever it feels like it's overwhelming, just think of lil' ol' me hammering away to not only bring you the BlobbieScript engine, the functions, the triggers, but also the mind-numbing documentation *grin*.


Top
   

Display posts from previous:  Sort by  

Post new topic  Reply to topic  [ 17 posts ] 

All times are UTC-04:00


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group