Alguem Pode Corrigir esse Script Pra min ta com poucos erros
E Desculpas Se Estou Postando em area erada
Vlw pela atenção
E Desculpas Se Estou Postando em area erada
Código:
#include "ScriptPCH.h"
#define Stan "Give Me Stan's Armor! (Warrior)"
#define Cartman "Give Me Cartman's Armor! (Paladin)"
#define Kyle "Give Me Kyle's Armor! (Mage)"
#define Kenny "Give Me Kenny's Armor! (Range)"
#define leave "Nevermind..."
class npc_SouthPark : public CreatureScript
{
public:
npc_SouthPark() : CreatureScript("npc_SouthPark") { }
bool OnGossipHello(Player* player, Creature* creature)
{
{
player->ADD_GOSSIP_ITEM(1, Stan, GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM(1, Cartman, GOSSIP_SENDER_MAIN, 2);
player->ADD_GOSSIP_ITEM(1, Kyle, GOSSIP_SENDER_MAIN, 3);
player->ADD_GOSSIP_ITEM(1, Kenny, GOSSIP_SENDER_MAIN, 4);
player->ADD_GOSSIP_ITEM(0, Leave, GOSSIP_SENDER_MAIN, 10);
player->SEND_GOSSIP_MENU(1, creature->GetGUID());
}
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
switch(action)
{
case 1: //Stan Armor
player->AddItem(4080,1);
player->AddItem(13955,1);
player->AddItem(23087,1);
player->AddItem(1154,1);
player->AddItem(10740,1);
player->AddItem(14621,1);
player->AddItem(23577,1);
player->AddItem(10835,1);
player->AddItem(19031,1);
player->SaveToDB();
ChatHandler(player).PSendSysMessage("Here is your armor, Stan!");
player->CLOSE_GOSSIP_MENU();
break;
case 2:
player->AddItem(14806,1);
player->AddItem(2575,1);
player->AddItem(8312,1);
player->AddItem(23663,1);
player->AddItem(8318,1); //these are the legs you changed in the DB. [Alabaster Plate Leggings]
player->AddItem(8316,1);
player->AddItem(4072,1);
player->AddItem(3198,1);
player->SaveToDB();
ChatHandler(player).PSendSysMessage("Here is your armor, Cartman!");
player->CLOSE_GOSSIP_MENU();
break;
case 3:
player->AddItem(21157,1);
player->AddItem(14289,1);
player->AddItem(20654,1);
player->SaveToDB();
ChatHandler(player).PSendSysMessage("Here is your armor, Kyle");
player->CLOSE_GOSSIP_MENU();
break;
case 4:
player->AddItem(10261,1);
player->AddItem(10056,1);
player->AddItem(6526,1);
player->AddItem(6594,1);
player->AddItem(5963,1);
player->AddItem(10257,1);
player->AddItem(12522,1);
player->AddItem(21697,1);
player->AddItem(15289,1);
player->SaveToDB();
ChatHandler(player).PSendSysMessage("Here is your armor, Kyle");
player->CLOSE_GOSSIP_MENU();
break;
case 10:
player->CLOSE_GOSSIP_MENU();
break;
}
}
return true;
};
void AddSC_npc_SouthPark()
{
new npc_SouthPark();
}
Vlw pela atenção