Jump to content

[C++]Desequipar Arma y Armadura


Recommended Posts

Bueno yo esto lo utilizo para el cambio de raza.


Archivo: questlua_pc.cpp

	int pc_unequip_armor_weapon(lua_State * L)
		LPITEM weapon = CQuestManager::instance().GetCurrentCharacterPtr()->GetWear(WEAR_WEAPON);
		LPITEM armor = CQuestManager::instance().GetCurrentCharacterPtr()->GetWear(WEAR_BODY);
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
		if (!weapon)
			lua_pushnumber(L, 0);
		if (!armor)
			lua_pushnumber(L, 0);

		return 1;
{ "unequip_armor_weapon",    pc_unequip_armor_weapon    }, 

Ale, luego añadis la funciona en quest_fuction en el server y listo. pc.unequip_armor_weapon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...