Jump to content
  • 0

[HELP] Add Restriction in NPC Buffer


Question

Posted

how do I say that the player in this event and can not use the Buff?

 

I tried without success for some forms... example

 

def onTalk (self,npc,player):

  st = player.getQuestState(qn)

  if st.getPlayer().TVTEvent.isParticipating() :

      return "Warning: You are attending the event TvT and can not use NPC Buffer!"

      st.exitQuest(1) 

 

  elif st.getPlayer()._inEventCTF() :

      return "Warning: You are attending the event CTF and can not use NPC Buffer!"

      st.exitQuest(1) 

 

  else:

      st.setState(STARTED)

      return InitialHtml

 

 

11 answers to this question

Recommended Posts

  • 0
Posted

Que versao do core vc usa? no core que estou codificando qq evento tvt ou ctf q vc cria ele removes todos os efeitos dos char (buffs, etc) ao entrar no evento. portanto isso que vc esta querendo fazer é algo desnecessario. Ele pode se buffar quantas vezes quiser e com qq tipo de buff ao entrar no evento ele irá perder todos.

  • 0
Posted

Quero adicionar esta restrição pro NPC BUFFER nao BUFFAR o cara se ele estiver registrado nos Eventos, eu sei que ele perde os buffs ao inicio do evento, mas tem sempre os safados que tentam de tudo

  • 0
Posted

não adianta ele tentar, o buff sera removido, pode ver q todo server q tem evento ctf e tvt nao se preocupa com isso. Tem um função dentro do core responsavel por essa tarefa, se alguem descobrir algum bug o cara nem vai usar seu npc buffer ele vai criar um char buffer pra entra no evento buffado, isso se ele conseguir. Não sei se no python o objeto do character herda propriedades ou methodos dos eventos nunca testei isso, creio que seja possivel, mas fazer isso com uma proteçao ja existente no core na minha opniao é algo inutil, sem contar q uma codificação pelo core é mais segura que em um script python.

  • 0
Posted

try that and tell me

 

def onEvent(self,event,st):
htmltext = event
if st.getPlayer().isInFunEvent: 
htmltext = "<html><head><body>bla bla bla</body></html>"

  • 0
Posted

fakoykas, I tried as you said and all that without being restricted to event.

 

if st.getPlayer().isInFunEvent:
      return "Warning: You are attending the event TvT and can not use NPC Buffer!"

 

and also tried the following  adding () also unsuccessfully, not restricted anyone! =/

 

if st.getPlayer().isInFunEvent() :
      return "Warning: You are attending the event TvT and can not use NPC Buffer!"

 

sorry for my English I use translator.

  • 0
Posted

do it

 

if st.getplayer()._inEvent()  <<<<

 

try player._inEvent or st.player._inEvent or any object related to players with this function ._inEvent [boolean]

 

I sayid maybe the object 'player' in python dont inherit methods, functions, classes from the classes related to events.

 

I think this code is useless because when the character enter in the tvt zone all effects are removed.

  • 0
Posted

or easier way go to the tvt.java and add a check to the npc dont give buff on event

 

1st you need a private static int npcId = the buffers id;(private or public it doesnt matter here)

 

and than the check is easy

 

if (npcId == the buffers id)

    return false;(or an activeChar.sendMessage or an action failed packet or what you want)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Lol good joke.   If I'd be the one contacting yo then I'd say at least 50% in advance because you can basically just fuck off when things doesn't go your way, and then you as a developer just wasted days or even weeks of time with development.
    • "Just make your own game!" sounds simple until you’ve tried it. I did, with Epic Dragon World and learned the hard way that "open source" often means "free labor for resellers." The MIT license became a buffet for people to grab code, rebrand it and ghost the project. Even basic collaboration collapsed because everyone wanted their vision, not *a* vision. NCSoft’s lawyers aren’t theoretical. They’re a sword of Damocles. Even if you rebuild a client from scratch, if it feels like Lineage 2, they’ll come knocking. Ask the Chrono Trigger fangame corpses how that goes. MMOs are hospice care. The genre’s on life support, kept alive by whales and nostalgia. Look at Throne and Liberty, NCSoft’s own "successor" to L2, flopping harder than a 2004 PKer in ToI. Classic reboots (WoW, L2) are bandaids, not resurrections. This is the hobby. Optimizing old systems, reverse-engineering spaghetti code and preserving janky mechanics is the fun part. Monetizing it turns it into customer service hell. No thanks. Community? What community? The L2 scene is 90% resellers, 10% players who’ll quit the second they don’t get +16 on day one. Both asking how to install Java and why running the uncompiled server does not work.
    • Dear players, Open beta test for C3 begins today at 19:00 server time (GMT +2). 💰 All participants who find bugs during OBT will be rewarded with Coin of Luck (CoL): - 1 CoL for each staticmesh issue found — e.g., walking through textures, etc., - 2 CoL or more for server-side issues, depending on their severity., We strongly recommend reviewing the quest list - when switching to Chronicle 3, the total number of quests should match the number shown in the upper right corner of the window and correspond to the quest count from Chronicle 2. To log into the game, use the same data you use to access the Airin server. 📌 Download client: Google Drive
    • 🔥 Sale Alert! 🔥 Twitter Accounts with 50 Followers — now on SALE! Looking to launch a project or warm up your account base fast? We’ve got starter Twitter accounts with ~50 followers at a sweet price. 💰 Limited-time offer – while stock lasts! ✅ Organic-Looking ✅ Clean & Safe ✅ Perfect for boosting credibility 📦 Instant delivery
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock