Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 18.04.2006, 06:22   #10
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

Yeah your decompilation looks good and is pretty much NASC. There is one problem that I see though unless the "code" is playing tricks on my eyes.

In control structures, equal comparisons are done with "==" and not single "=". Single "=" are assignements.

A decompiler would be awesome as long as it bounced it down to NASC. It would allow us more serious developers to highly modify the existing classes without having to completley re-write them.

However, the best and most reliable way of compiling is NASC so I think your decompiler should decompile down to that. I have attached to this (just in case you dont have it) a sample NASC script as well as some included documentation.

I know NASC pretty well and decompiling into NASC would be the best for the community as a whole. If you need any insight on NASC knowledge, I could assist you.

The following code is just some examples of nasc. While incomplete, and class variables not shown are referenced, you will see the overall flow of how it is done.

Code:
   EventHandler MOVE_TO_WAY_POINT_FINISHED(way_point_index, next_way_point_index)
   {
      if (debug == 1) { Say("MOVE_TO_WAY_POINT_FINISHED Handler Fired");}
   
      myself.i_ai0 = next_way_point_index;

      AddTimerEx(100001, (GetWayPointDelay(WayPointDelays, way_point_index)*1000));
   }

   EventHandler TIMER_FIRED_EX(timer_id)
   {
      if (debug == 1) { Say("TIMER_FIRED_EX Handler Fired");}
   
      if (timer_id == 100001)
      {// waypoints
         if (myself.i_ai0 > 0)
         {
            AddMoveToWayPointDesire(WayPoints, WayPointDelays, myself.i_ai0, MoveToWayPoint_BoostValue);
         }
         else
         {
            AddMoveToWayPointDesire(WayPoints, WayPointDelays, 1, MoveToWayPoint_BoostValue);
         }
      }
   }

   EventHandler SEE_ITEM(item)
   {
      if (debug == 1) { Say("SEE_ITEM Handler Fired");}
      
      AddGetItemDesire(item, GetItem_BoostValue);
   }
   
   EventHandler GET_ITEM_FINISHED(item, i0)
   {
      if (debug == 1) { Say("GET_ITEM_FINISHED Handler Fired");}
      
      if ((OwnItemCount(myself, item) >= 1))
      {
	      i0 = Rand(100);
	      
	      if (i0 <= 33)
	      {
	         Say(MakeFString(ItemPickupMsg1, "", "", "", "", ""));
	      }
	      else if ((i0 >= 34) && (i0 <= 66))
	      {
	         Say(MakeFString(ItemPickupMsg2, "", "", "", "", ""));
	      }
	      else
	      {
	         Say(MakeFString(ItemPickupMsg3, "", "", "", "", ""));
	      }
      }
   }
Firedaemon is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:17.