Jump to content
  • 0

Python (Buffer)


feather57

Question

Hello. So I need some help, who know Python. So I wan't to do seperate buffer to Summoners. I wan't to do  what other classes except Warlock, Elemental Summoner, Phantom Summoner can't go to that buffer. And I don't know how to do that. Now it's like this:

def onTalk (self,npc,player):#verifica player se tem PET/Flag/Karma ou modo de combate.

htmltext = "<html><head><body>Vc naun tem requisitos para usar NPC</body></html>"

st = player.getQuestState(qn)

if not st : return htmltext

npcId = npc.getNpcId()

if player.getPet() == None :#Player sem Pet

htmltext = "<html><head><body>You Don't Have Summon or Pet!</body></html>"

st.exitQuest(1)

elif st.player.getPvpFlag() > 0 :#Player Flag

htmltext = "<html><head><body>You can't buff while you are <font color=\"800080\">flagged!</font><br>Wait some time and try again!</body></html>"

st.exitQuest(1)

elif st.player.getKarma() > 0 :#Player com Karma

st.exitQuest(1)

htmltext = "<html><head><body>You have too much <font color=\"FF0000\">karma!</font><br>Come back,<br>when you don't have any karma!</body></html>"

elif st.player.isInCombat() :#Player modo de Combate

st.exitQuest(1)

htmltext = "<html><head><body>You can't buff while you are attacking!<br>Stop your fight and try again!</body></html>"

 

else:

st.setState(State.STARTED)

return InitialHtml

return htmltext

 

And I think it's must be something like this:

 

def onTalk (self,npc,player):#verifica player se tem PET/Flag/Karma ou modo de combate.

htmltext = "<html><head><body>Vc naun tem requisitos para usar NPC</body></html>"

st = player.getQuestState(qn)

if not st : return htmltext

npcId = npc.getNpcId()

if player.getPet() == None :#Player sem Pet

htmltext = "<html><head><body>You Don't Have Summon or Pet!</body></html>"

st.exitQuest(1)

elif st.player.getPvpFlag() > 0 :#Player Flag

htmltext = "<html><head><body>You can't buff while you are <font color=\"800080\">flagged!</font><br>Wait some time and try again!</body></html>"

st.exitQuest(1)

elif st.player.getKarma() > 0 :#Player com Karma

st.exitQuest(1)

htmltext = "<html><head><body>You have too much <font color=\"FF0000\">karma!</font><br>Come back,<br>when you don't have any karma!</body></html>"

elif st.player.isInCombat() :#Player modo de Combate

st.exitQuest(1)

htmltext = "<html><head><body>You can't buff while you are attacking!<br>Stop your fight and try again!</body></html>"

elif player.getClassId().getId() == 93, player.getClassId().getId() == 15 :#What classes can't go here.

st.exitQuest(1)

htmltext = "<html><head><body>You can't buff while you are attacking!<br>Stop your fight and try again!</body></html>"

else:

st.setState(State.STARTED)

return InitialHtml

return htmltext

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

use java its easier to debug and its flood safe also if you dont use il you can extend the buffer inside the core easily to add summon buffs.

Link to comment
Share on other sites

  • 0

I don't understand java. That's the problem :DDD

 

ohh well than you have not too many choices since python buffers freeze out any server easily :D

Link to comment
Share on other sites

  • 0

I don't understand java. That's the problem :DDD

 

there are several ready to use java servers like from House. and if you understand phyton i see no problemm in understanding java basics

Link to comment
Share on other sites

  • 0

How, maybe can send what I need to write there?

 

if (st.getPlayer().getClassId() == XX || st.getPlayer().getClassId() == XX || st.getPlayer().getClassId() == XX....)

 

but you still have to deal with flood issues.

Link to comment
Share on other sites

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.



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