Shop, Currency & Kits

Shop, Currency & Kits 2.8

No permission to download
Advertisement

Official Game Server Partner

Kristane

New member
Messages
4
Likes
0
Points
1
I have a prefab config with castles and keeps mod with kits and teired dinos but no flyers
DM me and its yours for $20 thru paypal, no refunds.
 

DoC

Banned
Messages
73
Likes
12
Points
8
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()
Would you be able to do the same for permissions too?
 

Rumaan

New member
Messages
6
Likes
0
Points
1
Is there a way to disable the "/shop #" command, even if it's just rendering it useless? We have several servers and I'd like to be able to use one shop file for all of them. The problem with this is that the /shop command will list everything in the file, even if it doesn't actually work. We have a UI that lists all of the purchasable items for that server, but for some reason people default to the tedious method of using /shop to browse through several hundred unsorted items. Thanks in advance!
 

Pelayori

New member
Messages
3
Likes
0
Points
1
Hey, the plugin doesn't want to start after correcting all errors of parsing.
Attaching config file.
Thanks for helping me
 

Attachments

Last edited:

DoC

Banned
Messages
73
Likes
12
Points
8
You're missing DefaultAmount on the other kits besides "gear" Kit. Not sure if it is mandatory but i have that on all of my kits ;-)

Also, these are wrong:

"Loot Beacon":{
"Type":"beacon",
"Description":"Loot Crate",
"Price":1000,
"ClassName":"SupplyCrate_UnderwaterCaveTier3_C",
"MinLevel":70
},
"EXP Points":{
"Type":"experience",
"Description":"10000 Points Of Experience",
"GiveToDino":true,
"Price":2500,
"Amount":10000
},
"Direwolf":{
"Type":"dino",
"MinLevel":25,
"Description":"lvl 150 Direwolf",
"Level":150,
"Price":300,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Direwolf/Direwolf_Character_BP.Direwolf_Character_BP'"
},

Should be:
"lootbeacon":{
"Type":"item",
"Description":"Loot Crate",
"Price":1000,
"ClassName":"SupplyCrate_UnderwaterCaveTier3_C",
"MinLevel":70
},
"exppoints":{
"Type":"experience",
"Description":"10000 Points Of Experience",
"GiveToDino":true,
"Price":2500,
"Amount":10000
},
"direwolf":{
"Type":"dino",
"MinLevel":25,
"Description":"lvl 150 Direwolf",
"Level":150,
"Price":300,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Direwolf/Direwolf_Character_BP.Direwolf_Character_BP'"
},
 

WETBATMAN

Active member
Plugin Developer
Donators
Messages
186
Likes
49
Points
28
Website
dopeark.com
You're missing DefaultAmount on the other kits besides "gear" Kit. Not sure if it is mandatory but i have that on all of my kits ;-)

Also, these are wrong:

"Loot Beacon":{
"Type":"beacon",
"Description":"Loot Crate",
"Price":1000,
"ClassName":"SupplyCrate_UnderwaterCaveTier3_C",
"MinLevel":70
},
"EXP Points":{
"Type":"experience",
"Description":"10000 Points Of Experience",
"GiveToDino":true,
"Price":2500,
"Amount":10000
},
"Direwolf":{
"Type":"dino",
"MinLevel":25,
"Description":"lvl 150 Direwolf",
"Level":150,
"Price":300,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Direwolf/Direwolf_Character_BP.Direwolf_Character_BP'"
},

Should be:
"lootbeacon":{
"Type":"item",
"Description":"Loot Crate",
"Price":1000,
"ClassName":"SupplyCrate_UnderwaterCaveTier3_C",
"MinLevel":70
},
"exppoints":{
"Type":"experience",
"Description":"10000 Points Of Experience",
"GiveToDino":true,
"Price":2500,
"Amount":10000
},
"direwolf":{
"Type":"dino",
"MinLevel":25,
"Description":"lvl 150 Direwolf",
"Level":150,
"Price":300,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Direwolf/Direwolf_Character_BP.Direwolf_Character_BP'"
},
for kits DefaultAmount is mandatory as far as i know
 

Pelayori

New member
Messages
3
Likes
0
Points
1
You're missing DefaultAmount on the other kits besides "gear" Kit. Not sure if it is mandatory but i have that on all of my kits ;-)

Also, these are wrong:

"Loot Beacon":{
"Type":"beacon",
"Description":"Loot Crate",
"Price":1000,
"ClassName":"SupplyCrate_UnderwaterCaveTier3_C",
"MinLevel":70
},
"EXP Points":{
"Type":"experience",
"Description":"10000 Points Of Experience",
"GiveToDino":true,
"Price":2500,
"Amount":10000
},
"Direwolf":{
"Type":"dino",
"MinLevel":25,
"Description":"lvl 150 Direwolf",
"Level":150,
"Price":300,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Direwolf/Direwolf_Character_BP.Direwolf_Character_BP'"
},

Should be:
"lootbeacon":{
"Type":"item",
"Description":"Loot Crate",
"Price":1000,
"ClassName":"SupplyCrate_UnderwaterCaveTier3_C",
"MinLevel":70
},
"exppoints":{
"Type":"experience",
"Description":"10000 Points Of Experience",
"GiveToDino":true,
"Price":2500,
"Amount":10000
},
"direwolf":{
"Type":"dino",
"MinLevel":25,
"Description":"lvl 150 Direwolf",
"Level":150,
"Price":300,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Direwolf/Direwolf_Character_BP.Direwolf_Character_BP'"
},
I think I did what you said but still the same error
Very thankful with you btw :D
My file is attached
 

Attachments

Top