Ryandor.com

Forums
It is currently Sun May 05, 2024 5:33 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Nov 03, 2005 5:06 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Thu Aug 07, 2003 6:57 am
Posts: 472
giwo is in the process of adding support for packet handling through UOX3's JS-engine (making it scriptable), and any questions, comments, thoughts or suggestions for what should be included would be most welcome :P

http://www.uox3.org/forum/viewtopic.php?t=653

_________________
-= Ho Eyo He Hum =-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 5:13 pm 
Offline
Peanut Gallery
Peanut Gallery
User avatar

Joined: Sun Jun 02, 2002 8:53 pm
Posts: 1864
Location: Hayward, CA
Blatant advertising! :P

_________________
Blog: http://www.sydius.org
Web: http://www.sydius.net


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 5:38 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Thu Aug 07, 2003 6:57 am
Posts: 472
Are you implying something? ;)

_________________
-= Ho Eyo He Hum =-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 6:22 pm 
Offline
Posting Whore
Posting Whore

Joined: Fri Aug 29, 2003 6:21 pm
Posts: 1434
Location: Colorado Springs, Co.
Ooo UOX might out do RUNUO very shortly it sounds like. Not that I like Java (mostly because I'm clueless about it) but the being scriptable by mear mortals again is appealing over the dreaded C# which is way to complicated and to boring to learn just to make a guard appear everytime you double click the roast pig and make the painting above it say "Do you smell bacon?".

Yes I did script that into the first world file I did for Sphere in 1999. Which is the one they give away for the 55i btw...

Just for fun search it for "Sweetmusic" (The name of the painting over the roast pig) and "This is what you get for saying my world sucks" (the head laying on the floor in Britain gravy yard (yeah I know its spelled wrong but PK's used to clean house there). :twisted:

Dev

_________________
"So...if crazy people don't know their crazy...does that mean your only sane if your know your crazy?"


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 7:46 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Thu Aug 07, 2003 6:57 am
Posts: 472
I doubt it'll outdo RunUO anytime soon - but at least we're trying to make it an option for some =) By the way, it's not Java - but JavaScript - which is somewhat different ;)

Oh, and here are two examples of how I could do your "make a guard appear" thing in UOX3's JS-engine.

In the first example, I have the serial of the painting already saved on the roast pig in the form of 4 tags called serial1, serial2, serial3 and serial4:
Code:
function onUse( pUser, iUsed )
{
   var newNpcObject = SpawnNPC( "m_guard", iUsed.x, iUsed.y, iUsed.z, iUsed.worldnumber );
   var painting = CalcItemFromSer( iUsed.GetTag( "serial1"), iUsed.GetTag( "serial2"), iUsed.GetTag( "serial3"),  iUsed.GetTag( "serial4"));
   painting.TextMessage( "Do you smell bacon?" );
}


In the second example, the painting object isn't "known" to the roast pig (serial isn't saved), so I do a search of the immediate area (radius 2 from the roast pig) to see if I find an item with the name "Sweetmusic". If a match is found, the text is spoken by the painting.
Code:
function onUse( pUser, iUsed )
{
   var npcObject = SpawnNPC( "m_guard", iUsed.x, iUsed.y, iUsed.z, iUsed.worldnumber );
   AreaItemFunction( "myAreaFunction", iUsed, 2, pUser.socket);   
}

function AreaItemFunction( srcChar, trgItem, pSock )
{
   if( trgItem.name == "Sweetmusic" )
      trgItem.TextMessage( "Do you smell bacon?" );
}


When given a unique script-ID in a certain text file, the script can be assigned to the roast pig either using an ingame command, 'SETSCPTRIG <scriptID> or through a tag in the roast pig's script section; SCRIPT=<scriptID>.

How hard/easy to do does this look compared to what you did in Sphere?

_________________
-= Ho Eyo He Hum =-


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

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 9 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® Forum Software © phpBB Group