Hello.
I'd like to place an NPC in my server who gives to us a new character:
if you already have a druid on acc, you won't get new druid or sorc,
if you already have a sorc on acc, you won't also get new druid or sorc.
you need to have some storage value >= 1000 to get this converstation with npc started.
I could actually do it myself, but it definitely needs knowledge of sql which I don't know at all... (except phpmyadmin )
Is there anyone who could just make this NPC or eventually give me an advice how should I make a query in NPC which checks characters on account?
I'd be grateful
I'm using TFS 1.0 and mysql through phpmyadmin.
@EDIT solved! at last!
query should look like this:
I'd like to place an NPC in my server who gives to us a new character:
if you already have a druid on acc, you won't get new druid or sorc,
if you already have a sorc on acc, you won't also get new druid or sorc.
you need to have some storage value >= 1000 to get this converstation with npc started.
I could actually do it myself, but it definitely needs knowledge of sql which I don't know at all... (except phpmyadmin )
Is there anyone who could just make this NPC or eventually give me an advice how should I make a query in NPC which checks characters on account?
I'd be grateful
I'm using TFS 1.0 and mysql through phpmyadmin.
@EDIT solved! at last!
query should look like this:
Code:
local acc = getAccountNumberByPlayerName(cid)
local vocid = 2 --druid
local check = db.storeQuery("SELECT * FROM players WHERE `account_id` = ".. db.escapeString(acc) .." AND `vocation` = " .. vocid)
if check ~= false then
selfSay("You already have druid!", cid)
end
Last edited: