Jump to content
Slabon

[Duda]Quest login GM

Recommended Posts

Tengo esta quest:

quest gmlogin begin
state start begin
  when login with pc.is_gm() begin
   command("n ".. pc.get_name() .." está Online!")
   command("n texto.")
  end
end
end

Se puede hacer que dependiendo de si es [GM], [sGM] etc de mensajes diferentes?

Share this post


Link to post
Share on other sites


quest gmlogin begin

state start begin

when login with pc.is_gm() begin

if pc.get_name() == [GM] then

command("n ".. pc.get_name() .." está Online!")

command("n texto.")

elseif pc.get_name() == [SGM] then

command("n "..pc.get_name().." está Online!")

command("n texto.")

end

end

end

end

Supongo que sabrás como hacer el resto.

Share this post


Link to post
Share on other sites

Eso no funciona.

 

quest gmlogin begin
state start begin
  when login with pc.is_gm() begin
   if string.sub(pc.get_name(),1,4) == "[GM]" then
    command("n ".. pc.get_name() .." está Online!")
    command("n texto.")
   elseif string.sub(pc.get_name(),1,5) == "[SGM]" then
    command("n "..pc.get_name().." está Online!")
    command("n texto.")
   end
  end
end
end

Share this post


Link to post
Share on other sites

Eso no funciona.

 

quest gmlogin begin
state start begin
  when login with pc.is_gm() begin
   if string.sub(pc.get_name(),1,4) == "[GM]" then
	command("n ".. pc.get_name() .." está Online!")
	command("n texto.")
   elseif string.sub(pc.get_name(),1,5) == "[SGM]" then
	command("n "..pc.get_name().." está Online!")
	command("n texto.")
   end
  end
end
end

Buena idea ^^ pero mejor ponedle notice_all en vez de command.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...