Lua Auction System + Upgrade System

samandriel

Member
Joined
Oct 19, 2016
Messages
49
Reaction score
1
I do have 2 system i found here on forum...
I love both and i want to use both together, but idk how, so i need help of someone who have experience in here

system 1: upgrade your items, one by one, add more armor,attack,defense...
/lib/upgradesystem.lua
hastebin

system 2: auction system, is like a market, trade offline to a 8.60 server
/talkactions/scripts/auctionsystem.lua
hastebin
(from here: TalkAction - Offline player to player item trader (Auction System). , allmost all bigs ot 8.6 uses this, so if someone help me could help a lot others guys)

What is my problem? If i put a upgraded item on auction system it lose the upgrade...

What do i need to do?
My idea was add a new row:
Code:
ALTER TABLE `auction_system` ADD `upgrade_level` INT NOT NULL DEFAULT '0' AFTER `date`;
And if item is upgraded change upgrade lvl to 1,2,3 and somehow uses it on add,buy,remove item from auction system
And shows on website
But i don't have experience enough to do alone, anybody can help?


Full script?
Perfect Upgrade System
 
Last edited:

demonrage

New Member
Joined
Oct 28, 2014
Messages
5
Reaction score
0
or friend, how do I change to what is + 1 + 2 + 3?
instead of being legendary, godlike ... and also how do I get the number to be in front of the item name ex :( sword of broken + 1)
 
OP
samandriel

samandriel

Member
Joined
Oct 19, 2016
Messages
49
Reaction score
1
or friend, how do I change to what is + 1 + 2 + 3?
instead of being legendary, godlike ... and also how do I get the number to be in front of the item name ex :( sword of broken + 1)
Here you are: hastebin

/\ guys it's not about my topic, this guy just ask to another help,a edit in the script...
 
OP
samandriel

samandriel

Member
Joined
Oct 19, 2016
Messages
49
Reaction score
1
tell me your problem in your moon language, send me PM i'll do whatever i do know to do to try to help you...
but let this topic to someone who can help me pls
 

supergt

Member
Joined
May 11, 2017
Messages
65
Reaction score
22
Thats a good feature to have in a server, especially with a auction system...
Could you share your full code of this upgrade system, because if you have the solution in here, we could use too
 
OP
samandriel

samandriel

Member
Joined
Oct 19, 2016
Messages
49
Reaction score
1
Thats a good feature to have in a server, especially with a auction system...
Could you share your full code of this upgrade system, because if you have the solution in here, we could use too
Sure! I've edit the main post with the full script link
 

supergt

Member
Joined
May 11, 2017
Messages
65
Reaction score
22
Is anyone can help with a getUpgradedLevel function or something? I wanna use it too...
 

Sarah Wesker

ค∂vαηcε รүηтαx ❤
Joined
Mar 16, 2017
Messages
331
Reaction score
156
Location
London
Is anyone can help with a getUpgradedLevel function or something? I wanna use it too...
Code:
[email protected] el level de upgrade del item
--#Return number
function Item.getUpgradeLevel(item)
    local name = item:getName():split('+')
    if (#name > 1) then
        return math.abs(name[2])
    end
    return 0
end
example:
Code:
You see a sword +1 (Atk:14, Def:12 +1).
It weighs 35.00 oz.
^^^^
Code:
local level = item:getUpgradeLevel()
print(level) ==> 1
 

supergt

Member
Joined
May 11, 2017
Messages
65
Reaction score
22
Code:
[email protected] el level de upgrade del item
--#Return number
function Item.getUpgradeLevel(item)
    local name = item:getName():split('+')
    if (#name > 1) then
        return math.abs(name[2])
    end
    return 0
end
example:
Code:
You see a sword +1 (Atk:14, Def:12 +1).
It weighs 35.00 oz.
^^^^
Code:
local level = item:getUpgradeLevel()
print(level) ==> 1
This get the number after the '+', but if i dont use numbers?
If i want to use like on his script
Code:
   nameLv = {
       [1] = "legendary",
       [2] = "unstopable",
       [3] = "godlike"
   },
How to do?

legendary sabre (atk:12...
 
Top