Jump to content
athron

buildin getitemlinkedmsg

Recommended Posts

when we take a look on console using script e.g. 
- script catch FAKE_NPC,{

OnAtcommand:
    debugmes .@atcmd_parameters$[0];
    end;

OnInit:
    bindatcmd "catch",strnpcinfo(3)+"::OnAtcommand";
    end;

}
let's start to type @catch<space> following shit+left click on beret
so and chat command shown :
 
@catch <beret>
 
and the result on console like:
[Debug]: script debug : 2000000 110022388 : <ITEM>0004811lq'00'00'00'00</ITEM>
 
let's try on +20 beret
@catch <+20 beret>
 
and the result on console like:
[Debug]: script debug : 2000000 110022388 : <ITEM>0004811lq%0k'00'00'00'00</ITEM>
 
how does it work?
yes that's base converted from 10 to 64
 
i have not enought knowledge on C so i tried to encode it using vb like this
Public Function ConvertBase10$(ByVal d#)
    Dim S$, t#, i%, l%, bl%, bs$
    bs= "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    bl = Len(bs)
    Do While Val(d) <> 0
        t = d
        i = 0
    Do While t >= bl
        i = i + 1
        t = t / bl
    Loop
    If i <> l - 1 And l <> 0 Then S = S & String(l - i - 1, Left(bs, 1))
    t = Int(t)
    S = S + Mid(bs, t + 1, 1)
    d = d - t * (bl ^ i)
    l = i
    Loop


    ConvertBase10 = S
End Function

what's that mean?

<ITEM>0004811lq%0k'00'00'00'00</ITEM>
                      vv
                      Equipment Location -> ConvertBase10(256) = 48


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
            vvv
            Equipment ID -> ConvertBase10(5712) = 1lq


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
                vv
                Refine Level -> ConvertBase10(20) = 0k


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
                   vv
                   Card on Slot 1


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
                      vv
                      Card on Slot 2


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
                         vv
                         Card on Slot 3


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
                            vv
                            Card on Slot 4


<ITEM>0004811lq%0k'00'00'00'00</ITEM>
           v
           dunno about '1' after equipment location.
           but i think it's alwasy be 1.

we not need to decode, because we just need to send string thar initialized by client to result as item link.

i also tried using :
dispbotom "You got 1x <ITEM>0004811lq%0k'00'00'00'00</ITEM>";
 
result is shown "You got <+20 Beret>" clickable in client.
 
also work on
announce "S got 1x <ITEM>0004811lq%0k'00'00'00'00</ITEM>" bc_all;
 
we can also try copy this 
<ITEM>0004811lq%0k'00'00'00'00</ITEM>
and paste on client 
 
Of course we can make a script and use callfunc but
if there any buildin script like this
*getitemlinkedmsg <item_id>,<refine>,<card1>,<card2>,<card3>,<card4>;
it would be helpfull. 

Share this post


Link to post
Share on other sites

I already know this feature, it probably have more fields according to RndOptions.. hoping next month to be awesome month for Hercules xD

 

Edit: Also, this only works on chatbox, it won't work on npc dialog, for npc dialog, we just have <ITEM> tag

Share this post


Link to post
Share on other sites

 

 

i hope this system implement on hercules asap

 

http://herc.ws/board/topic/10701-link-item-system/?p=70598

oh i see, but hercules still must update packet to enable new client :wub:

i just tried using ragemu's packet struck on hercules without any problem, except truncated npc string input.

 

 

I already know this feature, it probably have more fields according to RndOptions.. hoping next month to be awesome month for Hercules xD

 

Edit: Also, this only works on chatbox, it won't work on npc dialog, for npc dialog, we just have <ITEM> tag

 

yes, it would be helpfull too if we also have a buildin function :

*getmeslinkitem <item_id>,{<optional_desc>}
*getnavilink <desc>,<map>,<x,><y>
Edited by athron

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.