Page 1 of 1

Requirements for new bypass validation(html action caching).

Posted: Wed Aug 28, 2013 4:34 pm
by HorridoJoho
Since the last change to bypass validation(html action caching), NpcHtmlMessage must be filled correctly.
  • Dialogs which don't require you to be near a npc to click it's links
    • Use NpcHtmlMessage() or NpcHtmlMessage(String html) constructor. This both constructors set the npcObjId to 0 which means that the player don't need to be in a range of an npc to click links on the opened dialog. When you are required to use another constructor, fill the npcObjId correctly with 0(now itemId will also be send to client even when npcObjId is 0).
  • Dialogs which require you to be near the npc you opened the dialog to be able to click links on it
    • Use NpcHtmlMessage(int npcObjId), NpcHtmlMessage(int npcObjId, String html), NpcHtmlMessage(int npcObjId, int itemId) or NpcHtmlMessage(int npcObjId, int itemId, String html) constructors. You should fill the npcObjId correctly from the L2Object#getObjectId() method. This means, when a player clicks on a link with an dialog send with npcObjId not equals 0, the player needs to be in the range of this npc spawned in the world so it's bypass is processed.
Explanation:
The new bypass validation(html action caching) now relies on the npcObjId passed to the html packets. That gives the possibility to verify if the player is still in the range of the npc, the dialog was opened, when the player clicks on a link.

Examples of bugus usages:
new NpcHtmlMessage(5, 1)
new NpcHtmlMessage(5, 0)

Examples of right usages:
new NpcHtmlMessage()
new NpcHtmlMessage(0, 1)
new NpcHtmlMessage(npc.getObjectId)
new NpcHtmlMessage(npc.getObjectId(), 1)

Re: Requirements for new bypass validation(html action cachi

Posted: Thu May 08, 2014 4:11 am
by yksdtc
Thank you !
:D

Re: Requirements for new bypass validation(html action cachi

Posted: Thu May 08, 2014 3:49 pm
by xban1x
This should be stickied and put inside F.A.Q . It's a helpful thing for new users. Similar topics should be made for things like PlayerVariables, AccountVariables, NpcVariables, GlobalVariables to explain the differences and usages. These 4 classes i mentioned remove the need of creating a scheme buffer within core cause they offer the developer to make all that stuff from DP side :)

Re: Requirements for new bypass validation(html action cachi

Posted: Fri May 09, 2014 5:28 pm
by Hyrelius
Hm what about community board HTML display? Is there a way to ensure someone is near a NPC when doing bypass validation (except writing it from scratch using getDistance etc.?)?

Re: Requirements for new bypass validation(html action cachi

Posted: Sun May 11, 2014 9:14 am
by HorridoJoho
Hyrelius wrote:Hm what about community board HTML display? Is there a way to ensure someone is near a NPC when doing bypass validation (except writing it from scratch using getDistance etc.?)?
viewtopic.php?t=29765

Test and report please.