• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Show gossip menu on first login?

Status
Not open for further replies.

Ghostcrawler336

Epic Member

Ghostcrawler336

Epic Member
did u tried sendlistinventory ?

I would've tried it that way, however I'm making a script which will auto equip gear. So I thought it would best fit, a gossip menu if I can find someone to explain or setup a basic script for me so I can go from there. :)

I mean it would be as simple as adding to a npc, but I thought it would be better if it was a gossip menu on first login. So player's can just choose there spec / gear.
 
Last edited:

slp13at420

Mad Scientist
here is an example of a creature based vendor script that auto gives armor upon choice:
http://emudevs.com/showthread.php/2641-South-Park-Vendor-Pack
Code:
-- by Runemaster

local Stan = {4080, 13955, 23087, 1154, 10740, 14621, 23577, 10835, 19031}
local Cartman = {14806, 2575, 8312, 23663, 8318, 8316, 4072, 3198}
local Kyle = {21157, 14289, 20654}
local Kenny = {10261, 10056, 6526, 6594, 5963, 10257, 12522, 21697, 15289}

 
function southpark_GossipOnTalk(Event, player, Unit)

	player:GossipClearMenu()
	player:GossipMenuAddItem(0, "Give Me Stan's Armor! (Warrior)", 0, 101)
	player:GossipMenuAddItem(0, "Give Me Cartman's Armor! (Paladin)", 0, 102)
	player:GossipMenuAddItem(0, "Give Me Kyle's Armor! (Mage)", 0, 103)
	player:GossipMenuAddItem(0, "Give Me Kenny's Armor! (Range)", 0, 104)
	player:GossipMenuAddItem(7, "Nevermind...", 0, 105)
	player:GossipSendMenu(1, Unit)
	 
end
 
function southpark_GossipOnSelect(Event, player, Unit, id, intid, code)

	if(intid == 100) then
		for i=1, #Stan do
			player:AddItem(Stan[i], 1)
			player:SendBroadcastMessage("Here is your armor, Stan!")
			player:GossipComplete()
		end
	end

	if(intid == 102) then
		for i=1, #Cartman do
			player:AddItem(Cartman[i], 1)
			player:SendBroadcastMessage("Here is your armor, Cartman!")
			player:GossipComplete()
		end
	end

	if(intid == 103) then
		for i=1, #Kyle do
			player:AddItem(Kyle[i], 1)
			player:SendBroadcastMessage("Here is your armor, Kyle!")
			player:GossipComplete()
		end
	end

	if(intid == 104) then
		for i=1, #Kenny do
			player:AddItem(Kenny[i], 1)
			player:SendBroadcastMessage("Here is your armor, Kenny!")
			player:GossipComplete()
		end
	end

	if(intid == 105) then
		player:GossipComplete()
	end
end     
 
RegisterPlayerGossipEvent(100, 1, southpark_GossipOnTalk)
RegisterPlayerGossipEvent(100, 2, southpark_GossipOnSelect)

you can change the AddItem() function to EquipItem().
and modify it to fire upon login.
also modded from the hip .. in the middle of wiping and reloading my testing server lol srry
 
Last edited:

slp13at420

Mad Scientist
register the event to a player event 30

Code:
PLAYER_EVENT_ON_FIRST_LOGIN             =     30,       // (event, player) 
RegisterPlayerEvent(30, southpark_GossipOnTalk)
 

Ghostcrawler336

Epic Member
I deleted the script I made early. However, it was something like this below.

Code:
function FirstLogin (event, player)
       player:GossipMenuAddItem(0, "Test", 0, 1)
end
RegisterPlayerEvent(30, FIrstLogin)
 

Jpp

Administrator
I deleted the script I made early. However, it was something like this below.

Code:
function FirstLogin (event, player)
       player:GossipMenuAddItem(0, "Test", 0, 1)
end
RegisterPlayerEvent(30, FIrstLogin)

Perhaps sending the menu would be a great idea.

In addition to that, you should take a look at the name you register and the name of the function.
 

Ghostcrawler336

Epic Member
Perhaps sending the menu would be a great idea.

In addition to that, you should take a look at the name you register and the name of the function.

Indeed, that's what I need help with. Since I had it typed out like I was making a "gossip npc". And that's not how it was setup, I just typed that out when I posted it.
 

Tommy

Founder
Why do you want a script to automatically gear players? That's why there's a playercreateinfo_item table..
 

slp13at420

Mad Scientist
Indeed, that's what I need help with. Since I had it typed out like I was making a "gossip npc". And that's not how it was setup, I just typed that out when I posted it.

yea that's what i'm figuring out since your toon'z not interacting with an object or creature during the login sequence.

- - - Updated - - -

why not just have the script parse for class and just equip the gear for that class.?

or yea tommy'z route is most efficient.
 
Last edited:

Ghostcrawler336

Epic Member
I don't want to use the playercreateinfo_item database table because I have gear setup for each spec. However, since I don't understand how to set this script up, nor does anyone want to explain or show me a example. You can close this thread, as this is my last reply to it.
 

Tommy

Founder
I don't want to use the playercreateinfo_item database table because I have gear setup for each spec. However, since I don't understand how to set this script up, nor does anyone want to explain or show me a example. You can close this thread, as this is my last reply to it.

As far as I see, there are examples and people have been helping you. No need to get upset for no reason. How do you not understand? Explain to me what you don't understand about it. My statement/question was a valid statement/question because you never said anything about using playercreateinfo_item table.


Read rule #41 too:

Do not post on our Twitter, Facebook or our Teamspeak just because you want an issue solved. Create a new thread and it will get solved when we get to it. Also, don't tell us staff when to 'close' or 'solve' a thread. We will do it when we see the need to do so.

This thread will remain open until it is solved. If you choose to still be "upset", then I will try and fit the need of what you're wanting and solve it myself.

You also give a good example of why I made these rules:
http://emudevs.com/showthread.php/3200-Rules-updated-5-7-2014-(IMPORTANT)?goto=newpost

You were receiving help. People were replying WITH HELP and I replied with a valid statement/question (in which you NEVER said anything about that table at all) and you get upset? Logic. If it were up to me, I would just make an NPC that gives those options (put it in front of the player spawn) once they login. Who knows, does the gossip menu even show up at all? If not, perhaps it is because you're just logging in - depending on when the gossip is calling. Regardless, as I said, explain to me what you aren't understanding. It would go a lot smoother since apparently nobody as you put it is helping you.
 
Last edited:

Ghostcrawler336

Epic Member
I didn't mean to make it sound like, no one was trying to help. I'm glad someone took the time to link me something, or try to explain it. I just don't understand how to set the script up, to run the gossip at "FirstLogin". So I'm not going to argue about it, I have decided to go anther way that I actually know how to "script" it. So I'll leave it up to you to close this thread, whenever the staff thinks it needs to be closed.

Referring to suggesting just to add it to a NPC, that's what I've decided to work on early tonight. Thank you everyone who provided support, and sorry if I sounded rude.
 
Last edited:

Foereaper

Founder
It's very easy to do actually. On login event, send the menu like you normally would, eluna can use the player as a sender. Then register the on gossip select event, and code it exactly like you would a normal gossip event.

Check my item upgrader script in the release section, it shows how to use a player based gossip sender.
 
Status
Not open for further replies.
Top