hello,
i will learn to create own scripts or fixx buggy scripts
I would create the Ribbon Pole…
My Script:
#include “ScriptMgr.h”
#include “SpellMgr.h”
#include “SpellInfo.h”
#include “Player.h”
#include “AchievementMgr.h”
class go_Ribbon_Pole : public GameObjectScript
{
public:
go_Ribbon_Pole() : GameObjectScript(“go_Ribbon_Pole”) { }
bool OnGossipHello(Player* player, GameObject* go) override
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER){
Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST);
uint32 itemID = item->GetEntry();
if (itemID == 34685){
sWorld->SendServerMessage(SERVER_MSG_STRING, “Brust-Teil Angelegt”);
}
}
return false;
}
};
void AddSC_go_Ribbon_Pole()
{
new go_Ribbon_Pole();
}
And in Scriptloader:
#ifdef SCRIPTS
/* This is where custom scripts’ loading functions should be declared. */
void AddSC_go_Ribbon_Pole(); // The Ribbon Pole
#endif
void AddCustomScripts()
{
#ifdef SCRIPTS
/* This is where custom scripts should be added. */
AddSC_go_Ribbon_Pole(); // The Ribbon Pole
#endif
}
so and the GameObject
is scriptName set to “go_Ribbon_Pole” without the "
so i click on the Ribbon Pole and nothing happen i equip the Item 34685 is a Chest now i click on the Ribbon Pole and again nothing happen…
Sry for my bad english…