Jump to content

PiK90

Inactive Member
  • Posts

    37
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by PiK90

  1. #SOLVED

     

    I had to move the syntax i highlited in the screenshot to the bottom of the function, after another function was calculated. 

     

    Hi everybody! I am stucked on an important stage of my project. I need to add one more skill, 7th. I modified the client, it shows in slot, i can train it, the skilled is displayed correctly and i can even send the packet usage for it. I added the motion checks in server too.
    So it works perfectly, i am not kicked for "potential SKILL_HACK". Excepting that the skill doesn't do any kind of damage. It is not logged in chat as it'd have done damage, it does not appear in logs. Also, the affect is not displayed on the target.
     


    OOTa53t.png

    200	SMITE	1	1	1	0	HP	-(lv*2+(atk + str*3 + dex*18)*k)	40+130*k			200	-(lv*2+(atk + str*3 + dex*18)*k)		ATTACK,USE_MAGIC_DAMAGE	SMITE	NONE	60*k	5+25*k					40+130*k	0	0	MAGIC	0	1	1000	200
    
    (copy it in notepad)
    

    Did anybody added a new skill or created a new one, so i can get some help? I also think it is not the skill files the problem (.mse) as i tried some effects, and i also tried a skill that is already present in client.

     

    I am sorry for my english. If you can't understand, just reply and i will try to be more precise.

  2. To open it from NPC, edit game.py -> def Teleport(self, getString) function :

    def Teleport(self, getString): 
    	if getString.find("index") != -1: 
    		self.teleport.UpdateIndex(int(getString.split("x")[1])) 
    	elif getString.find("open") != -1:
    		self.teleport.Open()
    	else: 
    		constInfo.SendString = str(self.teleport.SendToServer) 
    		constInfo.CApiSetHide = 1  
    

    Now open the quest and add the chat statement:

    when NPC_CODE.chat."Teleport GUI" begin
    	cmdchat("Teleport open")
    end
    
    • Love 2
  3. Make a printf when GetStatus is called with POINT_GOLD argument to debug the problem. But i can tell you that you get that big number because POINT_GOLD has a negative value.

    This can be caused by server-client comunication. Check in server when you send the packet and in client when u receive the packet what values has m_gold.

     

    I think somewhere you forgot to change gold declaration or a variable declaration and if you send a value bigger than 2.2kkk then it gets negative.

  4. It is a little tricky to change it, as you have to change in the tables and in every function that uses gold in computing. Also you need to change in the launcher too so the table declarations matches. I changed it on my server and i got a lot of bugs like players receiving 4kkk gold instead of loosing it. 

     

    If you really need it, i will post you a guide. But i suggest you not doing so.

     

    • Love 1
  5. In game.py, add in serverCommandList 

    "QuestIndex"	: self.__ReceiveQuestIndex
    "get_input_value"    : self.__GetInputValue
    

    Then add the folowing functions in game.py:

    		def __ReceiveQuestIndex(self, index):
    			constInfo.QuestIndex = int(index)
    		def __GetInputValue(self):
    			net.SendQuestInputStringPacket(str(constInfo.Answer))
    

    Then in constInfo.py, add:

    QuestIndex = 0
    Answer = ""
    

    In uichat.py, in __SendChatPacket function, add:

    if text[0] == '&' and text[1] == '&':
    	com = text.split(" ")
    	constInfo.Answer = com[1]
    	import event
    	event.QuestButtonClick(int(constInfo.QuestIndex))
    	return
    

    Now, in the quest, you receive the answer like this:

    when login begin
            cmdchat("QuestIndex "..q.getcurrentquestindex())
    end
    when info or button begin
            
    	local answer= input(cmdchat("get_input_value"))
    	if answer == "CorrectAnswer" then
                chat("Your answer is correct!")
            end
    end
     

    I hope this will work, it is not tested.

    You have to adapt the if answer == "CorrectAnswer" then to check the question too. If you do not succed, let me know.
     

     

     

     

    • Love 2
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.