Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Help
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 25.06.2006, 03:34   #6
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Code:
class citizen { }

class buffer_npc : citizen {

  parameter:

  string fnHi = "buffer_npc001.htm";
  string fnYouAreChaotic = "buffer_npc002.htm";
  string fnNotEnoughAdena = "not_enough_adena.htm";
  string fnWait = "buffer_npc_wait.htm";
  int Adena = 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) >= Adena) ) {
      if (myself.i_ai0 == 0) {
        myself.i_ai0 = 1;
        DeleteItem1(talker, @adena, Adena);
        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;
  }  
  
}
This is my version of buffer_npc... with little delay between buffs for prevent pay adena and dont get buff... reply is skill_pch value, be carefull if u arent using tontor patch to prevent HTML bug... because a modified html can get any buff (for example Super Haste).... dont use this code without html fix...
FidoW is offline  
 


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 08:47.