Jump to content

How to get client bonus name on quest


Go to solution Solved by PACI,

Recommended Posts

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

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

  • Management
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...

raw

raw

Link to comment
Share on other sites

  • Management
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

raw

raw

Link to comment
Share on other sites

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

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

  • Management

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

Edited by Metin2 Dev
Core X - External 2 Internal

raw

raw

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

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.