Jump to content

Fr3zy94

Member
  • Posts

    201
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Fr3zy94

  1. i try somethink like this :

                                case 71051 : // 진재가
                                    {
                                        // 유럽, 싱가폴, 베트남 진재가 사용금지
                                        if (LC_IsSingapore() || LC_IsVietnam())
                                            return false;
    
                                        LPITEM item2;
                                        // test
                                        if (item2->GetType() != ITEM_COSTUME)
                                            return false;
                                        // test
                                        if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
                                            return false;
    
                                        if (item2->IsExchanging() == true)
                                            return false;
    
                                        if (item2->GetAttributeSetIndex() == -1)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다."));
                                            return false;
                                        }
    
                                        if (item2->AddRareAttribute() == true)
    • Love 1

  2. Hi I want to use those two objects for costume bonus I want bonus not work on another item such as belt or accessory
     
    71051.png71052.png
    
    
                                case 71051 : // 진재가
                                    {
                                        // 유럽, 싱가폴, 베트남 진재가 사용금지
                                        if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
                                            return false;
    
                                        LPITEM item2;
    
                                        if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
                                            return false;
    
                                        if (item2->IsExchanging() == true)
                                            return false;
    
                                        if (item2->GetAttributeSetIndex() == -1)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다."));
                                            return false;
                                        }
    
                                        if (item2->AddRareAttribute() == true)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("성공적으로 속성이 추가 되었습니다"));
    
                                            int iAddedIdx = item2->GetRareAttrCount() + 4;
                                            char buf[21];
                                            snprintf(buf, sizeof(buf), "%u", item2->GetID());
    
                                            LogManager::instance().ItemLog(
                                                    GetPlayerID(),
                                                    item2->GetAttributeType(iAddedIdx),
                                                    item2->GetAttributeValue(iAddedIdx),
                                                    item->GetID(),
                                                    "ADD_RARE_ATTR",
                                                    buf,
                                                    GetDesc()->GetHostName(),
                                                    item->GetOriginalVnum());
    
                                            item->SetCount(item->GetCount() - 1);
                                        }
                                        else
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("더 이상 이 아이템으로 속성을 추가할 수 없습니다"));
                                        }
                                    }
                                    break;
    
                                case 71052 : // 진재경
                                    {
                                        // 유럽, 싱가폴, 베트남 진재가 사용금지
                                        if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
                                            return false;
    
                                        LPITEM item2;
    
                                        if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                            return false;
    
                                        if (item2->IsExchanging() == true)
                                            return false;
    
                                        if (item2->GetAttributeSetIndex() == -1)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다."));
                                            return false;
                                        }
    
                                        if (item2->ChangeRareAttribute() == true)
                                        {
                                            char buf[21];
                                            snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                            LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);
    
                                            item->SetCount(item->GetCount() - 1);
                                        }
                                        else
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("변경 시킬 속성이 없습니다"));
                                        }
                                    }
                                    break;
  3. I don't know how but some players got kills with - this in my quest:

    quest pvpduel begin
        state start begin
            when levelup with pc.level == 90 begin
                set_state(player_kill)
            end
        end
    
        state player_kill begin
            when letter begin
                send_letter("Înfrânge-þi Inamicii")
            end
    
            when button or info begin
                say_title("Înfrânge-þi Inamicii!")
                say("")
                say("Dovedeºte cã eºti cel mai bun,")
                say("Înfrânge-þi inamicii în lupta,")
                say("în dueluri sau în arena de razboi")
                say("a breslei.")
                say("")
                say_reward("Ucide 100 de jucãtorii")
                say_reward("ªi iþi vei primi recompensa!")
                say("")
                pc.setqf("state", 100)
                q.set_counter("Inamici rãmaºi:", 100)
             set_state (kill)
            end
       end
    
       state kill begin
          when letter begin
             send_letter("Înfrânge-þi Inamicii")
          end
          
          when button or info begin
                say("")
                say("Dovedeºte cã eºti cel mai bun,")
                say("Înfrânge-þi inamicii în lupta,")
                say("în dueluri sau în arena de razboi")
                say("a breslei.")
                say("")
                say_reward("Ucide 100 de jucãtorii")
                say_reward("ªi iþi vei primi recompensa!")
                say("")
             say_reward("Inamici rãmaºi: "..pc.getqf("state").." ")
          end
    
    
            when kill begin
                if npc.is_pc() then
                local count = pc.getqf("state") - 1
                if count <= 100 then
                    pc.setqf("state", count)
                    q.set_counter("Inamici rãmaºi:", count)
                end
                if count == 0 then
                    say_title("Înfrânge-þi Inamicii!")
                    say("Ai dovedit cã eºti cel mai bun!")
                    say("Ai participat la foarte multe")
                    say("lupte,ºi ai ieºit învingãtor")
                    say("Ai înfrânt 100 de jucãtori.")
                    say("Recompesa:")
                    say_reward("5% împotriva oricarei rase.")
                    affect.add_collect_point(POINT_ATTBONUS_WARRIOR,5,60*60*24*365*60)
                    affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,5,60*60*24*365*60)
                    affect.add_collect_point(POINT_ATTBONUS_SURA,5,60*60*24*365*60)    
                    affect.add_collect_point(POINT_ATTBONUS_SHAMAN,5,60*60*24*365*60)
                    affect.add_collect_point(POINT_ATTBONUS_WOLFMAN,5,60*60*24*365*60)
                    affect.add_collect_point(POINT_ATT_GRADE,60,60*60*24*365*60)
                    affect.add_collect_point(POINT_DEF_GRADE,60,60*60*24*365*60)
                    notice_all("".. pc.get_name() .." a ucis 100 de jucãtori.")
                    clear_letter()
                    set_state(__COMPLETE__)
    
                end
            end
        end
        end
    
        state __COMPLETE__ begin
        end
    end

    tlUya4E.png

  4. That don't work for me but i fiind this

        int pc_is_trade(lua_State* L)
        {
            LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
            lua_pushboolean(L, (ch->GetExchange() || ch->GetMyShop() || ch->GetShopOwner() || ch->IsOpenSafebox() || ch->IsCubeOpen()));
            return 1;
        }

    Quest exemple:

    quest test begin
        state start begin  
            when 27802.use begin
                if pc.is_trade() then
                    syschat("Open.")
                else
                    syschat("Close.")
                end
            end
        end -- state
    end    -- quest
  5. don't work if exchange is open will return Close if is close will return close.

     

    quest test begin
        state start begin  
            when 27802.use begin
                if pc.is_trade == true then
                    syschat("Open.")
                else
                    syschat("Close.")
                end
            end
        end -- state
    end    -- quest

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