quest system support once more

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

obsc
Noob
Noob
Posts: 18
Joined: 11 Sep 2009, 03:58
Noob?: Yes

quest system support once more

#1 Post by obsc »

well, i don't think anyone here remembers me, but still...

almost year passed since quest tracking support was implemented, i haven't been playing for some time. time has come and i'm doing it again and guess what i see?..

long story short, seems like 02B5 packet structure changed since the time when i last looked at it.to be precise, currently at iRO::Valkyrie i'm experiencing the following:
- login/map change: "quest list" shows everything as it should
- kill tracked mob: "quest list" shows trash - mob counter gets set to mob goal count

why? seems like packet's data block got expanded by one int16 value.

here's diff fixing this issue for iRO::Valkyrie (line numbers are screwed since i have more modifications in this file):

Code: Select all

Index: Network/Receive/ServerType0.pm
===================================================================
--- Network/Receive/ServerType0.pm      (revision 7450)
+++ Network/Receive/ServerType0.pm      (working copy)
@@ -7493,11 +7549,11 @@
 sub quest_update_mission_hunt {
        my ($self, $args) = @_;
        for (my $i = 0; $i < $args->{amount}; $i++) {
-               my ($questID, $mobID, $count) = unpack('V2 v', substr($args->{RAW_MSG}, 6+$i*10, 10));
+               my ($questID, $mobID, $goal, $count) = unpack('V2 v2', substr($args->{RAW_MSG}, 6+$i*12, 12));
                my $mission = \%{$questList->{$questID}->{missions}->{$mobID}};
                $mission->{count} = $count;
                $mission->{mobID} = $mobID;
-               debug sprintf ("questID (%d) - mob(%s) count(%d) \n", $questID, monsterName($mobID), $count), "info";
+               debug sprintf ("questID (%d) - mob(%s) count(%d/%d) \n", $questID, monsterName($mobID), $count, $goal), "info";
        }
 }
i'm not sure whether the fix should go to ServerType0 (possibly breaking quest tracking for servers deriving from it which have older 02B5 structure), but in my case it does not matter since the only server i'm playing is iRO::Valkyrie .
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: quest system support once more

#2 Post by EternalHarvest »

Added to iRO serverType in r7452.
Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: quest system support once more

#3 Post by Technology »

I still remember you obsc ;)
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!
obsc
Noob
Noob
Posts: 18
Joined: 11 Sep 2009, 03:58
Noob?: Yes

Re: quest system support once more

#4 Post by obsc »

glad to hear that, though it's a bit strange since i'm not supposed to be that remarkable )

p.s. why every time when i come back to ro/botting i'm forced to dig through openkore sources fixing broken things? it tends to become some kind of tradition...
p.p.s. investigating "16 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVS Holy Damascus (Weapon)" inventory item at the moment...
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: quest system support once more

#5 Post by kLabMouse »

obsc wrote:glad to hear that, though it's a bit strange since i'm not supposed to be that remarkable )

p.s. why every time when i come back to ro/botting i'm forced to dig through openkore sources fixing broken things? it tends to become some kind of tradition...
p.p.s. investigating "16 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVS Holy Damascus (Weapon)" inventory item at the moment...
Why not join OpenKore Team?
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: quest system support once more

#6 Post by kLabMouse »

PS. O_o. the Struct updated. Did not noticed it.

Code: Select all

// packet 0x2b5
// internal len: 12
struct PACKET_ZC_UPDATE_MISSION_HUNT {
  /* this+0x0 */ short PacketType
  /* this+0x2 */ short PacketLength
  /* this+0x4 */ short count
  /* this+0x6 */ struct PACKET_MOB_HUNTING MobHuntList[...] {
    /* this+0x0 */ unsigned long questID
    /* this+0x4 */ unsigned long mobGID
    /* this+0x8 */ short maxCount
    /* this+0xa */ short count
  }
}

// OLD
// packet 0x2b5
// internal len: 10
struct PACKET_ZC_UPDATE_MISSION_HUNT {
  /* this+0x0 */ short PacketType
  /* this+0x2 */ short PacketLength
  /* this+0x4 */ short count
  /* this+0x6 */ struct PACKET_MOB_HUNTING MobHuntList[...] {
    /* this+0x0 */ unsigned long questID
    /* this+0x4 */ unsigned long mobGID
    /* this+0x8 */ short count
  }
} 
obsc
Noob
Noob
Posts: 18
Joined: 11 Sep 2009, 03:58
Noob?: Yes

Re: quest system support once more

#7 Post by obsc »

i'm not that regular - never know when i'll be gone again and comeback time ) and i don't like breaking someone's expectations directed at me )
plus, i'm not that good with perl - both in terms of knowledge and fondness ) i'd be happy to see openkore written in something more to my tastes, but it seems like nobody bothered to ask me for opinion when all *kore family was being born )

p.s. when has my english gone THAT bad?.. *shock*
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: quest system support once more

#8 Post by kLabMouse »

obsc wrote:i'm not that regular - never know when i'll be gone again and comeback time ) and i don't like breaking someone's expectations directed at me )
plus, i'm not that good with perl - both in terms of knowledge and fondness ) i'd be happy to see openkore written in something more to my tastes, but it seems like nobody bothered to ask me for opinion when all *kore family was being born )

p.s. when has my english gone THAT bad?.. *shock*
May-be to "Testers"?
Testers Corner have much more information, then usual access. So you could use thus to Improve something, or improve that info based on your data.
Or may-be Even check out things that are not Release to public yet.

What you say?
Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: quest system support once more

#9 Post by Technology »

obsc wrote:glad to hear that, though it's a bit strange since i'm not supposed to be that remarkable )

p.s. why every time when i come back to ro/botting i'm forced to dig through openkore sources fixing broken things? it tends to become some kind of tradition...
p.p.s. investigating "16 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVS Holy Damascus (Weapon)" inventory item at the moment...
Yea, they update packets sometimes, thats why "things break" and unfortunately we lack people to support all servertypes.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!