Jump to content
×
×
  • Create New...
  • 0

How to get client bonus name on quest


Karbust

Question

6 answers to this question

Recommended Posts

  • 2

if you have an ingame ui for your system just send the affect id to the client. otherwise you have to build a lua table having the ids as keys and the names as values.

  • Love 1

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

  • 0

Hello,
idea or imagine,
 

Spoiler

Client side:
 

Spoiler

Go to locale_XY/locale/XY/locale_game.txt.
Search this and Copy from
TOOLTIP_ANTI_CRITICAL_PCT
to
TOOLTIP_WRISTLET
CTRL+C

Go to server side:
 

Spoiler

/quest/locale.lua
and paste to the locale.lua
CTRL+V
CTRL+H
TOOLTIP_  CHANGE TO locale.TOOLTIP_
CTRL+S

In quest example:
say(locale.TOOLTIP_ANTI_CTRITICAL_PCT)
say(locale.TOOLTIP_ANTI_CRITICAL_PCT)

say("+10%")

Or
Make this with MySQL :D

Link to comment
Share on other sites

  • 0
  • Web Developer
22 hours ago, [007]DawisHU said:

Hello,
idea or imagine,
 

  Hide contents

Client side:
 

  Hide contents

Go to locale_XY/locale/XY/locale_game.txt.
Search this and Copy from
TOOLTIP_ANTI_CRITICAL_PCT
to
TOOLTIP_WRISTLET
CTRL+C

Go to server side:
 

  Hide contents

/quest/locale.lua
and paste to the locale.lua
CTRL+V
CTRL+H
TOOLTIP_  CHANGE TO locale.TOOLTIP_
CTRL+S

In quest example:
say(locale.TOOLTIP_ANTI_CTRITICAL_PCT)
say(locale.TOOLTIP_ANTI_CRITICAL_PCT)

say("+10%")

Or
Make this with MySQL :D

I don't want something like that, I want to get the name by the bonus ID, since it's to use on my pet system and the bonuses are controlled by the quest, on the quest I only have the ID, but the value changes with the pet level, so, it's never the same and the bonus of the pets aren't the same either...

QJ0orbR.png

Metin2 Icon Database

Link to comment
Share on other sites

  • 0
  • Web Developer
Just now, PACI said:

if you have an ingame ui for your system just send the affect id to the client. otherwise you have to build a lua table having the ids as keys and the names as values.

I don't have any ingame UI, just the quest, I'll try doing a lua table...

Thanks

QJ0orbR.png

Metin2 Icon Database

Link to comment
Share on other sites

  • 0
On 2017. 06. 08. at 8:51 PM, charparodar said:

I don't want something like that, I want to get the name by the bonus ID, since it's to use on my pet system and the bonuses are controlled by the quest, on the quest I only have the ID, but the value changes with the pet level, so, it's never the same and the bonus of the pets aren't the same either...

i search on internet what i found ? pet system :D

 

Spoiler

------------------------------------------------------------
        function givebonus(x)
            ---------------------------------------------
            -- 1 TP,53 támadó érték,54 védekező érték  -- -- 1 TP 53 +attack damage 54 def value
            ---------------------------------------------
            local y,boni = {53,54,1},pets.bonusliste()
            table.foreach(boni[x],function(i,l) cmdchat("HaustierBonus"..i.." "..l.."") affect.add_collect(y,l,60*60*24*365*60) end )
            cmdchat("HaustierLevel "..pc.getqf('petlevel').."")
            cmdchat("HaustierName "..pc.get_name().."")
            pc.setqf("petruf",1)
        end
        function bonusliste()
        return {
            [1] = {10,10,25},    --támadő érték,védekező,TP
            [2] = {25,20,50},    --támadő érték,védekező,TP
            [3] = {45,35,75},    --támadő érték,védekező,TP
            [4] = {50,50,100},    --támadő érték,védekező,TP
            [5] = {75,75,125},    --támadő érték,védekező,TP
            [6] = {90,90,150},    --támadő érték,védekező,TP
            [7] = {100,100,165},    --támadő érték,védekező,TP
            [8] = {110,110,175},    --támadő érték,védekező,TP
            [9] = {130,125,190},    --támadő érték,védekező,TP
            [10] = {145,140,210},    --támadő érték,védekező,TP
            [11] = {155,160,230},    --támadő érték,védekező,TP
            [12] = {170,170,270},    --támadő érték,védekező,TP
            [13] = {200,200,300},    --támadő érték,védekező,TP
            [14] = {250,250,500},    --támadő érték,védekező,TP
            [15] = {300,300,700},    --támadő érték,védekező,TP
            [16] = {400,400,1000},    --támadő érték,védekező,TP
            [17] = {500,500,2000},    --támadő érték,védekező,TP
            [18] = {600,600,3000},    --támadő érték,védekező,TP
            [19] = {700,700,4000},    --támadő érték,védekező,TP
        }
        end
        function removebonus(x)
            local y,boni = {53,54,1},pets.bonusliste()
            table.foreach(boni[x],function(i,l) affect.remove_collect(y,l,60*60*24*365*60) end )
            pc.setqf("petruf",0)
            cmdchat("HidePetGui")
            cleartimer("bugcheck")
        end

 

Link to comment
Share on other sites

  • 0
  • Web Developer

I have the bonuses, my bonuses are calculated with the level, the higher the level, the higher the bonus, I wanted to know how could I use the bonus's name on the quest, generalizing to every pet, I used PACI's ideia, I made a table with the bonus that I'm using (can be add more) and then it get's to the quest...

Result:

wGJxTJL.png

QJ0orbR.png

Metin2 Icon Database

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.