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 19.02.2007, 11:26   #11
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Thats my code for the old C1, htmls are the same.

Is NASC code so, you need to compile it.
Code:
class citizen { }

class buffer_npc : citizen {

  parameter:

  string fnHi = "buffer_npc001.htm";
  string fnYouAreChaotic = "buffer_npc002.htm";
  string fnNotEnoughAdena = "buffer_npc003.htm";
  string fnWait = "buffer_npc004.htm";
  int Precio = 1000;
  int Delay = 250;
 
  handler:

  EventHandler TALKED(talker) 
  {
    if (talker.karma > 0) ShowPage(talker, fnYouAreChaotic);
    else ShowPage(talker, fnHi);
    super;
  }

  EventHandler CREATED() {
    myself.i_ai0 = 0;
  }

  EventHandler MENU_SELECTED(ask, reply, talker) {
    if ( (ask == -201) && (OwnItemCount(talker, @adena) >= Precio) ) {
      if (myself.i_ai0 == 0) {
        myself.i_ai0 = 1;
        DeleteItem1(talker, @adena, Precio);
        AddUseSkillDesire(talker, reply, 0, 1, 1000000);   
        ShowPage(talker, fnHi);
        AddTimerEx(1, Delay);
      }
      else ShowPage(talker, fnWait);
    }
    else ShowPage(talker, fnNotEnoughAdena);
  }
  
  EventHandler TIMER_FIRED_EX(timer_id) {
    if (timer_id == 1) myself.i_ai0 = 0;
  }  
  
}
FidoW 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 07:00.