Shop, Currency & Kits

Shop, Currency & Kits 2.6

No permission to download
Advertisement

Official Game Server Partner

copex

New member
Messages
6
Likes
3
Points
3
I have created this little piece of code in Python to merge sqlite ArkShop databases into one. You have to move all databases that you want to merge into one folder and set the folder in folder variable. Then you have to set in variable kits what kits you want to have in new merged database, as i havent gone that far to merge kits, only points. It will create a MergedArkShop.db with all points merged. It maybe helps to somebody.

Python:
import sqlite3
import glob
from sqlite3 import Error


def create_connection(db_file):
    try:
        conn = sqlite3.connect(db_file)
        return conn
    except Error as e:
        print(e)

    return None


def add_data(conn, data):
    cur = conn.cursor()
    l_data = data
    cur.execute("SELECT * FROM players")

    rows = cur.fetchall()

    for row in rows:
        steamid = row[1]
        points = row[3]
        if steamid in l_data:
            l_data[steamid] = l_data[steamid] + points
        else:
            l_data[steamid] = points

    return l_data


def main():
    folder = "C:\\sqlite\\"
    kits = "{""starter"":{""Amount"":0}}"

    dbs = glob.glob(folder + "*.db")
    data = {}
    for i in dbs:
        try:
            # create a database connection
            conn = create_connection(i)
            with conn:
                data = add_data(conn, data)
        except:
            print("Error on database " + i)

    database = folder + "MergedArkShop.db"
    try:
        conn = create_connection(database)
        cur = conn.cursor()
        cur.execute("CREATE TABLE Players (Id integer primary key autoincrement not null,SteamId integer default 0,Kits text default '{}',Points integer default 0)")
        for i in data.keys():
            cur.execute("INSERT INTO players (STEAMID,KITS,POINTS) VALUES (?,?,?)", (i, kits, data[i],))
        conn.commit()
    except:
        print("Error creating merged database")


if __name__ == '__main__':
    main()
 
Last edited:

Michidu

Administrator
Staff member
Messages
585
Likes
385
Points
63
Has this been implemented? I would like to use the /sell function as a resource converter instead of using mods. So like my server on the island the player could sell 100 Stone and receive 500 Sand or 100 Wood for 50 Fungal Wood. If this has been implemented sorry for the double post but I read all 78pgs and didn't find it.
Unfortunately, not yet. But still planned :)
Hello,

Is there a way to reward all new players with a score of X points on their first joining?
Have tried it with a kit but did not manage it.

Many Thanks.
The easiest way is modify default points value in the db.
 

arfus

New member
Messages
5
Likes
0
Points
1
Website
arfus.tebex.io
"quetztek":{
"Permissions":"Admins,Premiums,VIP1,VIP2,VIP3",
"Type":"dino",
"Description":"Quetztek pour les vip ",
"Level":250,
"Price":1500,
"MinLevel":1,
"MaxLevel":330,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Quetzalcoatlus/BionicQuetz_Character_BP.BionicQuetz_Character_BP'"
},
j'arrive pas a mettre la permission
 
