[RELEASE] Switcher+ 100% DE LIKE (PY & LUA)

02/28/2016 18:14 gerald500#16
Quote:
Originally Posted by RealReznov View Post
item.set_attribute and item.get_attribute c++ side pls?
search for it here or on m2d*v you will definitly find it any where
02/28/2016 20:57 filipw1#17
Quote:
Originally Posted by RealReznov View Post
item.set_attribute and item.get_attribute c++ side pls?
If you really want this switcher you can easy do it in source like normal swtiching item.
02/29/2016 01:41 Endless.#18
Nicht schlecht :D

Deine Systeme die du zurzeit machst sind einfach genial :)

Naja zum Thema Bugs.. klar muss man des ganze System erstmal ausprobieren.
Bei jedem System gab es mal welche aber jemand musste erstmal den ganzen Kram testen bevor man überhaupt was finden kann :D Leider mangelt es mir an Zeit des System mal zu testen


Gruß
02/29/2016 20:47 xP3NG3Rx#19
This version of this system is far away from the official version.
Works, it's okay. (Maybe, I did not test it, I'm ignoring pylua systems)
- But, where is the slot locking method(not the whole inventory lock)?
- And where is the slot mark from the locked slot(the red glow)?
- Official window is not closable :).
- Unknown: When you get disconnect by the server, what happens while you are used the item already but did not accept it(On GF).

Do you know what does it mean 100% GF Like?
I do not think so. This is only a LITE, an alternative, or a similar version, but not 100% GF Like.
Sorry for my rough style, but these are the real 100% GF Like systems which are not complete yet:
03/01/2016 17:38 gerald500#20
Quote:
Originally Posted by xP3NG3Rx View Post
This version of this system is far away from the official version.
Works, it's okay. (Maybe, I did not test it, I'm ignoring pylua systems)
- But, where is the slot locking method(not the whole inventory lock)?
- And where is the slot mark from the locked slot(the red glow)?
- Official window is not closable :).
- Unknown: When you get disconnect by the server, what happens while you are used the item already but did not accept it(On GF).

Do you know what does it mean 100% GF Like?
I do not think so. This is only a LITE, an alternative, or a similar version, but not 100% GF Like.
Sorry for my rough style, but these are the real 100% GF Like systems which are not complete yet:
i watched a video on how this system is on official and its the same.

and the window isnt closable the button just exist and has no function.

when you get disconnected the window ist still opend when you login again
even if the gui is not the same the function of the system is 100% de like
03/01/2016 17:42 Forcetraeger#21
Quote:
Originally Posted by xP3NG3Rx View Post
This version of this system is far away from the official version.
Works, it's okay. (Maybe, I did not test it, I'm ignoring pylua systems)
- But, where is the slot locking method(not the whole inventory lock)?
- And where is the slot mark from the locked slot(the red glow)?
- Official window is not closable :).
- Unknown: When you get disconnect by the server, what happens while you are used the item already but did not accept it(On GF).

Do you know what does it mean 100% GF Like?
I do not think so. This is only a LITE, an alternative, or a similar version, but not 100% GF Like.
Sorry for my rough style, but these are the real 100% GF Like systems which are not complete yet:
You want rls this ?
03/03/2016 17:03 MrSoNiice#22
Sehr schön , Danke!
03/11/2016 17:30 JeeX#23
N1ce Release,
hab aber ein Problem damit...

Hab alles genau so eingefügt; Clientside habe ich keinen Fehler!

Serverside habe ich das:
[Only registered and activated users can see links. Click Here To Register...]

Compilte Quest:

notarget/button

notarget/info

notarget/login

state

Kann mir da jemand helfen? bzw. da etwas rauslesen???

Danke!
03/11/2016 20:00 gerald500#24
Quote:
Originally Posted by JeeX View Post
N1ce Release,
hab aber ein Problem damit...

Hab alles genau so eingefügt; Clientside habe ich keinen Fehler!

Serverside habe ich das:
[Only registered and activated users can see links. Click Here To Register...]

Compilte Quest:

notarget/button

notarget/info

notarget/login

state

Kann mir da jemand helfen? bzw. da etwas rauslesen???

Danke!
sieht so aus als hätteast du die item.get_attribute funktion nicht, genau so wie die item.set_attribute.

wenn du die 34k game benutzt gibts ne lib von imer

bei einer 40k musst du dich informieren wie die funktion bei deiner game heißt und ob sie überhaupt existiert. ansonsten musst du sie im source adden
03/11/2016 22:45 Shaytan #25
Danke für das release eher was für Oldschools.

