Jump to content
  • 0

Buffer flag protection


Virusgr

Question

Hello.I want to edit my buffer so that when a flagged player tries to restore HP/CP/MP he will not gain anything.So far i made it and he can't go to Other Functions tab where the Restore is located.But if he had Other Functions tab already open then he can heal himself normally.Is there any way to block that with java?i'm trying to do that but without luck.It can only be done via python?Cuz i hardly understand python.

Any help appreaciated

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hello.I want to edit my buffer so that when a flagged player tries to restore HP/CP/MP he will not gain anything.So far i made it and he can't go to Other Functions tab where the Restore is located.But if he had Other Functions tab already open then he can heal himself normally.Is there any way to block that with java?i'm trying to do that but without luck.It can only be done via python?Cuz i hardly understand python.

Any help appreaciated

via java you can do it , but it will affect almost all your npcs, so you will not able to press buttons in flag mode, but if your buffer's type is for example L2Buffer you can do it.(i use only interlude so i dont know about other clients).
Link to comment
Share on other sites

  • 0

via java you can do it , but it will affect almost all your npcs, so you will not able to press buttons in flag mode, but if your buffer's type is for example L2Buffer you can do it.(i use only interlude so i dont know about other clients).

You can do it with a selected id of npc..
Link to comment
Share on other sites

  • 0

You can do it with a selected id of npc..

yea? never watched it because i never searched for something like this :P , but tell him the "way" to do it.

 

EDIT:TRY THIS:

if (getNpcId() == 3234)
	{
		if (activeChar.getPvpFlag() > 0 )
                      {
                         activeChar.sendMessage("You can't by pass in this npc while you are in flag");
                         return;
                      } 
	}


 

try this on your onbypassfeedback method of your instance of your npc.

Link to comment
Share on other sites

  • 0

yea? never watched it because i never searched for something like this :P , but tell him the "way" to do it.

 

EDIT:TRY THIS:

if (getNpcId() == 3234)
	{
		if (activeChar.getPvpFlag() > 0 )
                      {
                         activeChar.sendMessage("You can't by pass in this npc while you are in flag");
                         return;
                      } 
	}


 

try this on your onbypassfeedback method of your instance of your npc.

 

he is talking about a jython-quest script, prolly the bypass for heal will be the way of "Quest 9999_Buffer_heal etc..", that means that the onBypassfeedback method from the npc instance isnt called

 

jython isnt hard, just find the command

 

if st.getPlayer().getPvpFlag() > 0:
st.getPlayer().sendMessage("Cannot heal while flagged!");
else:
#Restore cp/hp/mp code...

Link to comment
Share on other sites

  • 0

he is talking about a jython-quest script, prolly the bypass for heal will be the way of "Quest 9999_Buffer_heal etc..", that means that the onBypassfeedback method from the npc instance isnt called

 

jython isnt hard, just find the command

 

if st.getPlayer().getPvpFlag() > 0:
st.getPlayer().sendMessage("Cannot heal while flagged!");
else:
#Restore cp/hp/mp code...

aoux yes :P, i thought he was having core buffer maybe
Link to comment
Share on other sites

  • 0

he is talking about a jython-quest script, prolly the bypass for heal will be the way of "Quest 9999_Buffer_heal etc..", that means that the onBypassfeedback method from the npc instance isnt called

 

jython isnt hard, just find the command

		#Restore
		if event == "2" and st.getPlayer().getPvpFlagged() < 0 :
			st.takeItems(ADENA_ID,0)
			st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
			st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
			return "1.htm"		
			st.setState(COMPLETED)

and the error(i get this one gs console and at buffer's window when i press Restore):

fdaof5.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...