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>"
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.
Hey.
I've been looking all over the internet about this but not being able to find anything about it.
I have edited systemmsg using MSG editor changing colors etc. But now I want to change and add some of the sounds as well. But I need the sound IDs for each audiofile and I dont know how to find them. Ive found all the audio files but I cant use the filename as someone said in a thread here, it only seem to take numbers. I have looked into every guide about systemmsg on this website and no one mention anything about the sound, just that its possible to add sound but nothing more.
So, do anyone know how to find these sound IDs? Preferably together with the soundname of the audio file that it plays so I know which ID to use for each soundfile.
Thanks in advance!
We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX!
Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
Good day. Our game currency store is looking for suppliers of adena and items on a project such as L2REBORN x10.
We also sell Epic jewelry and various items on this project L2REBORN x10.
There are items and adena on L2REBORN x1.
For all questions, write to us in discord - goddardshop
Question
feather57
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
8 answers to this question
Recommended Posts
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.