Slabon Posted February 24, 2013 Report Share Posted February 24, 2013 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? Link to comment Share on other sites More sharing options...
PACI Posted February 24, 2013 Report Share Posted February 24, 2013 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. David09 1 Link to comment Share on other sites More sharing options...
Slabon Posted February 24, 2013 Author Report Share Posted February 24, 2013 gracias Link to comment Share on other sites More sharing options...
Shogun Posted February 24, 2013 Report Share Posted February 24, 2013 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 Link to comment Share on other sites More sharing options...
KeKo Posted February 24, 2013 Report Share Posted February 24, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts