Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 13.12.2006, 07:45   #1
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default [SHARE] Buffer NPC C4

I shared before a similar code for C1moded... ok, lest go with a newer version for C4

NASC CODE
Code:
class buffer_npc : default_npc {

parameter:
  string fnHi = "buffer_npc001.htm";
  string fnYouAreChaotic = "buffer_npc002.htm";
  string fnNotEnoughAdena = "buffer_npc003.htm";
  string fnWait = "buffer_npc004.htm";
  int ItemBuff = 57;
  int Amount = 1000;
  int Delay = 500;

handler:
  EventHandler CREATED() {
    myself.i_ai0 = 0;
  }
  EventHandler TALKED(talker) {
    if (talker.karma > 0) myself->ShowPage(talker,fnYouAreChaotic);
    else myself->ShowPage(talker,fnHi);
  }

  EventHandler MENU_SELECTED(talker,ask,reply) {
    if ( (ask == -201) && (myself->OwnItemCount(talker,ItemBuff) >= Amount) ) {
      if( myself.i_ai0 == 0 ) {
        myself.i_ai0 = 1;
        myself->DeleteItem1(talker,ItemBuff,Amount);
        myself->AddUseSkillDesire(talker,reply,1,1,1000000);
        myself->ShowPage(talker,fnHi);
        myself->AddTimerEx(1,Delay);
      }
      else myself->ShowPage(talker,fnWait);
    }
    else myself->ShowPage(talker,fnNotEnoughAdena);
  }

  EventHandler TIMER_FIRED_EX(timer_id) {
    if( timer_id == 1 ) myself.i_ai0 = 0;
  }

}
COMPILED CODE
Code:
-- DELETED --
Since nobody respect credits im not going to share.

Compile it yourself.
NPCDATA
Code:
-- DELETED --
NPC_PCH
Code:
-- DELETED --
buffer_npc001.html
Code:
<html><body> 
Buffer NPC:<br>
<br>
<a action="bypass -h menu_select?ask=-201&reply=273411">[Might]</a><br> 
<br><br>
<font color="FF0000">Buffer NPC by FidoW</font>
</body></html>




UPDATE: Now version 2.0 exists with new options and new checks. New version check MP of the NPC, reuse time, selfbuff with CH buff to get more MP and best cast speed. And option to buff summons yes or not that can be enabled or disabled with a simple param. You want it ? Send a PM, but i hope you are not a leeacher.
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 22:28.