View Single Post
  #22  
Old 05-10-2007, 02:47 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I could have, and I guess it would have made a little sense. But either way the result is the same--I'm checking whether or not the four tiles are grass.
PHP Code:
// NPC made by Dusty
if (mousedowntimeout=0.05;
if (
timeout && leftmousebutton) {
  
grasstiles={0x0,0x1,0x10,0x1ff,0x3ff,0x7ff,0x835,0x836,0x837};
  
bushtiles={0x2,0x3,0x12,0x13};
  
ongrass=1;
  for (
i=0;i<4;i++) {
    if (!(
tiles[mousex-1+i%2,mousey-1+int(i/2)] in grasstiles)) ongrass=0;
  }
  if (
ongrass==1) {
    for (
i=0;i<4;i++) tiles[mousex-1+i%2,mousey-1+int(i/2)]=bushtiles[i];
    
updateboard mousex-1,mousey-1,2,2;
  }
  
timeout=0.05;

Also, I suppose the event && blah is just preference.
Reply With Quote