EtcItem

Nunes

Heir
Customer
Hello my friends, how are you all doing?

So, I'm trying to create a clickable item, and when I click on it, it should open an HTML chat. However, I've already tried in several ways and the server can't create it. On the client side, everything is fine, the item appears but it just doesn't go into the inventory. I'll leave the code and the error that appears.

1767663151149.webp




<?xml version='1.0' encoding='utf-8'?>
<list>
<etcitem id="9500" name="Buffer Book">
<set name="EtcItemType" value="OTHER" />
<set name="handler" value="scripts.services.BuffBook:useItem" />
<set name="is_handler" value="true" />
<set name="is_stackable" value="false" />
<set name="weight" value="0" />
</etcitem>
</list>
 
I have absolutely no idea what you trying to do, but there are guides for items with default actions. for example, opening HTML. Take a look at the guides!
Code:
<etcitem id="6317" name="Mixing Manual">

    <set name="default_action" value="ACTION_SHOW_HTML"/>

    <set name="tradeable" value="true"/>

    <set name="dropable" value="false"/>

    <set name="class" value="OTHER"/>

    <set name="crystal_type" value="NONE"/>

    <set name="icon" value="icon.etc_spellbook_red_i00"/>

    <set name="price" value="1"/>

    <set name="type" value="OTHER"/>

    <set name="weight" value="20"/>

</etcitem>

And : https://lucera2.com/threads/how-to-create-buff-book.1435/
 
I have absolutely no idea what you trying to do, but there are guides for items with default actions. for example, opening HTML. Take a look at the guides!
Code:
<etcitem id="6317" name="Mixing Manual">

    <set name="default_action" value="ACTION_SHOW_HTML"/>

    <set name="tradeable" value="true"/>

    <set name="dropable" value="false"/>

    <set name="class" value="OTHER"/>

    <set name="crystal_type" value="NONE"/>

    <set name="icon" value="icon.etc_spellbook_red_i00"/>

    <set name="price" value="1"/>

    <set name="type" value="OTHER"/>

    <set name="weight" value="20"/>

</etcitem>

And : https://lucera2.com/threads/how-to-create-buff-book.1435/
I am trying to create an item for a BuffBook. When clicked, it should call the script to open the buff files and display the HTML, but I have tried every way to create the item and the server only logs an error [22:55:31] WARN ItemParser: Fail create item: null java.lang.IllegalArgumentException: Integer value required, but found: null!
 
I am trying to create an item for a BuffBook. When clicked, it should call the script to open the buff files and display the HTML, but I have tried every way to create the item and the server only logs an error [22:55:31] WARN ItemParser: Fail create item: null java.lang.IllegalArgumentException: Integer value required, but found: null!
may be better show HTML which has a buff-code inside?

value="ACTION_SHOW_HTML"
and write inside what u wanna do.

example


HTML:
<html>
<body>
<br>
<table width="300" cellpadding="3" cellspacing="0">
    <tr>
        <td valign=top><img src=icon.skill1204 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9600">Wind Walk<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9601">Wild Magic<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1040 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9602">Shield<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1068 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9603">Might<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9604">Mental Shield<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1045 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9605">Blessed Body<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1048 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9606">Blessed Soul<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9607">Magic Barrier<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9608">Resist Shock<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9609">Concentration<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1062 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9610">Berserker Spirit<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1243 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9611">Bless Shield<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1268 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9612">Vampiric Rage<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9613">Acumen<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9614">Empower<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1086 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9615">Haste<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9616">Accuracy<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill1077 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9617">Focus<br1></a><font color="LEVEL">1 Horn Of Buffalo</font></td>
    </tr>
    <tr>
        <td valign=top><img src=icon.skill1242 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9618">Death Whisper<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
        <td valign=top><img src=icon.skill4456 width=32 height=32 align=left></td>
        <td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9620">Chant of Paagrio<br1></a><font color="LEVEL">5 Horn Of Buffalo</font></td>
    </tr>
</table></center>
<br><img src="L2UI.SquareWhite" width=250 height=1>

</body></html>


where
bypass scripts_services.Buffer:actBBS ask=9610 - (buff_templates.xml -> where 9610 is below

XML:
<template menuId="9610" target="BUFF_PLAYER">
        <consume>
            <item id="7186" amount="2" />
        </consume>
        <produce>
            <skill id="9610" level="2" />
        </produce>
    </template>

код чисто для примера, логично не юзать вызов bbs но и так тоже будет работать.
 
Last edited:
Talvez seja melhor exibir o HTML que contém um código de buffer?

valor="AÇÃO_EXIBIR_HTML"
E escreva dentro o que você quer fazer.

exemplo


[CÓDIGO=html]<html>
<body>
<br>
<table width="300" cellpadding="3" cellspacing="0">
<tr>
<td valign=top><img src=icon.skill1204 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9600">Caminhada no Vento<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9601">Magia Selvagem<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1040 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9602">Escudo<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1068 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9603">Pode<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9604">Escudo Mental<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1045 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9605">Corpo Abençoado<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1048 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9606">Alma Abençoada<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9607">Barreira Mágica<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9608">Resistir ao Choque<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9609">Concentração<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1062 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9610">Espírito Berserker<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1243 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9611">Escudo de Bênção<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1268 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9612">Fúria Vampírica<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9613">Acumen<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9614">Empower<br1></a><font color="LEVEL">2 Horn Of Buffalo</font></td>
<td valign=top><img src=icon.skill1086 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9615">Apresse<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9616">Precisão<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill1077 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9617">Foco<br1></a><font color="LEVEL">1 Chifre de Búfalo</font></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1242 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9618">Sussurro da Morte<br1></a><font color="LEVEL">2 Chifre de Búfalo</font></td>
<td valign=top><img src=icon.skill4456 width=32 height=32 align=left></td>
<td valign=left><a action="bypass scripts_services.Buffer:actBBS ask=9620">Canto de Paagrio<br1></a><font color="LEVEL">5 Chifre de Búfalo</font></td>
</tr>
</table></center>
<br><img src="L2UI.SquareWhite" width=250 height=1>

</body></html>[/CODE]


onde
ignorar scripts_services.Buffer:actBBS ask=9610 - (buff_templates.xml -> onde 9610 está abaixo

XML:
<template menuId="9610" target="BUFF_PLAYER">
        <consumidor>
            <item id="7186" amount="2" />
        </consumir>
        <produzir>
            <skill id="9610" level="2" />
        </produce>
    </template>

No início, é claro que não há nenhum bbs no seu lugar e isso é algo que funciona.
Eu só queria criar um item e, ao clicar nele, um manipulador de eventos chamaria um script que abriria a caixa de diálogo do buffer do NPC que o servidor possui. Resumindo: clicar no item abre o HTML do buffer do NPC por meio do script.
 
are you sure you need to specify:
<set name="EtcItemType" value="OTHER" />

instead of just "type"?
<set name="type" value="OTHER" />

(I'm not using your branch so I'm not 100% sure)
 
я тебе и предложил решение в котором только существующие компоненты и фиды без дополнительных скриптов и экстеншенов, всё что нужно - это ссылка на html в айтеме и вёрстка страница, которая привязана к уже существующей логики фида бафов buff_templates.xml (бафер люцеры стандартный работает как раз на этом фиде buff_templates.xml)

Я уже тогда просто не понимаю что ты хочешь, зачем насиловать логику, если конечно ты желаешь такое, то я не буду тебя останавливать.
 
Back
Top