Thread: How Would I Do This?

Results 1 to 3 of 3
  1. #1 How Would I Do This? 
    Banned

    Join Date
    Mar 2009
    Age
    27
    Posts
    970
    Thanks given
    22
    Thanks received
    29
    Rep Power
    0
    Hey I was wanting to make it replace whereever they planted the flower. How would I assign where they planted to be where they planted the flower?

    Heres my code I was working on:

    Code:
    			case ####; //Farming patch
    
    			int PlantX;
    			int PlantY;
    
    			if (c.GoodDistance(c.skillX, c.skillY, c.getX(), c.getY(), 2) && c.FarmClickWait == 0) {
    				if (c.isPlanting == true) {
    					if (c.PlantingTimer > 0 && c.PlantingTimer < 31) {
    					c.CAM().sendMessage("You check on your money plant and nothing has changed.");
    					c.FarmClickWait += 80;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7840, 0, 0);
    					}
    					if (c.PlantingTimer > 30 && c.PlantingTimer < 61) {
    					c.CAM().sendMessage("Your money is growing a tad, but nothing noticable yet.");
    					c.FarmClickWait += 80;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7841, 0, 0);
    					}
    					if (c.PlantingTimer > 60 && c.PlantingTimer < 121) {
    					c.CAM().sendMessage("Your money is starting to grow.");
    					c.FarmClickWait += 80;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7842, 0, 0);
    					}
    					if (c.PlantingTimer > 120 && c.PlantingTimer < 181) {
    					c.CAM().sendMessage("Your money grew into a small plant!");
    					c.FarmClickWait += 80;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7843, 0, 0);
    					}
    					if (c.PlantingTimer > 180 && c.PlantingTimer < 240) {
    					c.CAM().sendMessage("Your money is almost an adult!");
    					c.FarmClickWait += 80;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7844, 0, 0);
    					}
    					if (c.PlantingTimer > 240 && c.PlantingTimer < 300) {
    					c.CAM().sendMessage("Your money is an adult! It is almost ready to pick!");
    					c.FarmClickWait += 80;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7845, 0, 0);
    					}
    					if (c.PlantingTimer > 300 && c.PlantingTimer < 1000) {
    					c.CAM().sendMessage("Your money plant has grown and you now have picked it!");
    					c.FarmClickWait += 80;
    					c.PlantingTimer = 0;
    					c.isPlanting = false;
    					c.addItem(995,Misc.random(28000));
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7846, 0, 0);
    					}
    					if (c.PlantingTimer > 1000) {
    					c.CAM().sendMessage("Your money plant has spoiled as it's gotten too old.");
    					c.FarmClickWait += 80;
    					c.PlantingTimer = 0;
    					c.isPlanting = false;
    					c.ReplaceObject2(c.PlantX, c.PlantY, 7847, 0, 0);
    					}
    				} else if (c.isPlanting == false && c.playerHasItem(995,10000)) {
    					c.CAM().sendMessage("You plant a money seed.");
    					c.CreateObj(c.absX, c.absY, 7840, 0, 10);
    					c.deleteItem(995,10000);
    				} else if (c.isPlanting == false && !c.playerHasItem(995,10000)) {
    					c.CAM().sendMessage("You need 10000 coins to plant a money plant.");
    				}
    			}
    			break;
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    Code:
    			case ####; //Farming patch
    				if (c.GoodDistance(c.skillX, c.skillY, c.getX(), c.getY(), 2) && c.FarmClickWait == 0) {
    					if (c.isPlanting) {
    						if (c.PlantTimer > 0 && c.PlantTimer < 31) {
    							c.CAM().sendMessage("You check on your money plant and nothing has changed.");
    							c.FarmClickWait += 80;
    							c.Replaceskill2(c.skillX, c.skillX, 7840, 0, 0);
    						}
    						if (c.PlantTimer > 30 && c.PlantTimer < 61) {
    							c.CAM().sendMessage("Your money is growing a tad, but nothing noticable yet.");
    							c.FarmClickWait += 80;
    							c.Replaceskill2(c.skillX, c.skillY, 7841, 0, 0);
    						}
    						if (c.PlantTimer > 60 && c.PlantTimer < 121) {
    							c.CAM().sendMessage("Your money is starting to grow.");
    							c.FarmClickWait += 80;
    							c.Replaceskill2(c.skillX, c.skillY, 7842, 0, 0);
    						}
    						if (c.PlantTimer > 120 && c.PlantTimer < 181) {
    							c.CAM().sendMessage("Your money grew into a small skill!");
    							c.FarmClickWait += 80;
    							c.Replaceskill2(c.skillX, c.skillY, 7843, 0, 0);
    						}
    						if (c.PlantTimer > 180 && c.PlantTimer < 240) {
    							c.CAM().sendMessage("Your money is almost an adult!");
    							c.FarmClickWait += 80;
    							c.Replaceskill2(c.skillX, c.skillY, 7844, 0, 0);
    						}
    						if (c.PlantTimer > 240 && c.PlantTimer < 300) {
    							c.CAM().sendMessage("Your money is an adult! It is almost ready to pick!");
    							c.FarmClickWait += 80;
    							c.Replaceskill2(c.skillX, c.skillY, 7845, 0, 0);
    						}
    						if (c.PlantTimer > 300 && c.PlantTimer < 1000) {
    							c.CAM().sendMessage("Your money plant has grown and you now have picked it!");
    							c.FarmClickWait += 80;
    							c.PlantTimer = 0;
    							c.isPlanting = false;
    							c.addItem(995,Misc.random(28000));
    							c.Replaceskill2(c.skillX, c.skillY, 7846, 0, 0);
    						}
    						if (c.PlantTimer > 1000) {
    							c.CAM().sendMessage("Your money plant has spoiled as it's gotten too old.");
    							c.FarmClickWait += 80;
    							c.PlantTimer = 0;
    							c.isPlanting = false;
    							c.Replaceskill2(c.skillX, c.skillY, 7847, 0, 0);
    						}
    					} else if (!c.isPlanting && c.playerHasItem(995,10000)) {
    						c.CAM().sendMessage("You plant a money seed.");
    						c.CreateObj(c.absX, c.absY, 7840, 0, 10);
    						c.deleteItem(995,10000);
    					} else if (!c.isPlanting && !c.playerHasItem(995,10000)) {
    						c.CAM().sendMessage("You need 10000 coins to plant a money skill.");
    					}
    				}
    				break;



    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Mar 2009
    Age
    27
    Posts
    970
    Thanks given
    22
    Thanks received
    29
    Rep Power
    0
    Thanks! Rep+
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •