Aeglon Posted November 9, 2017 at 10:12 PM Share Posted November 9, 2017 at 10:12 PM LPITEM item = 189; item->SetCount(item->GetCount()-1); como faço para remover o item x na source??? A ideia é ver se o jogador tem o item X e remover 1 caso contrario. Se ele não tiver nada.... return! Alguma ajuda... Link to comment Share on other sites More sharing options...
GODSPEED Posted November 9, 2017 at 10:22 PM Share Posted November 9, 2017 at 10:22 PM Não precias de fazer em src podes fazer em quest quest : quest nome begin state start begin when login begin if pc.get_count(iditem) > 0 then pc.remove_item(iditem,1) end end end Link to comment Share on other sites More sharing options...
Aeglon Posted November 9, 2017 at 10:24 PM Author Share Posted November 9, 2017 at 10:24 PM o problema é que tem de ser na Source. Por quest eu sei fazer Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted November 10, 2017 at 12:22 AM Share Posted November 10, 2017 at 12:22 AM Depende bastante, quando queres remover o item? Quando faz login? Quando esta em duelo? Quando mata alguem? etc Link to comment Share on other sites More sharing options...
Aeglon Posted November 10, 2017 at 07:07 AM Author Share Posted November 10, 2017 at 07:07 AM (edited) @Tierri Lopes nesta função de fazer Party Spoiler ACMD(do_party_request) { ******************************************************** Remover o item aqui ou Return ******************************************************** if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ë·ÃÀå¿¡¼ »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.")); return; } if (ch->GetParty()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ¹Ì ÆÄƼ¿¡ ¼ÓÇØ ÀÖÀ¸¹Ç·Î °¡ÀÔ½ÅûÀ» ÇÒ ¼ö ¾ø½À´Ï´Ù.")); return; } char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) return; DWORD vid = 0; str_to_number(vid, arg1); LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid); if (tch) if (!ch->RequestToParty(tch)) ch->ChatPacket(CHAT_TYPE_COMMAND, "PartyRequestDenied"); } Edited November 10, 2017 at 07:09 AM by Aeglon Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted November 11, 2017 at 12:04 AM Share Posted November 11, 2017 at 12:04 AM Podes colocar debaixo de: Remover que item e qual o objectivo? Esse é o pedido de grupo, para remover é melhor na função quando o grupo é criado Link to comment Share on other sites More sharing options...
Aeglon Posted November 11, 2017 at 10:39 AM Author Share Posted November 11, 2017 at 10:39 AM Spoiler if (CountSpecifyItem(vnum) >= count) RemoveSpecifyItem(vnum, count); Tudo o que eu procurava. Resolvido! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now