[Help c++] NPC SENDER

Hello, I got an idea this morning create a npc sender. That mean create a gossip how send to a http url. but i didin’t know how to do. So somebody can help? here 90 % of the script just waiting the sender ^^.


include "ScriptPCH.h"

class npc_vendor : public CreatureScript

{

public:

	    npc_vendor() : CreatureScript("npc_sender") { }

	    bool OnGossipHello(Player* player, Creature* creature)

{

player->ADD_GOSSIP_ITEM(1, "Exemple Url ->'", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);

player->ADD_GOSSIP_ITEM(0, "Leave!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+999);

player->SEND_GOSSIP_MENU(1, creature->GetGUID());

return true;

}

bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)

{

	    if (sender == GOSSIP_SENDER_MAIN)

	    {

   player->PlayerTalkClass->ClearMenus();

   switch(action)

   {

   case GOSSIP_ACTION_INFO_DEF+1://  

		    player->ADD_GOSSIP_ITEM(1, "Exemple Url ->'", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+50);

player->ADD_GOSSIP_ITEM(0, "leave!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+999);

   player->SEND_GOSSIP_MENU(1,  creature->GetGUID());

   break;


  case GOSSIP_ACTION_INFO_DEF+50:

???

return false;

break;


   case GOSSIP_ACTION_INFO_DEF+999:

   player->CLOSE_GOSSIP_MENU();

   break;

   }

  }


 }


        }

	    return true;

        }

void AddSC_npc_sender()

{

	    new npc_sender();

}

and just what is this supposed to do?

This lignes a missing

[CODE] case GOSSIP_ACTION_INFO_DEF+50:

???

return false;

break;[/CODE]

i dunno how can i code it. When player click on the gossip ther send him on a website

I dont think you can do that.

Even if you did use some code to open a web browser, it would open up on the server, not at the player’s computer.

I doubt that wow client by default has any packet etc that allows you to open up webpages.

All webpages opened by wow are done by the client, they probably have nothing to do with the server at all.

Just speculation…

All I can think of is to send a message containing the url … but that wouldnt allow the player to even copy it.

try’ed before …

you cant do that .

good luck .

Okay thx rochet /emoticons/default_smile.png