here's some code to make it quack.
move DUCKSPEED 25
move DUCKFLEEING 100
move DUCKSTOPPED 0
move DUCKRUNNING 100
action DUCKWALK			0 2 5 1 24
action DUCKRUNS			0 2 5 1 8
action DUCKSTAND		0 1 5 1 4
action DUCKFLEE			0 2 5 1 10
action DUCKWANTSBREAD		0 2 5 1 6 // atack
action DUCKSHRUNK		0 1 5 1 24
action DUCKGROW			0 1 5 1 24
action DUCKFROZEN		0 1 5 1 24
useractor notenemy NEWDUCK 25 DUCKWALK DUCKSPEED randomangle geth
fall
sizeat 10 10
clipdist 32
cstat 257
ifaction DUCKWANTSBREAD
 	ifcansee move DUCKSPEED geth faceplayerslow	
	{
		ifpdistl 1024
			{
				soundonce QUACK
				action DUCKFLEEING
				move DUCKRUNNING geth randomangle
			}
	}
	ifnotmoving
		{
			action DUCKWALK
			move DUCKSPEED geth randomangle break
		}
else 
	ifcount 120
	ifrnd 64
	{
		action DUCKWALK
		move DUCKSPEED 
	}
	else ifrnd 64
	{
		action DUCKSTAND
	}
ifaction DUCKSTAND
	{
	ifcount 120 
		ifrnd 128
			{
				action DUCKWALK
				move DUCKSPEED geth
			}
		else
			ifrnd 64
			{
				action DUCKWANTSBREAD 
				move DUCKSPEED geth faceplayerslow
			}
		else
			{
				action DUCKFLEE
				move DUCKFLEEING geth fleeenemy
			}
	}
ifaction DUCKWALK
	{
		move DUCKSPEED geth 
		ifcount 120
			ifrnd 16
		{
				action DUCKSTAND
				move DUCKSTOPPED
		}
		else
		ifrnd 64
		{
			action DUCKWALK
		}
		else 
		ifcansee
			ifrnd 64
		{
			action DUCKWANTSBREAD
			move DUCKSPEED geth faceplayerslow
		}
		else
		ifnotmoving
			{
				action DUCKWALK
				move DUCKSPEED geth randomangle // break
			}
	}	
ifaction DUCKFLEE
	{
	move DUCKFLEEING DUCKFLEEING fleeenemy geth
		ifactioncount 30
			{		
				action DUCKWALK
				move DUCKSPEED geth randomangle
			} 
		ifnotmoving 
			{
				action DUCKFLEE
				move DUCKSPEED geth randomangle // break
			}
	} 
 ifaction DUCKFROZEN
  {
    fall
    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pstomp
    ifcount THAWTIME
    {
      action DUCKFLEE
      getlastpal
      break
    }
    else
      ifcount FROZENDRIPTIME
        ifactioncount 26
          resetactioncount
    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
        break
      lotsofglass 30
      sound GLASS_BREAKING
      killit
    }
    break
  }
		
ifhitweapon 
	{
		guts JIBS6 1
		action DUCKFLEE
	}
ifdead
	{
	ifwasweapon FREEZEBLAST
      		{
        		spritepal 1
       	 		strength 0
        		action DUCKFROZEN
        		sound SOMETHINGFROZE
     	 	}
		ifwasweapon FLAMEBALL // custom flamethrower projectile.
		{
			spawn ROASTDUCK
			spawn SMALLSMOKE
			killit
		}
	else
		{
			guts JIBS6 3
			killit
		}
	}	
enda
and the code for a roasted duck you can eat, using the code from the WIKI page 
 
useractor notenemy ROASTDUCK 0 ROAST
sizeat 10 10
ifrnd 8 spawn SMALLSMOKE
fall
ifcount 24
ifpdistl RETRIEVEDISTANCE
	ifp pfacing
		ifhitspace
 {
        ifphealthl 20
        {
          addphealth 10
          globalsound DUKE_GOTHEALTHATLOW
          killit
        }
        else
        {
          ifphealthl MAXPLAYERHEALTH
          {
            addphealth 10
            globalsound DUKE_GET
            killit
          }
          else
          {
            break
          }
        }
      }
enda
seems to run fine, now to program some bread 
