ArcEmu: [scripts/addition]ian Drake Gossip - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[scripts/addition]ian Drake Gossip

#1 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 28 February 2011 - 02:41 AM

created on 4056
completed: 70%, need to add abbility, that he will can to give companion for player
authors: me
what implements or adds this patch? adds Ian drake gossip menu with option.

https://gist.github.com/847159


ps: would be great, if someone will show, how to make, that unit gossip will can to add item directly to player :)


-- sorry for bad eng
Posted Image
Posted Image
Sorry for my bad english
0

#2 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 28 February 2011 - 04:39 AM

in "GossipSelectOption()" do you need pCreature for anything? Otherwise it's an useless check.
mgr->register_gossip_script(29093, ((GossipScript*) new IanDrake()));

is there a reason why you are casting "new IanDrake()" to GossipScript* ?
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#3 User is offline   kjanko 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 171
  • Joined: 10-August 09
  • Gender:Male

Posted 28 February 2011 - 04:43 AM

+ // Should to add item "Tyrael's Hilt" to player
+ Plr->Gossip_Complete();
+ }break;


That definitely is not going to add Tyrael's Hilt to the player :)
Posted Image
1

#4 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 28 February 2011 - 05:03 AM

View PostSaintJamesApostle, on 28 February 2011 - 04:39 AM, said:

in "GossipSelectOption()" do you need pCreature for anything? Otherwise it's an useless check.
mgr->register_gossip_script(29093, ((GossipScript*) new IanDrake()));

is there a reason why you are casting "new IanDrake()" to GossipScript* ?


tired to use GossipScript * NewScriptName = new OriginalScriptName_Gossip; :), this way tested and works normal as GossipScript * NewScriptName = new OriginalScriptName_Gossip;

just for me, this way is faster, when here is only one npc, which should to have gossip.

Also removed check.

View Postkjanko, on 28 February 2011 - 04:43 AM, said:

+ // Should to add item "Tyrael's Hilt" to player
+ Plr->Gossip_Complete();
+ }break;


That definitely is not going to add Tyrael's Hilt to the player :)


i know, that is why i asked, how to make, that unit gossip will give item to player. This gossip_complete is right, due player gets item, but another text is not showen, in cata this npc had only spawn place change.
Posted Image
Posted Image
Sorry for my bad english
0

#5 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 28 February 2011 - 07:48 AM

View Postsanctum32, on 28 February 2011 - 05:03 AM, said:

tired to use GossipScript * NewScriptName = new OriginalScriptName_Gossip; :), this way tested and works normal as GossipScript * NewScriptName = new OriginalScriptName_Gossip;
just for me, this way is faster, when here is only one npc, which should to have gossip.

it's not something you should test to see if it works or not, you should have studied and learnt it when you read a C++ book or followed a C++ class at school/university.
My point wasn't to add more useless code, more about why didn't you just write
mgr->register_gossip_script(29093, new IanDrake());

?

moved to topic to Workshop since the patch is nowhere near to be complete

Quote

Workshop
Have a modification you're working on and would like assistance? Post it here

Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#6 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 28 February 2011 - 07:54 AM

View PostSaintJamesApostle, on 28 February 2011 - 07:45 AM, said:

it's not something you should test to see if it works or not, you should have studied and learnt it when you read a C++ book or followed a C++ class at school/university.
My point wasn't to add more useless code, more about why didn't you just write
mgr->register_gossip_script(29093, new IanDrake());

?

planning to study, now just trying to learn some basics from scripting :)
before few months tryed and this returned me errors. anyway, big thx for explains :)


ok, uploading correct patch :), anyway, how to make, that gossip unit will can to add item? not seen this function in scripts
https://gist.github.com/847276 - maybe this time it will look ok, this script requires only additem to player :)
Posted Image
Posted Image
Sorry for my bad english
0

#7 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 28 February 2011 - 08:09 AM

It's not a good thing to mess with C++ before learning it, it doesn't make sense at all actually.
Anyway, if you really can't resist, take a look at ChatHandler::HandleAddInvItemCommand() to figure out how to add items to players. that's the method used for ".character additem"
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#8 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 17 May 2011 - 04:05 AM

COMPLETED!
Index: src/scripts/src/GossipScripts/Gossip_Stormwind.cpp
===================================================================
--- src/scripts/src/GossipScripts/Gossip_Stormwind.cpp	(revision 4200)
+++ src/scripts/src/GossipScripts/Gossip_Stormwind.cpp	(working copy)
@@ -68,8 +68,31 @@
 	void Destroy() { delete this; }
 };
 
+class IanDrake : public Arcemu::Gossip::Script
+{
+public:
+	void OnHello(Object * pObject, Player* Plr)
+	{
+		Arcemu::Gossip::Menu menu(pObject->GetGUID(), 13441);
+		menu.AddItem(Arcemu::Gossip::ICON_CHAT, "I would like to whisper my secret code to you to receive Tyrael's Hilt.", 1, 0, "", true);
+		menu.Send(Plr);
+	}
+
+	void OnSelectOption(Object * pObject, Player* Plr, uint32 Id, const char * Code)
+	{
+		Arcemu::Gossip::Menu::Complete(Plr);
+		if (Id == 1)
+		{
+			Plr->GetItemInterface()->CalculateFreeSlots(ItemPrototypeStorage.LookupEntry(39656));
+			Plr->GetItemInterface()->AddItemToFreeSlot(objmgr.CreateItem(39656, Plr));		// Tyrael's Hilt
+		}
+
+	}
+};
+
 void SetupStormwindGossip(ScriptMgr * mgr)
 {
-	mgr->register_creature_gossip(2708, new ArchmageMalin_Gossip); // Archmage Malin
-	mgr->register_creature_gossip(29154, new SWHarborFlyAround);
+	mgr->register_creature_gossip(2708,  new ArchmageMalin_Gossip);	// Archmage Malin
+	mgr->register_creature_gossip(29154, new SWHarborFlyAround);	// Thargold Ironwing
+	mgr->register_creature_gossip(29093, new IanDrake);				// Ian Drake
 }

Posted Image
Posted Image
Sorry for my bad english
0

#9 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 22 October 2011 - 05:18 AM

http://www.wowhead.c...=39656#comments

Quote

Where does it come from and how hard is it to get?
Tyrael's Hilt comes from the Paris Worldwide Invitation (WWI) 2008 goody bag.
Rarity: One per visitor to WWI 2008

With your gossip every player would get it, that doesn't sound blizzlike
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#10 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 15 January 2012 - 08:18 AM

https://github.com/a...rmwind.cpp#L518 as base, blizzard generates password code here, this time there i have added my custom password code here...
there is missing only error message about wrong entered code... which will added in one hour

anyway, if someone has suggestions for this option password selection, feel free to post.
Posted Image
Posted Image
Sorry for my bad english
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users