How to work with a Buffer and to do a Premium buff

Deazer

Разработчик
Staff member
#1
Data Location:
Default NPC id is - 40010
Dialogues - gameserver\data\html-en\mods\buffer
XML scheme with Buffs their levels, prices and so on - gameserver\data\buff_templates.xml

We will consider XML and its buff_templates.xml format:

Example:

XML:
<template menuId="200" target="BUFF_PLAYER">
<consume>
<item id="57" amount="200000" />
</consume>
<produce>
<skill id="1068" level="3" />
<skill id="1040" level="3" />
<skill id="1086" level="2" />
<skill id="1204" level="2" />
<skill id="1077" level="3" />
<skill id="1242" level="2" />
<skill id="1268" level="4" />
</produce>
</template>
menuId - ID on which we address a buffer
target - whom buff, BUFF_PLAYER or BUFF_PET
consume - id and quantity of items.
produce - here is stored buff or schemes of buffs.
Example:
XML:
<consume>
<item id="57" amount="200000" /> consume 200000 adena
<item id="4037" amount="0" /> for Premium buff we only check in inventory item if set zero
</consume>
Also you can use several items in the sheet from which the first of the existing ones in the inventory will be consumed - it is convenient for premium accounts with different lengths. Example:
XML:
  <consume anyFirst="true">
  <item id="6673" amount="0" />
  <item id="4037" amount="0" />
  </consume>
Checking for a player’s premium account:
Code:
<template menuId="124" target="BUFF_PLAYER">
    <consume>
        <item id="57" amount="600000" is_premium_required="true"/>
    </consume>
    <produce>
        <skill id="1068" level="3" />
        <skill id="1040" level="3" />
        <skill id="1086" level="2" />
        <skill id="1204" level="2" />
        <skill id="1077" level="3" />
        <skill id="1242" level="2" />
        <skill id="1268" level="4" />
    </produce>
</template>
produce - here is stored buff or schemes of buffs.
Example:
XML:
<produce>
<skill id="1068" level="1" />
</produce>
or alot buffs
XML:
<produce>
<skill id="1068" level="3" />
<skill id="1040" level="3" />
<skill id="1086" level="2" />
<skill id="1204" level="2" />
<skill id="1077" level="3" />
<skill id="1242" level="2" />
<skill id="1268" level="4" />
</produce>

If we want to remove items from a certain level, then:
XML:
<consume>
<item id="57" amount="200000" from_level="20"/> Thus, the player before the 20th will be buff free
</consume>
restrict by min level
XML:
<template menuId="126" target="BUFF_PLAYER" minLevel="51"> Min level for get buff
<consume>
<item id="57" amount="200000" />
</consume>
<produce>
<skill id="1068" level="3" />
<skill id="1040" level="3" />
<skill id="1086" level="2" />
</produce>
</template>
Example for on additions in XML and dialogue:

2. The button to which we add dialogue
<a action="bypass -h scripts_services.Buffer:act ask=200&reply=1">Fighter 1 lvl</a>

now in details:
ask=200 - is MenuID to Buff with XML or to a set of buff
&reply=1 - on what page will be return. In ours cases it will be returned on 1.htm
_____________________________________________________________
<template menuId="200" target="BUFF_PLAYER">
<consume>
<item id="57" amount="200000" />
</consume>
<produce>
<skill id="1068" level="3" />
<skill id="1040" level="3" />
<skill id="1086" level="2" />
<skill id="1204" level="2" />
<skill id="1077" level="3" />
<skill id="1242" level="2" />
<skill id="1268" level="4" />
</produce>
</template>
 
Last edited:

Deazer

Разработчик
Staff member
#2
Old customers can write me to skype and I make auto convertation old buffer SQL to new XML
 

Uranius

Пользователь
#3
XML:
<template menuId="126" target="BUFF_PLAYER" minLevel="51"> Min level for get buff
Can you implement MaxLevel for get buff?
 

Diabaths

Новичок
#4
also this action="bypass -h scripts_services.Buffer:act ask=-2&reply=npc-40010" ask my for adena where can i remove adena for restore- cancel buffs?
 

arquisoft

Новичок
#8
Thank you!

The premium buffer is working PERFECTLY!!

Just need a way to put RESTORE and CANCEL to work only with PREMIUM ACCOUNT.
 
Top