Lg
03/12/2016 08:22 RealReznov#26
Quote:
Originally Posted by gerald500 View Post
search for it here or on m2d*v you will definitly find it any where
No, it's not public on any other forum :(
03/12/2016 14:35 *~*TeacheR*~*#27
Quote:
Originally Posted by RealReznov View Post
No, it's not public on any other forum :(

PHP Code:
int item_get_attribute(lua_State* L)
{
    
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    
LPITEM item = CQuestManager::instance().GetCurrentItem();

    if (!
item)
    {
        
lua_pushnumber(L, 0);
        return 
1;
    }

    if (!
lua_isnumber(L, 1))
    {
        
sys_err("[%s] Wrong argument in item_get_attribute, need a number from range(0..%d)!", ch->GetName(), ITEM_ATTRIBUTE_MAX_NUM-2);
        
lua_pushnumber(L, 0);
        return 
1;
    }

    
int iAttrIndex = (int)lua_tonumber(L, 1);
    if (
iAttrIndex < 0 || iAttrIndex >= ITEM_ATTRIBUTE_MAX_NUM-2)
    {
        
sys_err("[%s]: Invalid index %d in item_get_attribute. Index out of range(0..%d)", ch->GetName(), iAttrIndex, ITEM_ATTRIBUTE_MAX_NUM-2);
        
lua_pushboolean(L, false);
        return 
1;
    }

    const 
TPlayerItemAttribute& AttrItem = item->GetAttribute(iAttrIndex);

    
lua_newtable(L);

    
lua_pushnumber(L, AttrItem[i].bType);
    
lua_rawseti(L, -2, 1);

    
lua_pushnumber(L, AttrItem[i].sValue);
    
lua_rawseti(L, -2, 2);
    return 
1;
}

//0x0E
int item_set_attribute(lua_State* L)
{
    
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    
LPITEM item = CQuestManager::instance().GetCurrentItem();

    if (!
item)
    {
        
lua_pushboolean(L, false);
        return 
1;
    }

    if (!
lua_isnumber(L, 1))
    {
        
sys_err("[%s] Wrong argument[AttrIdx] in item_set_attribute, not number!", ch->GetName());
        
lua_pushboolean(L, false);
        return 
1;
    }
    else if (!
lua_isnumber(L, 2))
    {
        
sys_err("[%s] Wrong argument[AttrType] in item_set_attribute, not number!", ch->GetName());
        
lua_pushboolean(L, false);
        return 
1;
    }
    else if (!
lua_isnumber(L, 3))
    {
        
sys_err("[%s] Wrong argument[AttrValue] in item_set_attribute, not number!", ch->GetName());
        
lua_pushboolean(L, false);
        return 
1;
    }
    

    
int bAttrIndex = (int)lua_tonumber(L, 1);
    if (
bAttrIndex < 0 || bAttrIndex >= ITEM_ATTRIBUTE_MAX_NUM-2)
    {
        
sys_err("[%s]: Invalid index %d in item_set_attribute. Index out of range(0..%d)", ch->GetName(), bAttrIndex, ITEM_ATTRIBUTE_MAX_NUM-2);
        
lua_pushboolean(L, false);
        return 
1;
    }

    
int bAttrType = (int)lua_tonumber(L, 2);
    if (
bAttrType < 1 || bAttrType >= MAX_APPLY_NUM)
    {
        
sys_err("[%s]: Invalid apply %d in item_set_attribute. Apply out of range(1..%d)", ch->GetName(), MAX_APPLY_NUM);
        
lua_pushboolean(L, false);
        return 
1;
    }

    if (
item->HasAttr(bAttrType))
    {
        
sys_err("[%s]: Apply %d muliplicated in item_set_attribute.", ch->GetName(), bAttrType);
        
lua_pushboolean(L, false);
        return 
1;
    }

    
int bAttrValue = (int)lua_tonumber(L, 3);
    if (
bAttrValue < 1 || bAttrValue >= 32767)
    {
        
sys_err("[%s]: Invalid value %d in item_set_attribute. The value should be between 1 and 32767!", ch->GetName(), bAttrValue);
        
lua_pushboolean(L, false);
        return 
1;
    }

    
int bAttrCount = item->GetAttributeCount();
    
//normal bonuses 1-5
    
if (bAttrCount < 5 && bAttrCount >= 0)
    {
        
item->SetAttribute(bAttrIndex, bAttrType, bAttrValue);
        
lua_pushboolean(L, true);
    }
    else
        
lua_pushboolean(L, false);

    return 
1;
} 
[Only registered and activated users can see links. Click Here To Register...]
03/14/2016 17:53 RealReznov#28
Thanks :D Now i'm going to try this system

Edit: Little client side bug: I must to move 2x to the item, to open the window.
Help :D