battle programming a forum for elite programmers with extreme will power to sharpen theire skills
 
HomeSearchRegisterLog in
Post new topic   Reply to topicShare
 

 cheer skill DJirachi ver 1 (chobit skill)

Go down 
AuthorMessage
Moti Barski
super
super
Moti Barski

Posts : 415
Join date : 2011-08-02

cheer skill DJirachi ver 1 (chobit skill) Empty
PostSubject: cheer skill DJirachi ver 1 (chobit skill)   cheer skill DJirachi ver 1 (chobit skill) EmptyMon Jul 22, 2019 5:05 pm



Code:
import java.util.ArrayList;

public class DJirachi extends AbsCmdReq implements Neuronable {
 private ArrayList<String> triggerList = new ArrayList<>();
 final private String startTrigger = "cheer me";
 final private String stopTrigger = "ok";
 final private String cheer = "user fighto";
 private Boolean mode = false;
 private Boolean doIt = false;

 public DJirachi() {
 // TODO Auto-generated constructor stub
 triggerList.add("help me");
 triggerList.add("chii");
 }

 @Override
 public void output(Neuron noiron) {
 // TODO Auto-generated method stub
 if (doIt) {
 AbsAlgPart itte = new APSay(1, cheer);
 String representation = "cheer";
 ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
 algParts1.add(itte);
 Algorithm algorithm = new Algorithm("cheer", representation, algParts1);
 noiron.algParts.add(algorithm);
 doIt = false;
 }
 }

 @Override
 public void input(String ear, String skin, String eye) {
 if (ear.equals(stopTrigger)) {
 mode = false;
 return;
 }
 if (ear.equals(startTrigger)) {
 mode = true;
 return;
 }
 if (mode && triggerList.contains(ear)) {
 doIt = true;
 }
 }
}


yaruki dete kitta chobit

_________________
MB over and out emp it up
Back to top Go down
Moti Barski
super
super
Moti Barski

Posts : 415
Join date : 2011-08-02

cheer skill DJirachi ver 1 (chobit skill) Empty
PostSubject: Re: cheer skill DJirachi ver 1 (chobit skill)   cheer skill DJirachi ver 1 (chobit skill) EmptyMon Jul 22, 2019 5:11 pm

here it is in the chobit class :

Code:

protected String doIt2(String ear, String skin, String eye) {
      // this is the main function
      // works regardless of permissions
      inOut(detective, ear, skin, eye);
      inOut(dJirachi, ear, skin, eye);// done
      inOut(dPermitter, ear, skin, eye);
      inOut(dRules, ear, skin, eye);
      inOut(dSpeller, ear, skin, eye);
      inOut(dAlarmer, "", "", "");
        if (dPermitter.getPermissionLevel() > 0) {
            // works with friends
         inOut(dSayer, ear, skin, eye);
        }
        if (dPermitter.getPermissionLevel() > 1) {
            // only works with owner
         inOut(dAlarmer, ear, skin, eye);
         inOut(dDirtyTalker, ear, skin, eye);
        }
        fusion.setAlgQueue(noiron);
      DCStrPair<String> result = new DCStrPair<String>();
      result = fusion.act(ear, skin, eye);
        this.emot = fusion.getEmot();
      return itemFilter(result);
    }

one line of code and a skill was added

_________________
MB over and out emp it up
Back to top Go down
 
cheer skill DJirachi ver 1 (chobit skill)
Back to top 
Page 1 of 1

Permissions in this forum:You can reply to topics in this forum
battle programmers alliance :: battle programming alliance :: the LivinGrimoire-
Post new topic   Reply to topicJump to: