Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • `Discardedx2`: ?
      September 21, 2018, 12:24:09 PM
    • Pookey71: ARE YOU HERE TO RECEIVE MY LIMP PENIS!?
      September 20, 2018, 11:55:24 PM
    • Pookey71: THIS IS DEMOCRACY MANIFESTO
      September 20, 2018, 11:55:07 PM
    • Vasi28: Гранд
      September 03, 2018, 07:06:22 PM
    • Rash: test
      August 30, 2018, 09:09:18 PM
    • Guruu:[link]
      August 30, 2018, 12:04:45 AM
    • Guruu: am i allowed to post links shoutbox?
      August 30, 2018, 12:03:46 AM
    • drubrkletern:[link] feedback wanted
      August 28, 2018, 03:55:17 PM
    • bugz000: Anyone got a link for the old ass silab client and cache.zip? from mopar 3.2 era :) 317
      August 25, 2018, 12:48:15 AM
    • cholland2015: Does anyone know where I can download the old moparscape client/server?
      August 24, 2018, 02:30:51 PM
    • hexedss1: Anyone would like to help on client side got a variable declartion Error
      August 15, 2018, 09:06:30 PM
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM

    Author Topic: Oh second option click npc calls the walk packet too, damn!  (Read 643 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineStrucker

    • Member
    • ****
    • Posts: 2,970
    • Thanks: +0/-0
      • View Profile
    Oh second option click npc calls the walk packet too, damn!
    « on: September 16, 2015, 10:57:33 PM »
    What do i do? When i select the second option of an npc, the walking packet is being called as well.


    I was doing something with fishing, and i had to stop the fishing when you walked, but oh well, you walk when you click it, so you cant actually fish, what i did to get over the problem was to Schedule a task in 2 ticks, and then compare the coordinates where i started fishing with the actual coordinates, if they had changed you would stop fishing (By saying stop fishing i mean to set the flag to false)
    But... there's a catch, if you run fast enough right after you are no longer fishing and fast enough before the loop fishing task checks if you are still fishing and you manage to click another fishing spot, you'd be fishing that spot and the one you were fishing already, because when the task checked if you were fishing you had managed to start fishing again. I'm trying to explain the best i can.

    So basically the problem is that a flag called isFishing sets to false so you can fish another spot, and you manage to start fishing from another spot real fast, then the task that checks if you are fishing (To give you the fish, experience and bla bla bla) isn't stopped

    Here is the task that loops to give you fish, and checks every tick to see if you are still fishing:
    http://pastebin.com/jQADXrCz (Paste bin fudgeed the formatting)

    Here is the method called in the walking packet
    http://pastebin.com/WE2h3hhP


    Any ideas?


    « Last Edit: September 16, 2015, 11:03:33 PM by Strucker »
    Times flies and im wasting it
    Runescape Gambling

    OfflineX-J-K-X

    • Member
    • ****
    • Posts: 1,951
    • Thanks: +0/-0
      • View Profile
    Re: Oh second option click npc calls the walk packet too, damn!
    « Reply #1 on: September 17, 2015, 03:02:54 AM »
    Just revert everything you did back to when it was working and do it again and why would you need a task to stop the player's action when walking?
    Runescape Gambling

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Oh second option click npc calls the walk packet too, damn!
    « Reply #2 on: September 17, 2015, 03:38:39 AM »
    Just really poor server design. The walk packet is SUPPOSED to be called for pretty much all model interactions, and it's sent before the interact packet. When you receive the interact packet you schedule a task that checks distance and THEN handle the interact packet.
    Runescape Gambling

    OfflineStrucker

    • Member
    • ****
    • Posts: 2,970
    • Thanks: +0/-0
      • View Profile
    Re: Oh second option click npc calls the walk packet too, damn!
    « Reply #3 on: September 17, 2015, 02:21:50 PM »
    Just really poor server design. The walk packet is SUPPOSED to be called for pretty much all model interactions, and it's sent before the interact packet. When you receive the interact packet you schedule a task that checks distance and THEN handle the interact packet.
    Hey i was actually thinking something like that, thanks for stating the walk packet is sent before the interact packet :)
    Thanks again.


    Edit: You are right i added some prints to see which was called first, the walking packet is, and its called in most like you said.
    « Last Edit: September 17, 2015, 02:43:06 PM by Strucker »
    Times flies and im wasting it

    Offlinematzie

    • Member
    • ****
    • Posts: 1,014
    • Thanks: +0/-0
      • View Profile
    Re: Oh second option click npc calls the walk packet too, damn!
    « Reply #4 on: September 23, 2015, 10:30:32 AM »
    Just really poor server design. The walk packet is SUPPOSED to be called for pretty much all model interactions, and it's sent before the interact packet. When you receive the interact packet you schedule a task that checks distance and THEN handle the interact packet.
    Hey i was actually thinking something like that, thanks for stating the walk packet is sent before the interact packet :)
    Thanks again.


    Edit: You are right i added some prints to see which was called first, the walking packet is, and its called in most like you said.

    There are not many things that do not have that option ;P The only people who can fish are cheaters lol. Packet Spoof = no walking packet ;P
    smart phones are dumb
    people are smart phones.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal