PDA

View Full Version : Item Gossip

Reloac
08-22-2013, 04:27 PM
TRINITYCORE ITEM GOSSIP

What does it do?

Enabled you to use C++ to make gossip scripts (Like NPCs) onto items, the item must have a "on use" ability (like hearthstone) for it to work!

Example :

http://i.imgur.com/UBgddZA.jpg

http://pastebin.com/KxJD2w0q

If you are running a repack, you will NOT be able to add this script to your core, learn to compile your own core!

Tommy
08-22-2013, 04:37 PM
Great work! Thanks for the release.

Parranoia
08-22-2013, 04:55 PM
Does this require a custom patch or is it all handled in the core?

Tommy
08-22-2013, 04:58 PM
Does this require a custom patch or is it all handled in the core?

Handled via core.

Reloac
08-22-2013, 05:14 PM
Does this require a custom patch or is it all handled in the core?

As tommy said V
Just impliment it, add in a new script for the items gossip menus, build and use :)

Handled via core.

ToxicDev
08-22-2013, 05:43 PM
Yeh it is all handled via the core. All you need to do is make a itemscript for your item and then make the item with a on use spell to trigger it.

http://pastebin.com/ppLY538U

Shame i didn't get to release this myself as it is my mod of rochet's item gossip and is prob not even a good modification but hey it does work . But least i did get to release the example script. But the real credit should go to rochet for this one as it was his to begin with. :P

"Also in the script i linked above there may be a few lines that don't actually need to be there but it will work regardless."

Jameyboor
08-22-2013, 06:55 PM
Note : I reckon you need a spell ID filled in the column spellid1 of the item to trigger the OnUse hook.

ToxicDev
08-23-2013, 03:21 AM
Note : I reckon you need a spell ID filled in the column spellid1 of the item to trigger the OnUse hook.

you would be correct.

Rochet2
08-23-2013, 05:40 PM
Looks good... hmm

Note that atm your code disables Eluna item and player gossip.

Xele
08-23-2013, 11:32 PM

Hamar
08-24-2013, 09:00 AM
thanks for sharing.

krusez
08-25-2013, 10:56 AM
I get a error when I apply the patch to the newest source.

fatal: corrup patch at line 130

Any solution?

Rochet2
08-25-2013, 11:51 AM
I get a error when I apply the patch to the newest source.

fatal: corrup patch at line 130

Any solution?

Add an empty new line in the end of the file.
Pastebin doesnt allow empty lines in the end and removes them, thus creating this error for ppl.

krusez
08-25-2013, 08:22 PM
Having this error now::

Item_gossip.patch:109 tab in indent.
virtual void OnGossipSelectCode(Player*/*player*/, unit32 /*men
Fatal: corrupt patch at line 131 :/

Reloac
08-26-2013, 04:04 PM
Apply it manually if it errors.

krusez
08-26-2013, 07:17 PM
Apply it manually if it errors.

Would you mind helping me out?

Skype: vninja-kruse

Tommy
08-26-2013, 07:19 PM
It needs a last line. Pastebin removes the last line.

diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 5fd19be..3ab1a31 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -101,6 +101,29 @@ void WorldSession::HandleGossipSelectOptionOpcode(World Packet& recvData)
if (_player->PlayerTalkClass->IsGossipOptionCoded(gossipListId))
recvData >> code;

+ if (IS_PLAYER_GUID(guid))
+ {
+ {
+ if(code.empty())
+ else
+ sScriptMgr->OnGossipSelectCode(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
+ }
+ return;
+ }
+ else if(IS_ITEM_GUID(guid))
+ {
+ if(Item* item = _player->GetItemByGuid(guid))
+ {
+ if(code.empty())
+ sScriptMgr->OnGossipSelect(_player, item, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
+ else
+ sScriptMgr->OnGossipSelectCode(_player, item, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
+ }
+ return;
+ }
+
if (IS_ITEM_GUID(guid) || IS_PLAYER_GUID(guid))
{
sHookMgr->HandleGossipSelectOption(GetPlayer(), guid, GetPlayer()->PlayerTalkClass->GetGossipOptionSender(gossipListId), GetPlayer()->PlayerTalkClass->GetGossipOptionAction(gossipListId), code, menuId);
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 6c1cdf9..530d066 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -657,6 +657,23 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
}

+void ScriptMgr::OnGossipSelect(Player* player, Item* item, uint32 sender, uint32 action)
+{
+ ASSERT(player);
+ ASSERT(item);
+
+ FOREACH_SCRIPT(ItemScript)->OnGossipSelect(player, item, sender, action);
+}
+
+void ScriptMgr::OnGossipSelectCode(Player* player, Item* item, uint32 sender, uint32 action, const char* code)
+{
+ ASSERT(player);
+ ASSERT(item);
+
+ FOREACH_SCRIPT(ItemScript)->OnGossipSelectCode(player, item, sender, action, code);
+}
+
+
bool ScriptMgr::OnQuestAccept(Player* player, Item* item, Quest const* quest)
{
ASSERT(player);
@@ -1368,6 +1385,20 @@ void ScriptMgr::OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newAre
FOREACH_SCRIPT(PlayerScript)->OnUpdateZone(player, newZone, newArea);
}

+void ScriptMgr::OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
+{
+ ASSERT(player);
+
+}
+
+void ScriptMgr::OnGossipSelectCode(Player* player, uint32 menu_id, uint32 sender, uint32 action, const char* code)
+{
+ ASSERT(player);
+
+ FOREACH_SCRIPT(PlayerScript)->OnGossipSelectCode(player, menu_id, sender, action, code);
+}
+
void ScriptMgr::OnPlayerEnterCombat(Player* player, Unit* enemy)
{
FOREACH_SCRIPT(PlayerScript)->OnPlayerEnterCombat(player, enemy);
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 4b9f7f3..061b348 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -382,6 +382,12 @@ class ItemScript : public ScriptObject
// Called when a dummy spell effect is triggered on the item.
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Item* /*target*/) { return false; }

+ // Called when a player selects an option in an item gossip window
+ virtual void OnGossipSelect(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/) { }
+
+ // Called when a player selects an option in an item gossip window
+ virtual void OnGossipSelectCode(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { }
+
// Called when a player accepts a quest from the item.
virtual bool OnQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return false; }

@@ -758,6 +764,12 @@ class PlayerScript : public UnitScript
// Called when a player changes to a new map (after moving to new map)
virtual void OnMapChanged(Player* /*player*/) { }

+ // Called when a player selects an option in a player gossip window
+ virtual void OnGossipSelect(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/) { }
+
+ // Called when a player selects an option in a player gossip window
+ virtual void OnGossipSelectCode(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { }
+
// Called when a player enters combat
virtual void OnPlayerEnterCombat(Player* /*player*/, Unit* /*enemy*/) { }

@@ -917,6 +929,8 @@ class ScriptMgr
public: /* ItemScript */

bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Item* target);
+ void OnGossipSelect(Player* player, Item* item, uint32 sender, uint32 action);
+ void OnGossipSelectCode(Player* player, Item* item, uint32 sender, uint32 action, const char* code);
bool OnQuestAccept(Player* player, Item* item, Quest const* quest);
bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets);
bool OnItemExpire(Player* player, ItemTemplate const* proto);
@@ -1037,6 +1051,8 @@ class ScriptMgr
void OnPlayerSave(Player* player);
void OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent);
void OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newArea);
+ void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action);
+ void OnGossipSelectCode(Player* player, uint32 menu_id, uint32 sender, uint32 action, const char* code);
void OnPlayerEnterCombat(Player* player, Unit* enemy);
void OnPlayerLeaveCombat(Player* player);
--
--

Try that..

Rochet2
09-27-2013, 07:30 PM
Since there is no player gossip script example yet, I thought I would write one, since its a bit different. Did not test the example.
The same idea is when using player gossip in eluna.

XGrYHksH

Reckless
10-06-2013, 10:38 PM
Can somebody help me out with this?
I will pay \$25 if they can get it working for me :)

darksoke
10-07-2013, 12:28 PM
you can use this SQL for item

INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `WDBVerified`) VALUES (60000, 0, 0, 0, 'SET HERE ITEM NAME', 46787, 6, 0, 0, 1, 0, 0, 0, -1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 18282, 0, 0, 0, 8000, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, '|cff00FF00Use: Here will be the use message /description|r', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 'Script_name', 0, 0, 0, 0, 0, 12340);

dsy86
10-28-2013, 09:19 AM
good job, thx.

Tommy
11-06-2013, 04:43 PM
hello!! friend all good when your file will add it in the core git warns that line 130 corrupted this is how you help me

I thank you!!

Because the patch is outdated with the latest commit, but you can easily apply it manually without trouble.

Take a look at my post here: http://emudevs.com/showthread.php/1518-Item-Gossip?p=9539&viewfull=1#post9539

Rochet2
12-13-2013, 01:59 PM
Hmm, shouldnt probably use FOREACH_SCRIPT for item script?
GET_SCRIPT would be better I think.

arlyon
12-21-2013, 10:40 AM
I've been looking through this, and I was wondering if anyone was able to give some sort of complete start to finish guide on this? Not anything extremely in depth, as I know somewhat how, just an overview.

I haven't done scripting aside from game scripts (allowing flight anywhere, and adding new races/factions) but not applied scripts such as npcs and items.

Any help is appreciated :)

EDIT: I thought I'd give some extra info, I followed this part here: http://emudevs.com/showthread.php/1518-Item-Gossip?p=9539&viewfull=1#post9539 and applied all that to the core.

I then added this script: http://pastebin.com/XGrYHksH to the src/server/script/custom folder and added it to cmakelists.

I then followed this guide: http://collab.kpsn.org/display/tc/How-to_CustomScript and it all seems to be working together.

Although, I get met with this on compile:

3>..\..\..\..\TrinityCore\src\server\scripts\Custom\ gossipitem.cpp(15): error C2065: 'DEFAULT_GOSSIP_MENU' : undeclared identifier
3>..\..\..\..\TrinityCore\src\server\scripts\Custom\ gossipitem.cpp(16): error C2562: 'PlayerGossipTest::OnPlayerLeaveCombat' : 'void' function returning a value
3> ..\..\..\..\TrinityCore\src\server\scripts\Custom\ gossipitem.cpp(8) : see declaration of 'PlayerGossipTest::OnPlayerLeaveCombat'

I'm pretty sure it's from the script, not any of the other parts, but I'm not exactly sure.

Rochet2
12-21-2013, 12:34 PM
Edit: For future, I suggest using this:
http://rochet2.github.io/?page=Player_and_Item_Gossip

Old post contents for reference:
Here is the patch fixed:
http://pastebin.com/LEQJLGzZ
Here are example scripts on how to use:
http://pastebin.com/n27GVrKU

Also the patch had issues as I tried to note on my earlier post.

Note. Above patch and scripts are also untested, but they compile.

arlyon
12-21-2013, 12:59 PM
Thanks for the quick reply, Rochet. I appreciate it.

It seems I got it working now, it was a problem with caps (used referenced gossipnpc in one place, and GossipNpc in others).

I'll make sure to keep it topic specific next time :) thanks.

Rochet2
12-21-2013, 02:00 PM
I suggest you remove the patch you have now and apply the patch I wrote just now if you are going to use item gossip.
The item gossip was using wrong way to trigger the scripts and will not work properly on the main release patch.

Shonik
07-11-2014, 05:39 PM
Hi, i'm new here :).
Is there a way to do the same thing but with WorldScript, like using gossip with OnUpdate hook for example ?

Rochet2
07-11-2014, 06:24 PM
Hi, i'm new here :).
Is there a way to do the same thing but with WorldScript, like using gossip with OnUpdate hook for example ?

Sure sure.

If you take a look at the example script here:
https://gist.github.com/Rochet2/9350420#file-exampleplayergossip-cpp-L10

You can use that code there in any hook or any part of the code as long as you have access to the player in some way you want to send the menu to.

Shonik
07-11-2014, 06:37 PM
Ok, thanks rochet, i'll try so :)

Edit : I added your patch, then tried to add gossip in my OnUpdate hook but I always get this error when i connect
WorldSocket::SendPacket enqueue_tail failed
Are you familiar with it ?

Rochet2
07-11-2014, 08:14 PM
Ok, thanks rochet, i'll try so :)

Edit : I added your patch, then tried to add gossip in my OnUpdate hook but I always get this error when i connect
WorldSocket::SendPacket enqueue_tail failed
Are you familiar with it ?

How does the gossip code look like?

Shonik
07-11-2014, 09:54 PM
I'm a wery begginer in c++ coding, so it may not be perfect code at all ^^

#include "ScriptMgr.h"

#define TIME 30 //total time played you want for the reward. (in seconds)
#define ITEM_ID_1 6256 //the item id you want as a reward.
#define ITEM_QUANTITY_1 1 //the quantity you want for your reward.
#define ITEM_ID_2 44050 //the item id you want as a reward.
#define ITEM_QUANTITY_2 1 //the quantity you want for your reward.

uint32 HasItem = 0;

class totaltimeplayed_reward : public WorldScript
{

public :

totaltimeplayed_reward() : WorldScript("totaltimeplayed_reward") { }

void OnUpdate(uint32 /*diff*/)
{
SessionMap ss = sWorld->GetAllSessions();
for(SessionMap::iterator itr = ss.begin(); itr != ss.end(); ++itr)
{
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
continue;

Player* player = itr->second->GetPlayer();
uint32 total_played_time = player->GetTotalPlayedTime();
if (total_played_time >= TIME)
{
while (HasItem != 1)
{
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 1", GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 2", GOSSIP_SENDER_MAIN, 2);
}
}
}
}

void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
{
return;

switch(action)
{
case 1 :
player->SaveToDB();
++HasItem;
break;

case 2 :
player->SaveToDB();
++HasItem;
break;
}
}

};

{
new totaltimeplayed_reward();
}

Rochet2
07-11-2014, 10:45 PM
I'm a wery begginer in c++ coding, so it may not be perfect code at all ^^

#include "ScriptMgr.h"

#define TIME 30 //total time played you want for the reward. (in seconds)
#define ITEM_ID_1 6256 //the item id you want as a reward.
#define ITEM_QUANTITY_1 1 //the quantity you want for your reward.
#define ITEM_ID_2 44050 //the item id you want as a reward.
#define ITEM_QUANTITY_2 1 //the quantity you want for your reward.

uint32 HasItem = 0;

class totaltimeplayed_reward : public WorldScript
{

public :

totaltimeplayed_reward() : WorldScript("totaltimeplayed_reward") { }

void OnUpdate(uint32 /*diff*/)
{
SessionMap ss = sWorld->GetAllSessions();
for(SessionMap::iterator itr = ss.begin(); itr != ss.end(); ++itr)
{
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
continue;

Player* player = itr->second->GetPlayer();
uint32 total_played_time = player->GetTotalPlayedTime();
if (total_played_time >= TIME)
{
while (HasItem != 1)
{
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 1", GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 2", GOSSIP_SENDER_MAIN, 2);
}
}
}
}

void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
{
return;

switch(action)
{
case 1 :
player->SaveToDB();
++HasItem;
break;

case 2 :
player->SaveToDB();
++HasItem;
break;
}
}

};

{
new totaltimeplayed_reward();
}

I had the same error once with my code and someone noticed I had an infinite loop.
You seem to have one too:

while (HasItem != 1)
{
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 1", GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 2", GOSSIP_SENDER_MAIN, 2);
}

- - - Updated - - -

I'm a wery begginer in c++ coding, so it may not be perfect code at all ^^

#include "ScriptMgr.h"

#define TIME 30 //total time played you want for the reward. (in seconds)
#define ITEM_ID_1 6256 //the item id you want as a reward.
#define ITEM_QUANTITY_1 1 //the quantity you want for your reward.
#define ITEM_ID_2 44050 //the item id you want as a reward.
#define ITEM_QUANTITY_2 1 //the quantity you want for your reward.

uint32 HasItem = 0;

class totaltimeplayed_reward : public WorldScript
{

public :

totaltimeplayed_reward() : WorldScript("totaltimeplayed_reward") { }

void OnUpdate(uint32 /*diff*/)
{
SessionMap ss = sWorld->GetAllSessions();
for(SessionMap::iterator itr = ss.begin(); itr != ss.end(); ++itr)
{
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
continue;

Player* player = itr->second->GetPlayer();
uint32 total_played_time = player->GetTotalPlayedTime();
if (total_played_time >= TIME)
{
while (HasItem != 1)
{
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 1", GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 2", GOSSIP_SENDER_MAIN, 2);
}
}
}
}

void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
{
return;

switch(action)
{
case 1 :
player->SaveToDB();
++HasItem;
break;

case 2 :
player->SaveToDB();
++HasItem;
break;
}
}

};

{
new totaltimeplayed_reward();
}

I had the same error once with my code and someone noticed I had an infinite loop.
You seem to have one too:

while (HasItem != 1)
{
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 1", GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM(0, "Choisir l'item 2", GOSSIP_SENDER_MAIN, 2);
}

Otherwise the code is rather massive I guess to be ran on every tick?
Could delay it to be run every 5 seconds etc.
The idea with hasitem variable is not working well.

The gossip select hook needs to be in a playerscript class.

Shonik
07-11-2014, 10:48 PM
I'll try to fix that, thanks again

Edit : It works like a charm ! But you're right, I don't have a single idea how to do this, but i need to execute the script like every 5 seconds, otherwise it creates a bit of lags.
Should i use diff variable to do this ?

Rochet2
07-11-2014, 11:15 PM
I'll try to fix that, thanks again

Edit : It works like a charm ! But you're right, I don't have a single idea how to do this, but i need to execute the script like every 5 seconds, otherwise it creates a bit of lags.
Should i use diff variable to do this ?

I suggest you create a support thread.
In there you should show the current script you have so far.
You should also tell, in detail, what you want to do.

Then it will not bloat this topic and you may get more replies. Also telling what you are after may give ideas of different approaches etc.

And yes. You could use the diff variable.

Shonik
07-11-2014, 11:20 PM
I suggest you create a support thread.
In there you should show the current script you have so far.
You should also tell, in detail, what you want to do.

Then it will not bloat this topic and you may get more replies. Also telling what you are after may give ideas of different approaches etc.

And yes. You could use the diff variable.

Of course, i'll do this