Beiträge von VegaS

    I didn't test it, but you can do some tricks for that.
    With what i made here you can delete the file ../root/introEmpire.py, will no longer be used.
    ________________________________________________________________

    • ../root/networkmodule.py

    Search for:


    Replace it with:


    After that, do it on source this change aswell.

    CSS
    1. //@src/Server/db/src/ClientManager.cpp
    2. //Search for:
    3. snprintf(szQuery, sizeof(szQuery), "UPDATE player_index%s SET empire=%u WHERE id=%u", GetTablePostfix(), p->bEmpire, p->dwAccountID);
    4. //Replace with:
    5. enum {EMPIRE_NONE, EMPIRE_A, EMPIRE_B, EMPIRE_C};
    6. static const uint8_t bDefaultEmpire = EMPIRE_A;
    7. snprintf(szQuery, sizeof(szQuery), "UPDATE player_index%s SET empire=%u WHERE id=%u", GetTablePostfix(), (p->bEmpire == bDefaultEmpire) ? p->bEmpire : bDefaultEmpire, p->dwAccountID);

    Try that.

    First one thanks for release, i'm not good on Lua but i can give some advices on this case.

    • These checks don't need to exist.
    CSS
    1. if s == 3 then
    2. return
    3. elseif pc.job == 4 and s == 2 then // Lykaner hat keine 2. Lehre, darum ist dort der 2. Button "Abbrechen"
    4. return
    5. end
    • Is enough just to check if selectIndex is equal with last element from arbitrary positions of a list.
    Shell-Script
    1. if (s == table.getn(tab)) then
    2. return
    3. end
    • I don't recommended you to use the metatables of pc_functions, instead of pc.job use pc.get_job is more safe and doesn't have sense to use it a metatable on this case.
    • Instead of do a check for each race and insert the group name you can do a simple table wich you can retrieve the name of each race.

    Have fun.
    Attachment code:


    Class Render Monster Card
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    • A simple Python Module which gives you the chance to be able to turn mob differently with a specific animation such as atack, motion, death etc.
    • This module was not designed for beginners in python, this is just a beginning for the rendering of every monster.
    • You can also use it for other systems for render.

    WARNING:

    • I don't offer any support for this, that module is just for guys who know what have to do.
    • Code isn't working like official one.
    • This script has not been tested, is just a simple idea like better then 'pseudocode', you need to improve and do compatible with your scripts.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    Zitat

    Probably changing the way it indexes the data does the deal, using strings instead of numbers sounds good to me.

    Now you can use it more easy, have fun.

    Google translate german-english isn't so good, but i think that is what you want.

    This module was not designed for people who don't know nothing about python.
    Here is a simple functions which gives you the chance to be able to turn all objects of script loader (uiScript) into a a simple list and control all very simple.
    This is more easy if you have a lot a objects and want to do some actions with them like set multiples text, load images etc. do a simple loop by range start:end and you can play with it.

    • self.OBJECT_MAX_NUM = 25 | You can change how many max objects you can send into list.
    • self.Realloc(state, objectList) | You can run a action (Hide() / Show()) for all objects what you sended on list.

    How to use GetChildList([]):


    • How to use self.Realloc(None, []):


    How you can play with GetChildList, another example:



    Python
    1. for (key, object) in enumerate(self.GetChildList(["TextLineA", "TextLineB", "TextLineC"])):
    2. object.SetText("Format line: {0}".format(key))


    Code (Is a little shit, i was write on some minutes for test something, so i was think it's ok if i share with you because i don't use)


    Declare textLine as instance of ui.TextLine() and put the line to SetText on OnUpdate

    Python
    1. from datetime import datetime
    2. self.textLine.SetText(datetime.now().strftime('%H:%M:%S %Y-%m-%d'))
    3. >>> 09:23:27 2017-11-10

    dont work, you understand this?

    I'm not your brother or your employee, stop to reactionate like this, you don't pay me to do your full job 100%.
    You didn't gave full informations and you not paste the full quest and you didn't explain what exactly you want, no one is bound to help you, like this style.
    "don't work, you understand this?"
    Do you know what exactly that means? it looks like you're a shit kid what want to receive all d**** in him mouth, stop to be angry, you don't solve nothing.


    How it's working this:
    When you click on NPC he check your actual map index and return the table of this:

    • Argument 1: Level - Key from loop, 1|2|3.
    • Argument 2: Index where you need to join 107|108|109
    • Argument 3: Name of map

    If you are in mapIndex 5 you will get table of index 1 (Join on index level(1), joinIndex(107), name(leichte farmamp)
    I didn't test this quest but i'm sure is working well, my domain isn't Lua, i just was trying to help you, but i see your comment and character is by far the worst of all I've ever seen.


    keiner eine idee?

    I didn't understand very well what exactly you want because you didn't post the function determine_index, but maybe something like this :?:
    I didn't tested

    No, not exist a 'better' solution and more 'elegant'.
    Ymir was did a lot a things like that, not all is 'extensible' for change, is a real value of bonus default what is seted and is calculated with all bonuses, so you can't remove to show on python only the amount of equipment without do a check on c++ or python and check each bonus and result the "if type == bonus -> amount -= kBonusDefaultInfo[type]".
    This is the only solution and I do not think I'm mistaken.