How to edit the promo code service

Deazer

Head Developer
Staff member
Enable service:
gameserver/config/services.properties
##### Promo code service #####
# For configuration and promotional codes, you need to edit data/promocodes.xml
# Bypass for NPC <a action="bypass -h scripts_services.PromoCodeService:showPromo">Activate promo code</a>
PromoCodeServiceEnable = False
# Calling a promo code by a command .promo .promocode
PromoCodeCommandEnable = False

Location:
gameserver/data/promocodes.xml

Now let's look at the different settings:

1. Base
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "promocodes.dtd">
<list>
    <code name="HELLO" limitByUser="false">
        <date from="12:00 12.12.2012" to="12:00 13.13.2013" /> <!-- format HH:mm dd.MM.yyyy -->
        <item id="57" count="212" /> <!-- Min: 1 Max: 2147483647 -->
        <exp val="11" /> <!-- Min: 1 Max: 2147483647 -->
        <sp val="111" /> <!-- Min: 1 Max: 2147483647 -->
        <addLevel val="1" /> <!-- Min: 1 Max: 80 -->
    </code>
</list>

name="HELLO" - the promo code itself that you will distribute and that the player will enter
limitByUser="false" - if set to True, then the promo code will apply to accounts that you manually add to the promocode_users table
date from="12:00 12.12.2012" to="12:00 13.13.2013" - the time from which the promo code starts to work and when it ends
<item id="57" count="212" /> Item to be issued
<exp val="11" /> How much Exp will be added
<sp val="111" /> How much SP will be added
<addLevel val="1" /> How much will be added to the current level

2. Extended
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "promocodes.dtd">
<list>
    <code name="HELLO" limitByUser="false" limit="100">
        <date from="12:00 12.12.2012" to="12:00 13.13.2013" /> <!-- format HH:mm dd.MM.yyyy -->
        <item id="57" count="212" /> <!-- Min: 1 Max: 2147483647 -->
        <exp val="11" /> <!-- Min: 1 Max: 2147483647 -->
        <sp val="111" /> <!-- Min: 1 Max: 2147483647 -->
        <setLevelval="80" /> <!-- Min: 1 Max: 80 -->
    </code>
</list>
<code name="HELLO" limitByUser="false" limit="100"> under this condition, players will be able to use this promo code only 100 times in total, on different accounts. 1 account can use it only 1 time.
<setLevelval="80" /> - with this parameter, the level will not be added, but the specified one will be set immediately. Let's say the player entered the code and he had level 1, he will become level 80.
<item id="7575" count="1" enchant="3"/> - Now an example with the issuance of enchanted weapon. This variant will give you a Draconic Bow with +3 enchant
 
Last edited:
Add HWID and IP Check
Example:
<code name="HELLO" limitByHWID="true">
<code name="HELLO" limitByIP="true">
 
The option limit By User="false" limit="100" has a problem. If you activate this option, the code stops working and the message below appears
Please check @Deazer
Lucera Classic

 
The option limit By User="false" limit="100" has a problem. If you activate this option, the code stops working and the message below appears
Please check @Deazer
Lucera Classic

check your database, you already have 100 rows with this promo, that is limit on this promocode
 
Back
Top