Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Branch Groups] #73

Open
cypox opened this issue Nov 15, 2019 · 0 comments
Open

[Branch Groups] #73

cypox opened this issue Nov 15, 2019 · 0 comments

Comments

@cypox
Copy link

cypox commented Nov 15, 2019

Is it possible de add the possibility to use custom function by group members.

Attached to this, my script for dj bouf.

For a single character, it works as a charm. For a group however, other members does not execute the corotine. I tried to modify the get_Funcion_Personalizada by adding the corotine to other members, but the problem is that the other members does not have a script variable and will not be able to execute anything.

`
MAXIMOS_PODS = 90

AUTO_REGENERATION =
{
VITA_MIN = 60,
VITA_MAX = 100,
OBJET = { 528 } -- Example : Bread (such as id = 528)
}

MAPS_DONJON = { 2073, 2074, 2075, 2076, 2077, 2079, 2080, 20811, 2082, 2083 }

function mouvement()
return
{
--------------------------------- ROUTE DJ -----------------------------------
{ map = "1856", custom = enter_dungeon}, -- entree dj bouf
-------------------------------- FIN A DUNG ----------------------------------

	------------------------------- SALLES DU DUNG -------------------------------
	{  map = "2073", combat = true}, -- salle 1
	{  map = "2074", combat = true}, -- salle 2
	{  map = "2075", combat = true}, -- salle 3
	{  map = "2076", combat = true}, -- salle 4
	{  map = "2077", combat = true}, -- salle 5
	{  map = "2079", combat = true}, -- salle 6
	{  map = "2080", combat = true}, -- salle 7
	{  map = "2081", combat = true}, -- salle 8
	{  map = "2082", combat = true}, -- salle 9
	{  map = "2083", combat = true}, -- salle 10
	----------------------------- FIN SALLES DU DUNG -----------------------------
	
	{  map = "2084", custom = exit_dungeon}, -- salle chacha
}

end

function enter_dungeon()
npc.hablarNpc(-1)

if estenDialogue() then
	message("Talking to Altair.")
else
	message("This NPC is not in this map.")
	stopScript()
end

if not inventario.tieneObjeto(1568) then
	message("I do not have the clef.")
	stopScript()
else
	message("I do have the clef.")
end

npc.responder(564)

end

function exit_dungeon()
npc.hablarNpc(-1)

if estenDialogue() then
	message("Talking to Altair.")
else
	message("This NPC is not in this map.")
	stopScript()
end

npc.responder(-1)

end
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant