Chibibuddy

Des80

Member
I know there is a script that does the adventures and stuff to keep it alive but I dont need that I need to figure out how to make it so that if I use it and its dead that it knows this uses it again gives it a name then does the chibichat. Would anyone be able to help me figure out how to do this ?
 
I am kind of confused as to why you'd want to keep using it and killing it....but either way, yes you could do this very simply. I don't have one, so I can't write it up myself but it probably wouldn't take more than 5 or so lines x).
 

Des80

Member
O its easy I use it to get chibichat only each day I dont spend any adventure to keep it alive. I know how to make it automatically do the options I need for the chibichat each day and I even know what to do to name it but what I'm trying to figure out is how to have it know if it Died and the thing has to be reopened again. I don't know how to quickill the Chibi to keep testing scripts to see what would work. I'd still like to know hat other peoples opinions are but I think I got one working at least I know it will work if the Chibi is Alive. I am having If statements to test if there is text in the choice that says "Oh no!" , "but the batteries are dead" , or Have a "ChibiChat" so I am hoping that fixes that.
 
Last edited:
I am aware of the intereciate problems with this item, but I figured you could do something like "if (item_amount(chibi(off) > 0) use chibi"? Or does it not revert to its off state automatically when it dies? Like I said I never had one.
 

Des80

Member
It does revert but it reverts while in the choice adventure. After I get out of this Run I can test it against when you first activate it after a run and if that works then that means 2 of statements I made work and the only one I wont know about is the one when it dies. I take and capture the html page that shows up when you open up the Chibibuddy into a String Variable and then I test it to see if it contains certain Text. if (contains_text(result, "Oh no!")) should show me if it dies and if that is the case it turns it back on, gives it a name and actually recalls itself so it goes through again and tests to see if (contains_text(result, "but the batteries are dead")) which is what is shown when you just get out of a run and try to use the chibi but if its on and working (which I know this part works) it checks if (contains_text(result, "Have a ChibiChat")). It was thanks to eegee's Chibi Buddy script that I was able to figure out as much as I was able to figure out.
 

Des80

Member
Here is the Code I've tried changing stuff around and all of that. It just doesn't seem to want to work. I even tried to have it run the Chibi Off both by name and by item number and then run the thing to give it a name and it didn't work. I had it check to see if it was chibi off or Chibi on and still didn't work. So Any help would be appreciated.

Code:
string testChibi() 
{

  return visit_url("inv_use.php?pwd&whichitem=5908");

}

void runIt()
{

string result = testChibi();

//print(result);

  if (contains_text(result, "Oh no!")) 
  {
    visit_url("inv_use.php?pwd&whichitem=5925");
    visit_url("choice.php?pwd&whichchoice=633&option=1&chibiname=fig");

  }

  if (contains_text(result, "batteries are dead")) 
  {
    visit_url("inv_use.php?pwd&whichitem=5925");
    visit_url("choice.php?pwd&whichchoice=633&option=1&chibiname=fig");
  }

  if (contains_text(result, "Have a ChibiChat")) 
  {
    visit_url("choice.php?pwd&whichchoice=627&option=5");
  }

}


void main() 
{
  testChibi();
  runIt();
}
 
This works perfectly :) Remind me to send the Chibi back in a few days after it dies lol.

Code:
//Name your Chibi Pet
string chibi_name = "SuperChibi";


if (get_property("_ChibiChat") != "true") {

	int[item] stuff = get_inventory();
	if (stuff contains to_item(5908)) {
		print("Looks like your ChibiBuddy is On! Using a ChibiChat.", "green");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5908");
		visit_url("choice.php?pwd&whichchoice=627&option=5");
		if (have_effect(to_effect(1167)) > 0) 
			print("Chibi Chat Successful!", "green");
		else {
			print("Chibi Chat Failed!", "red");
			waitq(3);
		}
	}
	else if (stuff contains to_item(5925)) {
		print("You have a ChibiBuddy but he is Off. Turning him on!", "blue");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5925");
		visit_url("choice.php?pwd&whichchoice=633&option=1&chibiname="+url_encode(chibi_name)+"");
		print("ChibiBuddy has been named "+chibi_name+"! Having a ChibiChat now.", "green");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5908");
		visit_url("choice.php?pwd&whichchoice=627&option=5");
		if (have_effect(to_effect(1167)) > 0) 
			print("Chibi Chat Successful!", "green");
		else {
			print("Chibi Chat Failed!", "red");
			waitq(3);
		}
	}
	else
		print("Seems like you do not have a ChibiBuddy, this script is useless too you...", "red");
	
set_property("_ChibiChat", "true");
} else print("Already Chatted Today!", "red");
 
Last edited:

Des80

Member
Had it still being buggy a little when was on but dead so I tweeked it a little bit and now it works and should work for all things now and I see I could have done the same thing if I had tested the effect and not the item amount. Thank you EliteofDelete

Code:
//Name your Chibi Pet
string chibi_name = "SuperChibi";


if (get_property("_ChibiChat") != "true") {

	int[item] stuff = get_inventory();
	if (stuff contains to_item(5908)) {
		print("Looks like your ChibiBuddy is On! Using a ChibiChat.", "green");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5908");
		visit_url("choice.php?pwd&whichchoice=627&option=5");
		if (have_effect(to_effect(1167)) > 0) 
			print("Chibi Chat Successful!", "green");
		else {
			print("Chibi Chat Failed!", "red");
//mine
		visit_url("inv_use.php?pwd&whichitem=5925");
		visit_url("choice.php?pwd&whichchoice=633&option=1&chibiname="+url_encode(chibi_name)+"");
		print("ChibiBuddy has been named "+chibi_name+"! Having a ChibiChat now.", "green");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5908");
		visit_url("choice.php?pwd&whichchoice=627&option=5");
//mine
			waitq(3);
		}
	}
	else if (stuff contains to_item(5925)) {
		print("You have a ChibiBuddy but he is Off. Turning him on!", "blue");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5925");
		visit_url("choice.php?pwd&whichchoice=633&option=1&chibiname="+url_encode(chibi_name)+"");
		print("ChibiBuddy has been named "+chibi_name+"! Having a ChibiChat now.", "green");
		waitq(1);
		visit_url("inv_use.php?pwd&whichitem=5908");
		visit_url("choice.php?pwd&whichchoice=627&option=5");
		if (have_effect(to_effect(1167)) > 0) 
			print("Chibi Chat Successful!", "green");
		else {
			print("Chibi Chat Failed!", "red");
			waitq(3);
		}
	}
	else
		print("Seems like you do not have a ChibiBuddy, this script is useless too you...", "red");
	
set_property("_ChibiChat", "true");
} 

else print("Already Chatted Today!", "red");
 
Figured something like that might need to be added. Glad it is all working now :D

Some Notes:
1. Apparently you don't need the url_encode and it seems to mess up special characters. Doesn't matter too much since I doubt you care much about its name lol.
2. You don't need the waitq(), they were there just for readability, take them out if you'd like it to run faster.
 

Des80

Member
I like the Waitq() due to the fact if there is a little lag it gives it time to get the chibi effect. and yeah I thought about removing the url_Encode but why mess with something that works. Thanks again.
 
Top