Jump to content
  • 0

Buffer flag protection


Question

Posted

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

8 answers to this question

Recommended Posts

  • 0
Posted

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).
  • 0
Posted

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..
  • 0
Posted

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.

  • 0
Posted

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...

  • 0
Posted

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
  • 0
Posted

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

Guest
This topic is now closed to further replies.


×
×
  • Create New...