Messages
1
Likes
0
Points
1
Hi guys, perhaps its a quick fix and something on my side (I don't know, my first time ever dealing with this)

The ark points work on my server, the kits at spawn work, however, when it comes to buying things from the shop /buy doesn't work.
I have attached my config. Any help would be appreciated. I didn't want to get too far in, just incase it didn't work.
 

Attachments

Rumaan

New member
Messages
4
Likes
0
Points
1
So I thought I was doing everything okay, ran the code through a json verifier, etc. But I can't seem to get this code to load properly. It doesn't help that I don't have access to the server itself (just an admin, not the server owner). I followed examples from this page's examples list to get the code formats and the only deviation I made was to place two extra whitespace lines between batches of code to help myself sort where different things were. Basically two enters between }, and "nextitem":{ in the "ShopItems" section.

Is this what is screwing up my code? I'd fix it and try it again, but due to different timezones I probably won't get the file loaded until tomorrow night and I'd like to get it right this time (will be the 4th attempt).

Any advice would be welcomed.
 

Attachments

bmwdeejay

New member
Messages
6
Likes
0
Points
1
Hello,

Currently when you type /kit in the shop it says NO MESSAGE even tho there is kits has anyone else had this issue? same with /shop 1
 
Last edited:

DoC

Member
Messages
34
Likes
6
Points
8
1. Have you got all the messages at the bottom of the json?
2. When you add yourself to the group you have to remove yourself / the player from default and then re-add otherwise you only get the default points. I think it's a bug in this plugin as I think it only awards for the 1st group that the player is in i.e Default.
 

bmwdeejay

New member
Messages
6
Likes
0
Points
1
Hello,

Currently when you type /kit in the shop it says NO MESSAGE even tho there is kits has anyone else had this issue? same with /shop 1
 
Last edited:

beesting

New member
Messages
1
Likes
0
Points
1
Hi I having a problem with my config, can you please take a look at it. The server keeps crashing when I but any trophy items. Here is my config:

{
"General":{
"TimedPointsReward":{
"Enabled":true,
"Interval":30,
"Groups":{
"Default":{
"Amount":5
},
"Premiums":{
"Amount":15
}
}
},
"ItemsPerPage":15,
"ShopDisplayTime":15.0,
"ShopTextSize":1.3,
"DbPathOverride":"",
"DefaultKit":""
},
"Kits":{
},
"ShopItems":{
"argytalons10":{
"Type":"item",
"Description":"Argy Talons 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Argentavis.PrimalItemResource_ApexDrop_Argentavis'"
}
]
},
"sarcoskins10":{
"Type":"item",
"Description":"Sarco Skins 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Sarco.PrimalItemResource_ApexDrop_Sarco'"
}
]
},
"sauropod10":{
"Type":"item",
"Description":"Sauropod Vertebrae 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Sauro.PrimalItemResource_ApexDrop_Sauro'"
}
]
},
"titanoboa10":{
"Type":"item",
"Description":"Titanoboa Venom 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Boa.PrimalItemResource_ApexDrop_Boa'"
}
]
},
"Megalaniatoxin10":{
"Type":"item",
"Description":"Megalania Toxin 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Megalania.PrimalItemResource_ApexDrop_Megalania'"
}
]
},
"megalodonteeth10":{
"Type":"item",
"Description":"Megalodon Teeth 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Megalodon.PrimalItemResource_ApexDrop_Megalodon'"
}
]
},
"spinosails10":{
"Type":"item",
"Description":"Spino Sails (10x)",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Spino.PrimalItemResource_ApexDrop_Spino'"
}
]
},
"thericlaws10":{
"Type":"item",
"Description":"Theri Claws 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Theriz.PrimalItemResource_ApexDrop_Theriz'"
}
]
},
"thylacoleo10":{
"Type":"item",
"Description":"Thylacoleo Claws 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Thylaco.PrimalItemResource_ApexDrop_Thylaco'"
}
]
},
"allosaurus10":{
"Type":"item",
"Description":"Allosaurus Brains 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Allo.PrimalItemResource_ApexDrop_Allo'"
}
]
},
"basiloblubber10":{
"Type":"item",
"Description":"Basilo Blubber (10x)",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Basilo.PrimalItemResource_ApexDrop_Basilo'"
}
]
},
"gigaheart2":{
"Type":"item",
"Description":"Giga Heart 2x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":2,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Giga.PrimalItemResource_ApexDrop_Giga'"
}
]
},
"tusotenacle10":{
"Type":"item",
"Description":"Tuso Tentacles 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":2,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Tuso.PrimalItemResource_ApexDrop_Tuso'"
}
]
},
"rexarms15":{
"Type":"item",
"Description":"Rex Arms 15x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":15,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Rex.PrimalItemResource_ApexDrop_Rex'"
}
]
},
"yutylungs10":{
"Type":"item",
"Description":"Yuty Lungs 10x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":10,
"Blueprint":
"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Yuty.PrimalItemResource_ApexDrop_Yuty'"
}
]
},
"basiliks8":{
"Type":"item",
"Description":"Basilik Fangs 8x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":8,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Basilisk_Alpha.PrimalItemResource_ApexDrop_Basilisk_Alpha'"
}
]
},
"nameless20":{
"Type":"item",
"Description":"Nameless Venom 20x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":20,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemConsumable_NamelessVenom.PrimalItemConsumable_NamelessVenom'"
}
]
},
"reaperglands7":{
"Type":"item",
"Description":"Reaper Glands 7x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":7,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_XenomorphPheromoneGland.PrimalItemResource_XenomorphPheromoneGland'"
}
]
},
"rockdrakefeathers7":{
"Type":"item",
"Description":"Rock Drake Feather 7x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":7,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_RockDrake.PrimalItemResource_ApexDrop_RockDrake'"
}
]
},
"alphabasilik1":{
"Type":"item",
"Description":"Alpha Basilik Fang 1x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":1,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_Basilisk_Alpha.PrimalItemResource_ApexDrop_Basilisk_Alpha'"
}
]
},
"alphakarkino1":{
"Type":"item",
"Description":"Alpha Karkino Claw 1x",
"Price":30,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":1,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_CrabClaw.PrimalItemResource_ApexDrop_CrabClaw'"
}
]
},
"alphareaper1":{
"Type":"item",
"Description":"Alpha Reaper King Barb (1x)",
"Price":100,
"Items": [
{
"Quality": 0,
"ForceBlueprint": false,
"Amount":1,
"Blueprint":
"Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_ApexDrop_ReaperBarb.PrimalItemResource_ApexDrop_ReaperBarb'"
}
]
},
"tools":{
"Type":"item",
"Description":"Tools (Metal Hatchet, Metal Pick)",
"Price":5,
"Items":[
{
"Quality":0,
"ForceBlueprint":false,
"Amount":1,
"Blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponMetalHatchet.PrimalItem_WeaponMetalHatchet'"
},
{
"Quality":0,
"ForceBlueprint":false,
"Amount":1,
"Blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponMetalPick.PrimalItem_WeaponMetalPick'"
}
]
},
"featherlight":{
"Type":"dino",
"Description":"Featherlight",
"Level":180,
"Price":40,
"MinLevel":1,
"MaxLevel":180,
"Blueprint":"Blueprint'/Game/Aberration/Dinos/LanternBird/LanternBird_Character_BP.LanternBird_Character_BP'"
},
"phoenix":{
"Type":"dino",
"Description":"Phoenix",
"Level":314,
"Price":400,
"MinLevel":1,
"MaxLevel":314,
"Blueprint":"Blueprint'/Game/ScorchedEarth/Dinos/Phoenix/Phoenix_Character_BP.Phoenix_Character_BP'"
},
"shinehorn":{
"Type":"dino",
"Description":"Shinehorn",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/Aberration/Dinos/LanternGoat/LanternGoat_Character_BP.LanternGoat_Character_BP'"
},
"bulbdog":{
"Type":"dino",
"Description":"Bulbdog",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/Aberration/Dinos/LanternPug/LanternPug_Character_BP.LanternPug_Character_BP'"
},
"glowtail":{
"Type":"dino",
"Description":"Glowtail",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/Aberration/Dinos/LanternLizard/LanternLizard_Character_BP.LanternLizard_Character_BP'"
},
"jerboa":{
"Type":"dino",
"Description":"Jerboa",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/ScorchedEarth/Dinos/Jerboa/Jerboa_Character_BP.Jerboa_Character_BP'"
},
"microraptor":{
"Type":"dino",
"Description":"Microraptor",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Microraptor/Microraptor_Character_BP.Microraptor_Character_BP'"
},
"dimorphodon":{
"Type":"dino",
"Description":"Dimorphodon",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Dimorphodon/Dimorph_Character_BP.Dimorph_Character_BP'"
},
"mesopithecus":{
"Type":"dino",
"Description":"Mesopithecus",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Monkey/Monkey_Character_BP.Monkey_Character_BP'"
},
"vulture":{
"Type":"dino",
"Description":"Vulture",
"Level":180,
"Price":40,
"Neutered":false,
"Blueprint":"Blueprint'/Game/ScorchedEarth/Dinos/Vulture/Vulture_Character_BP.Vulture_Character_BP'"
}
},
"SellItems": {
},
"Messages":{
"Sender":"ArkShop",
"BoughtItem":"<RichColor Color=\"0, 1, 0, 1\">You have successfully bought item</>",
"BoughtDino":"<RichColor Color=\"0, 1, 0, 1\">You have successfully bought dino</>",
"BoughtBeacon":"<RichColor Color=\"0, 1, 0, 1\">You have successfully bought beacon</>",
"BoughtExp":"<RichColor Color=\"0, 1, 0, 1\">You have successfully bought experience</>",
"ReceivedPoints":"<RichColor Color=\"1, 1, 0, 1\">You have received {0} points! (total: {1})</>",
"HavePoints":"You have {0} points",
"NoPoints":"<RichColor Color=\"1, 0, 0, 1\">You don't have enough points</>",
"WrongId":"<RichColor Color=\"1, 0, 0, 1\">Wrong id</>",
"NoPermissionsKit":"<RichColor Color=\"1, 0, 0, 1\">You don't have permission to use this kit</>",
"CantBuyKit":"<RichColor Color=\"1, 0, 0, 1\">You can't buy this kit</>",
"BoughtKit":"<RichColor Color=\"0, 1, 0, 1\">You have successfully bought {0} kit</>",
"AvailableKits":"Available kits for you:",
"NoKits":"No available kits",
"KitsLeft":"You have {0} {1} kits left",
"NoKitsLeft":"You don't have {0} kits left",
"CantGivePoints":"<RichColor Color=\"1, 0, 0, 1\">You can't give points to yourself</>",
"RidingDino":"<RichColor Color=\"1, 0, 0, 1\">You can't buy this item while riding a dino</>",
"SentPoints":"<RichColor Color=\"0, 1, 0, 1\">You have successfully sent {0} points to {1}</>",
"GotPoints":"You have received {0} points from {1}",
"NoPlayer":"<RichColor Color=\"1, 0, 0, 1\">Player doesn't exist</>",
"FoundMorePlayers":"<RichColor Color=\"1, 0, 0, 1\">Found more than one player with the given name</>",
"BuyUsage":"Usage: /buy id amount",
"ShopUsage":"Usage: /shop page",
"KitUsage":"Usage: /kit KitName",
"BuyKitUsage":"Usage: /BuyKit KitName amount",
"TradeUsage":"Usage: /trade 'Player Name' amount",
"PointsCmd":"/points",
"TradeCmd":"/trade",
"BuyCmd":"/buy",
"ShopCmd":"/shop",
"KitCmd":"/kit",
"BuyKitCmd":"/buykit",
"SellCmd":"/sell",
"ShopSellCmd":"/shopsell",
"SellUsage":"Usage: /sell id amount",
"NotEnoughItems":"<RichColor Color=\"1, 0, 0, 1\">You don't have enough items ({0}/{1})</>",
"SoldItems":"<RichColor Color=\"0, 1, 0, 1\">You have successfully sold items</>",
"BadLevel":"<RichColor Color=\"1, 0, 0, 1\">Required level: {0} - {1}</>",
"KitsListPrice":"Price: {0}",
"KitsListFormat":"\"{0}\" - {1}. {2} left. {3}\n",
"StoreListDino":"{0}) {1}. Level: {2}. Id: {3}. Price: {4}\n",
"StoreListItem":"{0}) {1}. Id: {2}. Price: {3}\n",
"StoreListFormat":"{0}",
"OnlyOnSpawnKit":"This kit can be used only on spawn",
"HelpCmd":"/shophelp",
"ShopMessage":"Usage: /buy id amount",
"HelpMessage":"This is shop help message"
}
}
 
Top