Ejemplo n.º 1
0
func ffHandleSay(s mud.Stimulus, n *simple.NPC) {
	scast, ok := s.(mud.TalkerSayStimulus)
	if !ok {
		panic("FF should only receive TalkerSayStimulus")
	} else {
		args := strings.SplitN(scast.Text(), " ", 3)
		mud.Log("FF args:", args)
		if args[0] == "bling" {
			switch args[1] {
			case "set":
				n.Meta["lastText"] = args[2]
				n.SetDescription(n.Meta["lastText"].(string))
			}
		}
	}
}