Jump to content

Weekly Trader (With Random Items)


Recommended Posts

What is weekly trader?

 

In a few words, the whole idea is the following:

  • Trader (NPC) spawns at a specific day of the week with randomly generated items. (Read above to understand)
  • Trader stays there for a specific duration.
  • Trader leaves.
  • Trader spawns next week with another items in multisell.

 

You can configure this system exactly as you want, with unlimted items, randomly (or not) selected.

 

Take a look at this file:

Spoiler

<weeklytrader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/weekly_trader.xsd">
    <!-- FAME ID: -300 -->
    <!-- CLAN REPUTATION SCORE: -200 -->
    <!-- PC BANG: -100 -->
    
    <!-- Moirai Parts -->
    <item_category chance="100">
        <!-- Moirai Parts for Gold Bars -->
        <item>
            <!--  Moirai Heavy Helmet Foundation -->
            <production itemId="16289" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="5" maxCount="10"/>
        </item>
        <!-- Moirai Parts for Apiga -->
        <item>
            <!--  Moirai Heavy Helmet Foundation -->
            <production itemId="16289" count="1"/>
            <!-- Apiga -->
            <ingredient itemId="9142" minCount="500" maxCount="1000"/>
        </item>
    </item_category>
    <!-- Raid Jewels -->
    <item_category chance="20"> <!-- 20% chance to have a raid jewel -->
        <!-- Valakas for Gold Bars -->
        <item>
            <!--  Valakas -->
            <production itemId="6657" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="50" maxCount="100"/>
        </item>
        <!-- Valakas for Gold Bars & Apiga -->
        <item>
            <!--  Valakas -->
            <production itemId="6657" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="25" maxCount="50"/>
            <!-- Apiga -->
            <ingredient itemId="9142" minCount="2000" maxCount="3000"/>
        </item>
    </item_category>
</weeklytrader>

 

 

The node <item_category chance="100">  means that the multisell will have one of the following entries with 100% chance. Therefore one of the items (entries) of this category will be selected with a random ingredient item count beetween the min and the max(<ingredient itemId="9142" minCount="500" maxCount="1000"/>). You can add as many as production items or ingredients you want (just like a normal multisell).

Special ingredients (FAME,CRP,PCPOINTS) are also accepted.

 

In order to make this more straight, i will give you an example:

You want trader to have every saturday (check the configs info below) one raid jewel, what would you do? Easy, just check:

 

Spoiler

 


<item_category chance="100">
        <item>
            <!--  Valakas -->
            <production itemId="6657" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="50" maxCount="100"/>
        </item> 
    </item_category>

<item_category chance="100">
        <item>
            <!-- Another Valakas -->
            <production itemId="6657" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="50" maxCount="100"/>
        </item> 
    </item_category>

<item_category chance="100">
        <item>
            <!-- Another Valakas -->
            <production itemId="6657" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="50" maxCount="100"/>
        </item> 
    </item_category>

<item_category chance="100">
        <item>
            <!-- Another Valakas -->
            <production itemId="6657" count="1"/>
            <!-- Gold Bars -->
            <ingredient itemId="3470" minCount="50" maxCount="100"/>
        </item> 
    </item_category>

 

 

So after something like this, traader will choose one random RB jewel between 50 and 100 gold bars.

 

You can have as many item_categories as you want.

 

Configs Preview:

Spoiler

#Enable/Disable whole Weekly Trading System.
#Default: False
EnableWeeklyTrader = True

 

#Which day of the week trading period will be started.
#1 = SUNDAY
#2 = MONDAY
#.
#.
#7 = SATURDAY
#Default: 7 (SATURDAY)
DayOfWeek = 4

 

#What hour of the day.
#24h format
#Default: 0 (Midnight)
HourOfDay = 20

 

#What minute of the hour.
#Default: 30 (30 Minutes After Midnight)
MinuteOfHour = 03

 

#How long trading period will be opened.
#TimeUnit: Minutes
#Default: 1440 (1 Day)
Duration = 120

 

#The ID of the dynamically generated multisell.
#Make sure there is no multisell with this id in data/multisell.
#Default: 99999999
MultisellId = 99999999

 

#The ID of the trader NPC
#Default: 37500
NpcId = 37500

 

#Spawn Location of the NPC.
#Format: x,y,z,heading
#Default: 82170,149329,-3405,48319 (Giran Castle Town)
SpawnLocation = 82170,149329,-3405,48319

 

#If true, NPC will be always spawned in "SpawnLocation".
#If false, NPC will spawn when period starts, and will be deleted when period will end.
#Default: False
AlwaysSpawned = False

 

 

Also you the time before trading period starts/stop is visible to the trader NPC (just a small touch).

 

 

Why would i use that on my server?

 

(The whole idea behind this system)

To add foundation armor parts randomly every weekend with random item every weekend.

Something like:

I want to buy a Moirai Heavy Set Foundation. What do i need? I go to the trader and i see that it sells Vesper Robe Foundation Boots for 100 Gold Bars. So my thought is that i will wait for next items, and maybe one part from moirai heavy will come. I will have my GBs ready.

Next weekend arrives, Moirai Heavy Boots Available, but damn it. It asks for apiga, i was farming gold bars. It is weekend, so i have to farm the apigas because i dont know when this part will come again.

 

Code Info: The selected items for the "weekend" are saved into database. If server is closed, system will autmatically recognise if server opens in a trading period and will spawn/despawn the NPC (and clean database from the saved item entries).

 

Tiny Preview: https://imgur.com/a/KuNU3

 

 

Price: 10€

 

Payment Methods:

Paysafe

Paypal

 

Contact me via (knip.ex):
s498M3y.png     

 

Available for: High Five, Interlude.

Can Be Adapted To: Everything.

Skpe: knip.ex

 

Edited by Solomun
Link to comment
Share on other sites

I love how descriptive this trader is, for real. I like this one and also I'm a fan of new and useful ideas.

Good luck with your sales mate :)

Link to comment
Share on other sites

30 minutes ago, protoftw said:

I love how descriptive this trader is, for real. I like this one and also I'm a fan of new and useful ideas.

Good luck with your sales mate :)

 

7 minutes ago, Sinister Smile said:

Awesome idea buddy! Good luck with the sales!

Thanks...both of you! :)

Link to comment
Share on other sites

12 hours ago, GamePsychology said:

Move all configs to xml settings.

Thank you for your opinion but i like the properties configs more, i don't know why....

 

If anyone wants them in XML, it would be my pleasure to do it for him.

Link to comment
Share on other sites

19 minutes ago, Solomun said:

Thank you for your opinion but i like the properties configs more, i don't know why....

 

If anyone wants them in XML, it would be my pleasure to do it for him.

Do it for me. 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 weeks later...
On 9/4/2018 at 2:34 PM, Celestine said:

Trusted & skilled gonna order few codes once my real life friend return from spain.

 

I think thats me

Link to comment
Share on other sites

  • 9 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...