Skip to content

Buffer flag protection

Featured Replies

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

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

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

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.

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

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
  • Author

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

  • Author

Problem solved with a bunch of "or".Thanks everyone!

You can now lock this thread.

You can now lock this thread.

 

Locked.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.